feat(l2): a turn dial in the navigation bar

An arrow at the target on a round dial whose top is the way you're heading:
turn until it points up. It turns green and the ring doubles when you're
within 12 degrees. The text says how far to turn ("turn right 55") instead of
two bearings to subtract. Standing still there's no course: the arrow greys
out, the top is north and marked red, and the text keeps the bearing.

sim_nav_target() sets a target from the simulator page.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
Jakub
2026-10-25 14:47:51 +01:00
co-authored by Claude Sonnet 5.5
parent c5da3ecdea
commit 15ac4d8f83
3 changed files with 114 additions and 6 deletions
@@ -1410,11 +1410,18 @@ void UITask::simDm() {
}
}
void UITask::simNavTarget(int32_t lat_1e6, int32_t lon_1e6) {
_core->locator.setTarget(0, nullptr, lat_1e6, lon_1e6, "Rynek");
if (_nav_bar) refreshNavBar();
}
void UITask::simUnread() {
_core->simUnreadDemo();
if (_screen == SCR_CHATS) refreshChats();
}
extern "C" EMSCRIPTEN_KEEPALIVE void sim_nav_target(int lat_1e6, int lon_1e6) { if (s_ui) s_ui->simNavTarget(lat_1e6, lon_1e6); }
// Sim tests: straight to a screen by name.
extern "C" EMSCRIPTEN_KEEPALIVE void sim_open(const char* name) {
if (!s_ui) return;