fix: initialisation order when starting the simu, first initialise, then read ADC data
This commit is contained in:
committed by
Malte Langermann
parent
ae2fdb95bd
commit
78c9ce615e
@@ -122,12 +122,12 @@ void OpenTxSimulator::init()
|
|||||||
QMutexLocker lckr(&m_mtxSimuMain);
|
QMutexLocker lckr(&m_mtxSimuMain);
|
||||||
memset(g_anas, 0, sizeof(g_anas));
|
memset(g_anas, 0, sizeof(g_anas));
|
||||||
|
|
||||||
|
simuInit();
|
||||||
|
|
||||||
if (adcGetMaxInputs(ADC_INPUT_RTC_BAT) > 0) {
|
if (adcGetMaxInputs(ADC_INPUT_RTC_BAT) > 0) {
|
||||||
auto idx = adcGetInputOffset(ADC_INPUT_RTC_BAT);
|
auto idx = adcGetInputOffset(ADC_INPUT_RTC_BAT);
|
||||||
setAnalogValue(idx, 800);
|
setAnalogValue(idx, 800);
|
||||||
}
|
}
|
||||||
|
|
||||||
simuInit();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void OpenTxSimulator::start(const char * filename, bool tests)
|
void OpenTxSimulator::start(const char * filename, bool tests)
|
||||||
|
|||||||
Reference in New Issue
Block a user