TB2026-YDS Firmware
Loading...
Searching...
No Matches
Navigator

A fixed-depth stack of screens; the top screen owns input and rendering. More...

Collaboration diagram for Navigator:

Functions

void navigator_push (screen_t *screen)
 Push a screen onto the stack and call its on_enter.
void navigator_pop (void)
 Pop the top screen and call its on_exit. No-op if the stack is empty.
void navigator_tick (ui_event_t event)
 Deliver one input event to the top screen, then render it.
void navigator_render (void)
 Re-render the top screen and the status bar, without an input event.
uint32_t navigator_refresh_ticks (void)
 How long the UI task should wait for input before a live re-render.

Detailed Description

A fixed-depth stack of screens; the top screen owns input and rendering.

Function Documentation

◆ navigator_pop()

void navigator_pop ( void )

Pop the top screen and call its on_exit. No-op if the stack is empty.

◆ navigator_push()

void navigator_push ( screen_t * screen)

Push a screen onto the stack and call its on_enter.

Parameters
screenScreen to activate. Ignored if the stack is full.

◆ navigator_refresh_ticks()

uint32_t navigator_refresh_ticks ( void )

How long the UI task should wait for input before a live re-render.

Returns the top screen's screen_t::refresh_ms as ticks, or portMAX_DELAY when it is 0 (event-driven) or the stack is empty — so a non-live screen blocks forever and costs no periodic wake-ups.

Returns
FreeRTOS tick count to pass to input_get_event() (portMAX_DELAY when no live refresh is wanted).

◆ navigator_render()

void navigator_render ( void )

Re-render the top screen and the status bar, without an input event.

Used by the UI loop to refresh a live screen on its timer tick. No-op if the stack is empty.

◆ navigator_tick()

void navigator_tick ( ui_event_t event)

Deliver one input event to the top screen, then render it.

Parameters
eventInput event to dispatch. No-op if the stack is empty.