From 1e52e2f77de48428742a933bc02927e3afc9d012 Mon Sep 17 00:00:00 2001 From: Jon Langseth Date: Mon, 29 Aug 2011 23:55:47 +0200 Subject: [PATCH] Trivial change: Comments preparing for value-change on model_t.stick[] --- source/RCTXDuino/RCTXDuino.pde | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/source/RCTXDuino/RCTXDuino.pde b/source/RCTXDuino/RCTXDuino.pde index 652a52c..b6c8d26 100644 --- a/source/RCTXDuino/RCTXDuino.pde +++ b/source/RCTXDuino/RCTXDuino.pde @@ -336,6 +336,7 @@ void process_inputs(void ) mplx_select(current_input); adc_in = analogRead(0); + // TODO: New format on stick values model.stick[current_input] = ((float)adc_in - (float)input_cal.min[current_input]) / (float)(input_cal.max[current_input]-input_cal.min[current_input]); if ( model.rev[current_input] ) model.stick[current_input] = 1.0f - model.stick[current_input]; } @@ -370,6 +371,7 @@ void ISR_timer(void) if ( do_channel ) { set_ppm_output( HIGH ); + // TODO: New format on stick values long next_timer = (( chwidht * model.stick[cchannel] ) + chmin); // Do sanity-check of next_timer compared to chmax ... while ( chmax < next_timer ) next_timer--; @@ -388,6 +390,7 @@ void serial_debug() { int current_input; for (current_input=0; current_input<=7; current_input++) { + // TODO: New format on stick values int v = (int)(model.stick[current_input] * 100); Serial.print("Input #"); @@ -528,6 +531,7 @@ void ui_handler() lcd.print(" "); lcd.setCursor(col, row); // Display uses percents, while PPM uses ratio.... + // TODO: New format on stick values int v = (int)(model.stick[current_input] * 100); lcd.print(v); } -- 2.39.2