Skip to content

Commit

Permalink
testing
Browse files Browse the repository at this point in the history
  • Loading branch information
raphaelscholle committed May 9, 2024
1 parent 9110903 commit 7f46639
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions qml/ui/widgets/GroundPowerWidget.qml
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Expand Down

0 comments on commit 7f46639

Please sign in to comment.