From 7f46639e520b152c94b45530cd1bf4cfac8a0933 Mon Sep 17 00:00:00 2001 From: Raphael <68374617+raphaelscholle@users.noreply.github.com> Date: Fri, 10 May 2024 00:45:32 +0200 Subject: [PATCH] testing --- qml/ui/widgets/GroundPowerWidget.qml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/qml/ui/widgets/GroundPowerWidget.qml b/qml/ui/widgets/GroundPowerWidget.qml index 52a3a3d8a..b58930a10 100644 --- a/qml/ui/widgets/GroundPowerWidget.qml +++ b/qml/ui/widgets/GroundPowerWidget.qml @@ -177,7 +177,15 @@ BaseWidget { onTriggered: { var currentVoltage = _ohdSystemGround.ina219_voltage_millivolt; + if (_ohdSystemGround.ina219_current_milliamps===1338) { + var percentage = 90; + } + else if (_ohdSystemGround.ina219_current_milliamps===1337) { + var percentage = 100; + } + else { var percentage = calculateBatteryPercentage(currentVoltage); + } settings.ground_voltage_in_percent = percentage; } }