Unverified Commit bd4bfe55 authored by Don Gagne's avatar Don Gagne Committed by GitHub

Merge pull request #8341 from dakejahl/pr-fix_preflight_battery_check

Fix PreFlightBatteryCheck issue with NaN
parents 4bf97b5e e4a4c33b
......@@ -25,6 +25,7 @@ PreFlightCheckButton {
property int failurePercent: 40
property bool allowFailurePercentOverride: false
property var _batPercentRemaining: activeVehicle ? activeVehicle.battery.percentRemaining.value : 0
property var _batteryValue: activeVehicle ? activeVehicle.battery.percentRemaining.value : 0
property var _batPercentRemaining: isNaN(_batteryValue) ? 0 : _batteryValue
property bool _batLow: _batPercentRemaining < failurePercent
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment