mirror of
https://github.com/susabolca/cc2640r2-etag.git
synced 2025-12-06 14:42:48 +08:00
fix: full refresh. (#5)
This commit is contained in:
@@ -405,7 +405,7 @@ void EPD_2IN9_Update_Clock(void)
|
||||
}
|
||||
|
||||
// full update on first start
|
||||
bool full_upd = (clock_last == 0 || l->tm_min == 0) ? true : false;
|
||||
bool full_upd = (clock_last > 60 || l->tm_min == 0) ? true : false;
|
||||
|
||||
// clock started.
|
||||
clock_last = l->tm_min;
|
||||
|
||||
@@ -53,7 +53,7 @@ uint8_t epd_step = EPD_CMD_NC;
|
||||
uint8_t epd_step_data[EPD_STEP_DATA_LEN]; // store parameters
|
||||
|
||||
// the clock refesh on change
|
||||
uint8_t clock_last = -1;
|
||||
uint8_t clock_last = 0xff;
|
||||
|
||||
// BLE data buffer
|
||||
uint8_t ble_data[BLE_DATA_MAX];
|
||||
@@ -312,7 +312,7 @@ void EPD_Command(const uint8_t *cmd, int cmd_len)
|
||||
// display mode change
|
||||
case EPD_CMD_MODE:
|
||||
if (epd_mode != cmd[1]) {
|
||||
clock_last = -1;
|
||||
clock_last = 0xff;
|
||||
epd_mode = cmd[1];
|
||||
need_update = 1;
|
||||
}
|
||||
|
||||
@@ -380,7 +380,7 @@ static bStatus_t EPDService_WriteAttrCB(uint16_t connHandle,
|
||||
EpochLastVal = t;
|
||||
|
||||
// notify EPD to refresh
|
||||
clock_last = -1;
|
||||
clock_last = 0xff;
|
||||
EPDTask_Update();
|
||||
}
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user