Merge develop into main (#418)

- WiFi code cleanup
- When WifiConnect opens and SSID is filled in, automatically focus on the password field
- When no touch screen is present, toolbar close buttons should be automatically selected
- When `device.py` selects a device, print it on screen
This commit is contained in:
Ken Van Hoeylandt
2025-11-14 23:29:20 +01:00
committed by GitHub
parent a4f4784ed9
commit eba1f8955a
6 changed files with 36 additions and 14 deletions
+9
View File
@@ -1,5 +1,7 @@
#define LV_USE_PRIVATE_API 1 // For actual lv_obj_t declaration
#include <Tactility/TactilityConfig.h>
#include <Tactility/lvgl/Keyboard.h>
#include <Tactility/lvgl/Toolbar.h>
#include <Tactility/service/loader/Loader.h>
@@ -140,6 +142,13 @@ lv_obj_t* toolbar_create(lv_obj_t* parent, const std::string& title) {
toolbar_set_nav_action(obj, LV_SYMBOL_CLOSE, &stop_app, nullptr);
// If we don't have a touch device, we assume there's some other kind of input like a keyboard, an encoder or button control
// In that scenario we want to automatically have the close button selected so the user doesn't have to press the widget selection
// an extra time for every screen.
if (!hal::hasDevice(hal::Device::Type::Touch)) {
lv_group_focus_obj(toolbar->close_button);
}
return obj;
}