From: Jon Langseth Date: Sun, 18 Mar 2012 21:15:08 +0000 (+0100) Subject: Added debug/status display of DR switches to display/UI X-Git-Url: https://git.defcon.no/?a=commitdiff_plain;h=refs%2Fheads%2FBranch_7fcb511ebdc1482a0d8a5a200e0e6a3a82c4a3d9;p=rctxduino Added debug/status display of DR switches to display/UI fixed a DR-related bug in process_inputs() --- diff --git a/source/RCTXDuino/RCTXDuino.pde b/source/RCTXDuino/RCTXDuino.pde index f4661da..1afb5ea 100644 --- a/source/RCTXDuino/RCTXDuino.pde +++ b/source/RCTXDuino/RCTXDuino.pde @@ -642,7 +642,7 @@ void process_inputs(void ) // Test to see if dualrate-switch #1 applies to channel... if ( ( current_input == ( model.dr[2]-1) ) || ( current_input == ( model.dr[3]-1) ) ) { - if ( !keys[KEY_DR1] ) + if ( !keys[KEY_DR2] ) dr_val = ((float)model.dr[6])/100.0; else dr_val = ((float)model.dr[7])/100.0; @@ -844,15 +844,29 @@ void ui_handler() switch ( displaystate ) { case VALUES: - int current_input; - row = 1; + 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