diff --git a/.gitignore b/.gitignore index 701e96bf..c19f64f3 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ output/ notes.txt + +trash/ diff --git a/internal_filesystem/apps/com.example.camtest/res/mipmap-mdpi/icon_64x64.bin b/internal_filesystem/apps/com.example.camtest/res/mipmap-mdpi/icon_64x64.bin index ddf9eb8d..29afbcf4 100644 Binary files a/internal_filesystem/apps/com.example.camtest/res/mipmap-mdpi/icon_64x64.bin and b/internal_filesystem/apps/com.example.camtest/res/mipmap-mdpi/icon_64x64.bin differ diff --git a/internal_filesystem/main.py b/internal_filesystem/main.py index 319f45f7..00c708ba 100644 --- a/internal_filesystem/main.py +++ b/internal_filesystem/main.py @@ -17,6 +17,7 @@ OFFSET_BATTERY_ICON = -40 CLOCK_UPDATE_INTERVAL = 100 # 10 or even 1 ms doesn't seem to change the framerate but 100ms is enough WIFI_ICON_UPDATE_INTERVAL = 1500 +TEMPERATURE_UPDATE_INTERVAL = 2000 # Color palette DARKPINK = lv.color_hex(0xEC048C) @@ -80,11 +81,16 @@ time_label.set_text("00:00:00.000") time_label.align(lv.ALIGN.LEFT_MID, 0, 0) time_label.set_style_text_color(COLOR_TEXT_WHITE, 0) +temp_label = lv.label(notification_bar) +temp_label.set_text("") +temp_label.align_to(time_label, lv.ALIGN.OUT_RIGHT_MID, PADDING_TINY, 0) +temp_label.set_style_text_color(COLOR_TEXT_WHITE, 0) + # Notification icon (bell) -notif_icon = lv.label(notification_bar) -notif_icon.set_text(lv.SYMBOL.BELL) -notif_icon.align_to(time_label, lv.ALIGN.OUT_RIGHT_MID, PADDING_TINY, 0) -notif_icon.set_style_text_color(COLOR_TEXT_WHITE, 0) +#notif_icon = lv.label(notification_bar) +#notif_icon.set_text(lv.SYMBOL.BELL) +#notif_icon.align_to(time_label, lv.ALIGN.OUT_RIGHT_MID, PADDING_TINY, 0) +#notif_icon.set_style_text_color(COLOR_TEXT_WHITE, 0) # WiFi icon wifi_icon = lv.label(notification_bar) @@ -124,8 +130,14 @@ def update_wifi_icon(timer): else: wifi_icon.add_flag(lv.obj.FLAG.HIDDEN) +import esp32 +def update_temperature(timer): + temp_label.set_text(f"{esp32.mcu_temperature()}°C") + lv.timer_create(update_time, CLOCK_UPDATE_INTERVAL, None) lv.timer_create(update_wifi_icon, WIFI_ICON_UPDATE_INTERVAL, None) +lv.timer_create(update_temperature, TEMPERATURE_UPDATE_INTERVAL, None) + notification_bar.add_event_cb(toggle_drawer, lv.EVENT.CLICKED, None)