mirror of
https://github.com/RoCry/blozi-etag.git
synced 2025-12-06 09:02:49 +08:00
feat: add cmd: flush epd
This commit is contained in:
Binary file not shown.
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user