mirror of
https://github.com/eworm-de/routeros-scripts.git
synced 2024-05-11 05:55:19 +00:00
check-health: properly handle voltage value below one
Before this produced division by zero...
This commit is contained in:
@@ -19,6 +19,9 @@
|
||||
|
||||
:local FormatVoltage do={
|
||||
:local Voltage [ :tonum $1 ];
|
||||
:if ($Voltage < 10) do={
|
||||
:return ("0." . $Voltage . "V");
|
||||
}
|
||||
:return (($Voltage / 10) . "." . ($Voltage % ($Voltage / 10 * 10)) . "V");
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user