Skip to content

Commit

Permalink
fix: initialisation order when starting the simu, first initialise, t…
Browse files Browse the repository at this point in the history
…hen read ADC data
  • Loading branch information
gagarinlg committed Jun 24, 2023
1 parent d4f22d5 commit 555b844
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions radio/src/targets/simu/opentxsimulator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 555b844

Please sign in to comment.