From c614b1ac675a7d75f7c5c7095d0c45717879b848 Mon Sep 17 00:00:00 2001 From: 3djc Date: Sat, 21 May 2016 10:19:07 -0700 Subject: [PATCH] Proper implementation of update to monitor cells when not displayed on screen (#3520) --- radio/sdcard/horus/WIDGETS/BattCheck/main.lua | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/radio/sdcard/horus/WIDGETS/BattCheck/main.lua b/radio/sdcard/horus/WIDGETS/BattCheck/main.lua index 0d3b88c47..61aaa1769 100755 --- a/radio/sdcard/horus/WIDGETS/BattCheck/main.lua +++ b/radio/sdcard/horus/WIDGETS/BattCheck/main.lua @@ -297,7 +297,12 @@ local function zoneXLarge(zone) lcd.drawText(zone.zone.x + 270, zone.zone.y + 21, "Live data", RIGHT + SMLSIZE + INVERS + TEXT_COLOR) lcd.drawRectangle(zone.zone.x + 110, zone.zone.y + 110, 160, 40, CUSTOM_COLOR, 1) lcd.drawText(zone.zone.x + 270, zone.zone.y + 93, "Lowest data", RIGHT + SMLSIZE + INVERS + TEXT_COLOR) + return +end +-- This function allow recording of lowest cells when widget is not active +local function background(myZone) + getCels(myZone.options.Sensor) return end @@ -313,4 +318,5 @@ function refresh(myZone) end end -return { name="BattCheck", options=options, create=create, update=update, refresh=refresh } +return { name="BattCheck", options=options, create=create, update=update, background=background, refresh=refresh } +