periodic Update of WebUI
This commit is contained in:
parent
70ea944dc3
commit
acb3c97c02
@ -45,11 +45,13 @@ void processCmdRemoteDebug();
|
||||
void RemotDebug_printSystemInfo();
|
||||
void RemoteDebug_printWifiInfo();
|
||||
void wifiMaintainConnectionTicker_callback();
|
||||
void updateWebUITicker_callback();
|
||||
void IRAM_ATTR trigger_ISR();
|
||||
void LED_Process(tSystem_Status newStatus = sysStat_NOP);
|
||||
void DisplayProcess();
|
||||
|
||||
Ticker WiFiMaintainConnectionTicker(wifiMaintainConnectionTicker_callback, 1000, 0, MILLIS);
|
||||
Ticker UpdateWebUITicker(updateWebUITicker_callback, 5000, 0, MILLIS);
|
||||
|
||||
void setup()
|
||||
{
|
||||
@ -135,6 +137,7 @@ void setup()
|
||||
u8x8.refreshDisplay();
|
||||
|
||||
initWebUI();
|
||||
UpdateWebUITicker.start();
|
||||
}
|
||||
|
||||
void loop()
|
||||
@ -143,6 +146,7 @@ void loop()
|
||||
RunLubeApp(&wheel_pulse);
|
||||
|
||||
WiFiMaintainConnectionTicker.update();
|
||||
UpdateWebUITicker.update();
|
||||
|
||||
DisplayProcess();
|
||||
|
||||
@ -220,6 +224,11 @@ void wifiMaintainConnectionTicker_callback()
|
||||
}
|
||||
}
|
||||
|
||||
void updateWebUITicker_callback()
|
||||
{
|
||||
UpdateWebUI();
|
||||
}
|
||||
|
||||
void trigger_ISR()
|
||||
{
|
||||
wheel_pulse++;
|
||||
|
@ -130,3 +130,8 @@ void initWebUI()
|
||||
|
||||
ESPUI.begin("Souko's ChainLube Mk1");
|
||||
}
|
||||
|
||||
void UpdateWebUI()
|
||||
{
|
||||
ESPUI.print(label_tankRemain, String(LubeConfig.tankRemain_µl / 1000) + " ml" );
|
||||
}
|
@ -7,6 +7,7 @@
|
||||
#include "globals.h"
|
||||
|
||||
void initWebUI();
|
||||
void UpdateWebUI();
|
||||
|
||||
|
||||
#endif
|
Loading…
x
Reference in New Issue
Block a user