diff --git a/GPIO.lua b/GPIO.lua index 1170f87..0c22073 100644 --- a/GPIO.lua +++ b/GPIO.lua @@ -37,6 +37,7 @@ function GPIOOn(gpioId) end if gpioId == 10 then Is_AutoClose = true; + PageLight(LightArr); end end --Push gpio to low @@ -57,6 +58,7 @@ function GPIOOff(gpioId) end if gpioId == 10 then Is_AutoClose = false; + PageLight(LightArr); end end diff --git a/OLED_SSD1306.lua b/OLED_SSD1306.lua index ffcbe80..176868a 100644 --- a/OLED_SSD1306.lua +++ b/OLED_SSD1306.lua @@ -53,6 +53,15 @@ function DrawLight(lightArr) Disp:drawDisc(16*index,56,4,u8g2.U8G2_DRAW_ALL); end end + if Is_AutoClose ~= nil then + if Is_AutoClose then + Disp:setFont(u8g2.font_6x10_tf); + Disp:drawStr(84,64,"Auto"); + else + Disp:setFont(u8g2.font_6x10_tf); + Disp:drawStr(84,64,"Manual"); + end + end end function PageMainScene(wifiName,ipAddress,version)