1
0
Fork 0
mirror of https://github.com/EdgeTX/edgetx.git synced 2025-07-21 23:35:12 +03:00

Match voltage settings and fix simu giving voltage below default min

This commit is contained in:
Kilrah 2018-05-22 22:27:59 +02:00
parent 7ce17c56a2
commit f0bea027c1
3 changed files with 4 additions and 12 deletions

View file

@ -687,9 +687,7 @@ void SimulatorWidget::restoreRadioWidgetsState()
emit stickModeChange(radioSettings.stickMode);
// TODO : custom voltages
qint16 volts = radioSettings.vBatWarn + 2;
if (firmware->getCapability(Capability::HasBatMeterRange))
volts = (radioSettings.vBatMin + 90) + ((radioSettings.vBatMax + 30) - radioSettings.vBatMin) / 2;
qint16 volts = radioSettings.vBatWarn + 20; // 1V above min
emit inputValueChange(SimulatorInterface::INPUT_SRC_TXVIN, 0, volts);
}