mirror of
https://github.com/vicliu624/trail-mate.git
synced 2026-10-15 06:39:55 +00:00
Feature/localization from main (#23)
* feat(ui): add runtime English and Chinese localization * fix(meshtastic): harden t-deck send and ack recovery Align the T-Deck SX1262 setup with the reference firmware, switch critical radio SPI paths to blocking access, and share RX restart state between direct send paths and the radio task so TX-to-RX handoff cannot silently get stuck. Also unify Meshtastic wire transmission through a single helper, keep wire packets for ACK-tracked sends, retry ACK timeouts up to three times, and document the issue #21 repair checklist. Validation: local builds passed for tdeck, tlora_pager_sx1262, lilygo_twatch_s3, and gat562_mesh_evb_pro; clang-format check passed. Testing status: not fully tested on hardware yet. * Refactor LXMF runtime toward full Reticulum alignment Split adapter runtime state into transport, link, and propagation domains. Add pending path request tracking, stronger link teardown semantics, outbound link establishment, deferred link payload flushing, link keepalive/stale handling, and inbound split-resource assembly. Document the authoritative Reticulum/LXMF runtime alignment plan and mark the older device-mode plan as historical context. * feat(web): add pages site and web flasher release flow
This commit is contained in:
@@ -20,6 +20,7 @@ constexpr const char* kTag = "ui-app-runtime";
|
||||
AppScreen* s_active_app = nullptr;
|
||||
AppScreen* s_pending_exit = nullptr;
|
||||
lv_timer_t* s_exit_timer = nullptr;
|
||||
lv_timer_t* s_rebuild_timer = nullptr;
|
||||
bool s_overlay_active = false;
|
||||
|
||||
lv_anim_enable_t transition_anim()
|
||||
@@ -122,6 +123,37 @@ void exit_to_menu_timer_cb(lv_timer_t* timer)
|
||||
ESP_LOGI(kTag, "exit_to_menu_timer_cb complete");
|
||||
#endif
|
||||
}
|
||||
|
||||
void rebuild_active_app_timer_cb(lv_timer_t* timer)
|
||||
{
|
||||
#if LVGL_VERSION_MAJOR >= 9
|
||||
auto* app = static_cast<AppScreen*>(timer ? lv_timer_get_user_data(timer) : nullptr);
|
||||
#else
|
||||
auto* app = static_cast<AppScreen*>(timer ? timer->user_data : nullptr);
|
||||
#endif
|
||||
if (timer)
|
||||
{
|
||||
lv_timer_del(timer);
|
||||
}
|
||||
s_rebuild_timer = nullptr;
|
||||
if (app == nullptr || app != s_active_app || main_screen == nullptr)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
lv_obj_t* parent = lv_obj_get_child(main_screen, 1);
|
||||
if (parent == nullptr)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
app->exit(parent);
|
||||
if (parent != nullptr && child_count(parent) > 0)
|
||||
{
|
||||
lv_obj_clean(parent);
|
||||
}
|
||||
app->enter(parent);
|
||||
}
|
||||
} // namespace
|
||||
|
||||
void set_default_group(lv_group_t* group)
|
||||
@@ -234,6 +266,25 @@ void ui_request_exit_to_menu()
|
||||
}
|
||||
}
|
||||
|
||||
void ui_request_rebuild_active_app()
|
||||
{
|
||||
AppScreen* app = s_active_app;
|
||||
if (app == nullptr || s_pending_exit == app)
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (s_rebuild_timer)
|
||||
{
|
||||
lv_timer_del(s_rebuild_timer);
|
||||
s_rebuild_timer = nullptr;
|
||||
}
|
||||
s_rebuild_timer = lv_timer_create(rebuild_active_app_timer_cb, 1, app);
|
||||
if (s_rebuild_timer)
|
||||
{
|
||||
lv_timer_set_repeat_count(s_rebuild_timer, 1);
|
||||
}
|
||||
}
|
||||
|
||||
void ui_set_overlay_active(bool active)
|
||||
{
|
||||
s_overlay_active = active;
|
||||
|
||||
Reference in New Issue
Block a user