feat: add cmd: flush epd

This commit is contained in:
reece
2022-06-25 01:15:24 +08:00
parent fd2a50c586
commit dcea1e8c69
5 changed files with 10 additions and 0 deletions

Binary file not shown.

View File

@@ -68,4 +68,7 @@ void cmd_parser(void * p){
else if(inData == 0xE1){// force set an EPD scene
set_EPD_scene(req->dat[1]);
}
else if(inData == 0xE2){// force set an EPD scene
set_EPD_wait_flush();
}
}

View File

@@ -50,6 +50,10 @@ void set_EPD_model(uint8_t model_nr)
void set_EPD_scene(uint8_t scene)
{
epd_scene = scene;
set_EPD_wait_flush();
}
void set_EPD_wait_flush() {
epd_wait_update = 1;
}

View File

@@ -6,6 +6,7 @@
void set_EPD_model(uint8_t model_nr);
void set_EPD_scene(uint8_t scene);
void set_EPD_wait_flush();
void init_epd(void);
uint8_t EPD_read_temp(void);

View File

@@ -122,6 +122,8 @@
addLog("时间设置为: " + localeTimeString + " : dd" + intToHex(unixNow, 4));
await rxTxSendCommand(hexToBytes('dd' +
[intToHex(unixNow, 4), intToHex(year, 2), intToHex(month, 1), intToHex(day, 1), intToHex(week, 1)].join('')));
await rxTxSendCommand(hexToBytes('e2'))
}
async function triggerRxTxCmd(cmd) {