aboutsummaryrefslogtreecommitdiffstats
path: root/check-health
diff options
context:
space:
mode:
Diffstat (limited to 'check-health')
-rw-r--r--check-health5
1 files changed, 1 insertions, 4 deletions
diff --git a/check-health b/check-health
index d1b45d5..8dfbc16 100644
--- a/check-health
+++ b/check-health
@@ -19,10 +19,7 @@
:local FormatVoltage do={
:local Voltage [ :tonum $1 ];
- :if ($Voltage < 10) do={
- :return ("0." . $Voltage . "V");
- }
- :return (($Voltage / 10) . "." . ($Voltage % ($Voltage / 10 * 10)) . "V");
+ :return (($Voltage / 10) . "." . [ :pick $Voltage ([ :len $Voltage ] - 1) ] . "V");
}
:local CheckHealthCurrent [ / system health get ];