Update util.c
This commit is contained in:
parent
5d954a05aa
commit
09b2728168
|
@ -785,7 +785,7 @@ void readCommand(void) {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef ADC2_MID_POT
|
#ifdef ADC2_MID_POT
|
||||||
cmd1 = addDeadBand(adc_buffer.l_rx2, ADC_DEADBAND, ADC1_MIN_CAL, ADC1_MID_CAL, ADC1_MAX_CAL, INPUT_MIN, INPUT_MAX);
|
cmd2 = addDeadBand(adc_buffer.l_rx2, ADC_DEADBAND, ADC1_MIN_CAL, ADC1_MID_CAL, ADC1_MAX_CAL, INPUT_MIN, INPUT_MAX);
|
||||||
#else
|
#else
|
||||||
cmd2 = CLAMP((adc_buffer.l_rx2 - ADC2_MIN_CAL) * INPUT_MAX / (ADC2_MAX_CAL - ADC2_MIN_CAL), 0, INPUT_MAX); // ADC2
|
cmd2 = CLAMP((adc_buffer.l_rx2 - ADC2_MIN_CAL) * INPUT_MAX / (ADC2_MAX_CAL - ADC2_MIN_CAL), 0, INPUT_MAX); // ADC2
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue