switch ( displaystate )
{
- case VALUES:
- int current_input;
+ case VALUES:
+ int current_input;
+
+ row = 0; col = 0;
+ lcd.setCursor(col, row);
+ lcd.print(" ");
+ lcd.setCursor(col, row);
+
+ lcd.print("S1:");
+ lcd.print( keys[KEY_DR1] ? "On " : "Off" );
+ lcd.print(" S2:");
+ lcd.print( keys[KEY_DR2] ? "On " : "Off" );
+
+ row = 2; col = 0;
+ for (current_input=0; current_input<MAX_INPUTS; current_input++) {
+ if (row == 6)
+ {
+ row = 2;
+ col = 40;
+ }
+ // Overwriting the needed positions with
+ // blanks cause less display-flicker than
+ // actually clearing the display...
+ lcd.setCursor(col, row);
+ lcd.print(" ");
+ lcd.setCursor(col, row);
+
+ char mod_indicator = NULL;
+ if (( keys[KEY_DR1] ) && (( model.dr[0] == current_input+1) || ( model.dr[1] == current_input+1)))
+ mod_indicator = '/';
+ if (( keys[KEY_DR2] ) && (( model.dr[2] == current_input+1) || ( model.dr[3] == current_input+1)))
+ if (mod_indicator) mod_indicator = '|';
+ else mod_indicator = '\\';
+
+ if ( mod_indicator) lcd.print(mod_indicator);
+ else lcd.print(" ");
+
+ lcd.print( current_input+1);
+ lcd.print(":");
+ // Display uses percents, while PPM uses ratio....
+ // New format on stick values
+ lcd.print( (int)model.stick[current_input] );
- row = 0;
- col = 0;
-
- lcd.setCursor(col, row);
- lcd.print(" ");
-
- lcd.setCursor(col, row);
- lcd.print("S1:");
- lcd.print( keys[KEY_DR1] ? "On " : "Off" );
- lcd.print(" S2:");
- lcd.print( keys[KEY_DR2] ? "On " : "Off" );
-
- row = 2;
- col = 0;
-
- for (current_input=0; current_input<MAX_INPUTS; current_input++) {
- if (row == 6)
- {
- row = 2;
- col = 40;
+ row++;
}
-
- // Overwriting the needed positions with
- // blanks cause less display-flicker than
- // actually clearing the display...
- lcd.setCursor(col, row);
- lcd.print(" ");
-
- lcd.setCursor(col, row);
-
- char mod_indicator = NULL;
-
- if (( keys[KEY_DR1] ) && (( model.dr[0] == current_input+1) || ( model.dr[1] == current_input+1)))
- mod_indicator = '/';
-
- if (( keys[KEY_DR2] ) && (( model.dr[2] == current_input+1) || ( model.dr[3] == current_input+1)))
- if (mod_indicator) mod_indicator = '|';
- else mod_indicator = '\\';
-
- if ( mod_indicator) lcd.print(mod_indicator);
- else lcd.print(" ");
-
- lcd.print( current_input+1);
- lcd.print(":");
- // Display uses percents, while PPM uses ratio....
- // New format on stick values
- lcd.print( (int)model.stick[current_input] );
-
- row++;
- }
break;
-
case BATTERY:
lcd.setCursor(0 , 0);
lcd.print("Battery level: ");