feat: More flexible ADC inputs (#3870)
Co-authored-by: 3djc <lesitewebdejc@hotmail.com> Co-authored-by: Peter Feerick <peter.feerick@gmail.com> Co-authored-by: philmoz <phil.a.mitchell@gmail.com>
This commit is contained in:
co-authored by
3djc
Peter Feerick
philmoz
parent
f5593c44e8
commit
b48e07026d
+4
-4
@@ -227,10 +227,10 @@ void writeHeader()
|
||||
f_putc(',', &g_oLogFile);
|
||||
}
|
||||
|
||||
n_inputs = adcGetMaxInputs(ADC_INPUT_POT);
|
||||
n_inputs = adcGetMaxInputs(ADC_INPUT_FLEX);
|
||||
for (uint8_t i = 0; i < n_inputs; i++) {
|
||||
if (!IS_POT_AVAILABLE(i)) continue;
|
||||
const char* p = analogGetCanonicalName(ADC_INPUT_POT, i);
|
||||
const char* p = analogGetCanonicalName(ADC_INPUT_FLEX, i);
|
||||
while (*p) { f_putc(*(p++), &g_oLogFile); }
|
||||
f_putc(',', &g_oLogFile);
|
||||
}
|
||||
@@ -367,8 +367,8 @@ void logsWrite()
|
||||
f_printf(&g_oLogFile, "%d,", calibratedAnalogs[inputMappingConvertMode(offset + i)]);
|
||||
}
|
||||
|
||||
n_inputs = adcGetMaxInputs(ADC_INPUT_POT);
|
||||
offset = adcGetInputOffset(ADC_INPUT_POT);
|
||||
n_inputs = adcGetMaxInputs(ADC_INPUT_FLEX);
|
||||
offset = adcGetInputOffset(ADC_INPUT_FLEX);
|
||||
|
||||
for (uint8_t i = 0; i < n_inputs; i++) {
|
||||
if (IS_POT_AVAILABLE(i))
|
||||
|
||||
Reference in New Issue
Block a user