mirror of
https://github.com/nymurbd/MikroTik-scripts.git
synced 2025-07-14 12:04:31 +02:00
check-health: properly handle voltage value below one
Before this produced division by zero...
This commit is contained in:
parent
34a0d4ab85
commit
7adfd1b670
1 changed files with 3 additions and 0 deletions
|
@ -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");
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue