Update util.c

This commit is contained in:
Candas1 2020-10-27 20:38:19 +01:00 committed by GitHub
parent 5d954a05aa
commit 09b2728168
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -785,7 +785,7 @@ void readCommand(void) {
#endif
#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
cmd2 = CLAMP((adc_buffer.l_rx2 - ADC2_MIN_CAL) * INPUT_MAX / (ADC2_MAX_CAL - ADC2_MIN_CAL), 0, INPUT_MAX); // ADC2
#endif