This commit is contained in:
Siwat Sirichai 2023-09-17 00:06:00 +07:00
parent 0a3a39a7e8
commit 893a7e9203
1 changed files with 4 additions and 4 deletions

View File

@ -817,9 +817,9 @@ void lcd_refresh()
void lcd_top_bar_update() void lcd_top_bar_update()
{ {
char time_buffer[15]; char time_buffer[15];
//rtctime_t time = ESPMega_getTime(); rtctime_t time = ESPMega_getTime();
//sprintf(time_buffer, "%02d:%02d",time.hours,time.minutes); sprintf(time_buffer, "%02d:%02d",time.hours,time.minutes);
//panel.writeStr("time.txt", time_buffer); panel.writeStr("time.txt", time_buffer);
panel.writeNum("server.pic", standalone ? 4 : 5); panel.writeNum("server.pic", standalone ? 4 : 5);
panel.writeNum("lan.pic", ETH.linkUp() ? 3 : 2); panel.writeNum("lan.pic", ETH.linkUp() ? 3 : 2);
} }
@ -976,7 +976,7 @@ void set_mqtt_server(String address)
void eeprom_ip_update(uint16_t rom_address, uint8_t byte1, uint8_t byte2, uint8_t byte3, uint8_t byte4) void eeprom_ip_update(uint16_t rom_address, uint8_t byte1, uint8_t byte2, uint8_t byte3, uint8_t byte4)
{ {
uint8_t addressblock[4] = {byte1, byte2, byte3, byte4}; uint8_t addressblock[4] = {byte1, byte2, byte3, byte4};
ESPMega_EEPROM.writeBlock(rom_address, addressblock, 4); ESPMega_EEPROM.writeBlockVerify(rom_address, addressblock, 4);
} }
IPAddress eeprom_ip_retrieve(uint16_t rom_address) IPAddress eeprom_ip_retrieve(uint16_t rom_address)
{ {