mirror of
https://github.com/opentx/opentx.git
synced 2025-07-17 05:15:18 +03:00
Fixes #1917
This commit is contained in:
parent
cde0824f05
commit
274303a658
7 changed files with 1870 additions and 1751 deletions
|
@ -940,10 +940,20 @@ void startSimulation(QWidget * parent, RadioData & radioData, int modelIdx)
|
|||
}
|
||||
BoardEnum board = GetCurrentFirmware()->getBoard();
|
||||
SimulatorDialog * sd;
|
||||
if (IS_TARANIS(board))
|
||||
if (IS_TARANIS(board)) {
|
||||
for (int i=0; i<GetCurrentFirmware()->getCapability(Pots); i++) {
|
||||
if (radioData.generalSettings.potConfig[i] != GeneralSettings::POT_NONE) {
|
||||
flags |= (SIMULATOR_FLAGS_S1 << i);
|
||||
if (radioData.generalSettings.potConfig[1] == GeneralSettings::POT_MULTIPOS_SWITCH ) {
|
||||
flags |= (SIMULATOR_FLAGS_S1_MULTI << i);
|
||||
}
|
||||
}
|
||||
}
|
||||
sd = new SimulatorDialogTaranis(parent, si, flags);
|
||||
else
|
||||
}
|
||||
else {
|
||||
sd = new SimulatorDialog9X(parent, si, flags);
|
||||
}
|
||||
QByteArray eeprom(GetEepromInterface()->getEEpromSize(), 0);
|
||||
GetEepromInterface()->save((uint8_t *)eeprom.data(), *simuData, GetCurrentFirmware()->getCapability(SimulatorVariant));
|
||||
delete simuData;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue