@@ -31,11 +31,10 @@ class refPWindow extends PApplet {
3131 fill (0 );
3232 text (" CONNECTION LOST" , width * . 56 , 40 );
3333 }
34-
35- String [] bmsg= {" score" , " ownership score" , " penalty score" , " ownership %" , " switch own time" , " scale own time" , " climbs" };
36- String [] bval= {str (int (blueScore)), str (int (blueOwnershipScore)), str (int (bluePenaltyScore)), nf (blueOwnershipPercent, 3 , 1 )+ (blueOwnershipPercent>= ownershipRPPercent? " (RP)" : " " ), str (int (blueSwitchOwnershipTime)), str (int (blueScaleOwnershipTime)), blueClimbs== maxClimbs? str (blueClimbs)+ " (RP)" : str (blueClimbs)};
37- String [] rmsg= {" score" , " ownership score" , " penalty score" , " ownership %" , " switch own time" , " scale own time" , " climbs" };
38- String [] rval= {str (int (redScore)), str (int (redOwnershipScore)), str (int (redPenaltyScore)), nf (redOwnershipPercent, 3 , 1 )+ (redOwnershipPercent>= ownershipRPPercent? " (RP)" : " " ), str (int (redSwitchOwnershipTime)), str (int (redScaleOwnershipTime)), redClimbs== maxClimbs? str (redClimbs)+ " (RP)" : str (redClimbs)};
34+ String [] bmsg= {" score" , " ownership score" , " penalty score" , " ownership %" , " switch own time" , " scale own time" , " climbs" , (blueSide== Left ? " (v) " : " (n) " )+ " DQ" };
35+ String [] bval= {str (int (blueScore)), str (int (blueOwnershipScore)), str (int (bluePenaltyScore)), nf (blueOwnershipPercent, 3 , 1 )+ (blueOwnershipPercent>= ownershipRPPercent? " (RP)" : " " ), str (int (blueSwitchOwnershipTime)), str (int (blueScaleOwnershipTime)), blueClimbs== maxClimbs? str (blueClimbs)+ " (RP)" : str (blueClimbs), DQBlue ? " YES :(" : " no" };
36+ String [] rmsg= {" score" , " ownership score" , " penalty score" , " ownership %" , " switch own time" , " scale own time" , " climbs" , (blueSide== Right ? " (v) " : " (n) " )+ " DQ" };
37+ String [] rval= {str (int (redScore)), str (int (redOwnershipScore)), str (int (redPenaltyScore)), nf (redOwnershipPercent, 3 , 1 )+ (redOwnershipPercent>= ownershipRPPercent? " (RP)" : " " ), str (int (redSwitchOwnershipTime)), str (int (redScaleOwnershipTime)), redClimbs== maxClimbs? str (redClimbs)+ " (RP)" : str (redClimbs), DQRed ? " YES :(" : " no" };
3938 if (blueSide== Left ) {
4039 dispData(color (0 , 0 , 100 ), bmsg, bval, 0 , 0 , width * . 25 , height , 35 );
4140 dispData(color (100 , 0 , 0 ), rmsg, rval, width * . 75 , 0 , width * . 25 , height , 35 );
@@ -48,7 +47,7 @@ class refPWindow extends PApplet {
4847 nextState= false ;
4948 state++ ;
5049 if (state== 2 ) {// post match
51- String strToSave= str (year ())+ " /" + str (month ())+ " /" + str (day ())+ " " + str (hour ())+ " :" + str (minute ())+ " :" + str (second ())+ " ," + str (int (blueScore))+ " ," + str (int (redScore))+ " ," + str (blueRP)+ " ," + str (int (redRP))+ " ," + str (bluePenaltyScore)+ " ," + str (redPenaltyScore)+ " ," + str (blueClimbs)+ " ," + str (redClimbs)+ " ," + nf (blueOwnershipPercent, 3 , 1 )+ " ," + nf (redOwnershipPercent, 3 , 1 )+ " ," + int (blueSwitchOwnershipTime)+ " ," + int (redSwitchOwnershipTime)+ " ," + int (blueScaleOwnershipTime)+ " ," + int (redScaleOwnershipTime) + " ," + str (int (totalMatchTime- matchTime));
50+ String strToSave= str (year ())+ " /" + str (month ())+ " /" + str (day ())+ " " + str (hour ())+ " :" + str (minute ())+ " :" + str (second ())+ " ," + str (int (blueScore))+ " ," + str (int (redScore))+ " ," + str (blueRP)+ " ," + str (int (redRP))+ " ," + str (bluePenaltyScore)+ " ," + str (redPenaltyScore)+ " ," + str (blueClimbs)+ " ," + str (redClimbs)+ " ," + nf (blueOwnershipPercent, 3 , 1 )+ " ," + nf (redOwnershipPercent, 3 , 1 )+ " ," + int (blueSwitchOwnershipTime)+ " ," + int (redSwitchOwnershipTime)+ " ," + int (blueScaleOwnershipTime)+ " ," + int (redScaleOwnershipTime) + " ," + str (int (totalMatchTime- matchTime))+ " , " + str ( int ( DQBlue )) + " , " + str ( int ( DQRed )) ;
5251 try {
5352 String [] stringsToSave= loadStrings (filename);
5453 stringsToSave= append (stringsToSave, strToSave);
@@ -353,6 +352,21 @@ class refPWindow extends PApplet {
353352 blueClimbs++ ;
354353 }
355354 }
355+
356+ if (key == ' v' ) {
357+ if (blueSide== Right ) {
358+ DQRed = ! DQRed ;
359+ } else {
360+ DQBlue = ! DQBlue ;
361+ }
362+ }
363+ if (key == ' n' ) {
364+ if (blueSide== Left ) {
365+ DQRed = ! DQRed ;
366+ } else {
367+ DQBlue = ! DQBlue ;
368+ }
369+ }
356370 if (redClimbs> maxClimbs)
357371 redClimbs= 0 ;
358372 if (blueClimbs> maxClimbs)
0 commit comments