fix: full refresh. (#5)

This commit is contained in:
susabolca
2024-04-28 15:16:16 +08:00
committed by GitHub
parent cde3075108
commit d7b6f783f8
3 changed files with 4 additions and 4 deletions

View File

@@ -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;

View File

@@ -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;
}

View File

@@ -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;