From: Siraaj Khandkar Date: Tue, 31 Jul 2018 19:37:18 +0000 (-0400) Subject: Fix abnormal energy status output X-Git-Url: https://git.xandkar.net/?a=commitdiff_plain;h=54dfed9ec22973a1c03828fe590c44ef344594b7;p=khatus.git Fix abnormal energy status output --- diff --git a/bin/khatus_controller b/bin/khatus_controller index d591fe8..d75281e 100755 --- a/bin/khatus_controller +++ b/bin/khatus_controller @@ -284,7 +284,7 @@ function make_status_energy( state, direction_of_change) { } else { direction_of_change = "=" }; - printf("E%s%s%%", direction_of_change, db["energy_percentage"]) + return sprintf("E%s%s%%", direction_of_change, db["energy_percentage"]) } function make_status_mem( total, used, percent, status) {