cosmetic: battery related stuff
This commit is contained in:
@@ -43,7 +43,7 @@ static const int s_beep_count[ALERT_TYPE_COUNT] = {
|
||||
0, /* SERVICE_DOWN: triple beep */ /* DISABLED FOR TESTING */
|
||||
2, /* HIGH_TEMP: double beep */
|
||||
0, /* WS_DISCONNECT: single beep */ /* DISABLED FOR TESTING */
|
||||
1, /* CONNECT_OK: single short beep */
|
||||
0, /* CONNECT_OK: single short beep */ /* DISABLED FOR TESTING */
|
||||
};
|
||||
|
||||
static void generate_tone_buffer(void)
|
||||
|
||||
@@ -219,10 +219,12 @@ static void sensor_task(void *arg)
|
||||
s_shtc3->Shtc3_ReadTempHumi(&temp, &humidity);
|
||||
s_shtc3->Shtc3_Sleep();
|
||||
|
||||
float batt_v = Adc_GetBatteryVoltage();
|
||||
uint8_t batt = Adc_GetBatteryLevel();
|
||||
bool charging = Adc_IsCharging();
|
||||
|
||||
if (Lvgl_lock(100)) {
|
||||
dashboard_ui_update_local(temp, humidity, batt);
|
||||
dashboard_ui_update_local(temp, humidity, batt, charging, batt_v);
|
||||
Lvgl_unlock();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user