fix: initialisation order when starting the simu, first initialise, then read ADC data

This commit is contained in:
gagarinlg
2023-06-25 14:32:39 +02:00
committed by Malte Langermann
parent ae2fdb95bd
commit 78c9ce615e
+2 -2
View File
@@ -122,12 +122,12 @@ void OpenTxSimulator::init()
QMutexLocker lckr(&m_mtxSimuMain);
memset(g_anas, 0, sizeof(g_anas));
simuInit();
if (adcGetMaxInputs(ADC_INPUT_RTC_BAT) > 0) {
auto idx = adcGetInputOffset(ADC_INPUT_RTC_BAT);
setAnalogValue(idx, 800);
}
simuInit();
}
void OpenTxSimulator::start(const char * filename, bool tests)