如果断电重启,则将最近一次记录的总耗电量数据作为基数来继续统计耗电量,尽量减小误差。

This commit is contained in:
nhkefus
2025-03-11 11:27:57 +08:00
parent 7af99b3109
commit c26029a4e1

View File

@@ -105,6 +105,8 @@ int application_start(void) {
err = mico_system_init(sys_config);
require_noerr(err, exit);
p_count = user_config->p_count_1_day_ago;
uint8_t mac[8];
mico_wlan_get_mac_address(mac);
sprintf(str_mac, "%02X%02X%02X%02X%02X%02X",