1
0
Fork 0
mirror of https://github.com/EdgeTX/edgetx.git synced 2025-07-22 07:45: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

@ -86,13 +86,7 @@ GeneralSettings::GeneralSettings()
vBatMin = -5; //8,5V
vBatMax = -5; //11,5V
}
else if (IS_HORUS_X10(board)) {
// Lipo 2S
vBatWarn = 66;
vBatMin = -28; // 6.2V
vBatMax = -38; // 8.2V
}
else if (IS_TARANIS_XLITE(board)) {
else if (IS_TARANIS_XLITE(board) || IS_HORUS_X10(board)) {
vBatWarn = 66;
vBatMin = -23; // 6.7V
vBatMax = -37; // 8.3V

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);
}

View file

@ -420,8 +420,8 @@ extern volatile uint32_t pwm_interrupt_count;
#if defined(PCBX10)
// Lipo 2S
#define BATTERY_WARN 66 // 6.6V
#define BATTERY_MIN 62 // 6.2V
#define BATTERY_MAX 82 // 8.2V
#define BATTERY_MIN 67 // 6.7V
#define BATTERY_MAX 83 // 8.3V
#else
// NI-MH 9.6V
#define BATTERY_WARN 87 // 8.7V