|
rcbench
Servo and ESC test bench: panel, IOmcu and shared C
|
The log viewer's private seam between log_viewer_screen.c, the state, the card's listing and paging and the screen's interface, log_viewer_load.c, a file's analysis, data and plot traces, log_viewer_draw.c, the drawing, and log_viewer_events.c, the touch events: the layout the four work on, the state, the plot's traces and the functions one calls in another. Nothing outside shared/ui includes this header; the screen's interface is log_viewer_screen.h. More...
#include <stdbool.h>#include <stdint.h>#include "card_state.h"#include "gfx.h"#include "log_text.h"#include "log_viewer_screen.h"#include "touch_types.h"#include "ui_screen.h"#include "ui_tabs.h"#include "ui_text.h"#include "ui_theme.h"Go to the source code of this file.
Data Structures | |
| struct | lv_state_t |
| The log viewer's state: the browse list and its page of the card, the footer message, the DELETE question, the import's analysis, the plot's samples, window and cursor, and the touches tracked. More... | |
Macros | |
| #define | SCREEN_W UI_PANEL_W |
| The screen's width, UI_PANEL_W px. | |
| #define | SCREEN_H UI_BODY_H |
| The screen's height, UI_BODY_H px: the body under the band. | |
| #define | MAX_FBS 3 |
| Frame buffers the router renders into. | |
| #define | LV_FONT_LABEL (&gfx_font_10x20) |
| The faces of the 1024 x 600 type scale this screen draws in. | |
| #define | LV_FONT_BODY UI_FONT_BODY |
| #define | LV_FONT_FINE UI_FONT_FINE |
| #define | LV_L UI_MARGIN |
| The screen's columns: UI_MARGIN (8px) in from either edge, LV_W (1008px) between. | |
| #define | LV_R (SCREEN_W - UI_MARGIN) |
| #define | LV_W (LV_R - LV_L) |
| #define | FOOT_H 52 |
| Each view's footer row of buttons: FOOT_H (52px) tall, ending 4px above the router's alert band. | |
| #define | FOOT_Y (SCREEN_H - UI_ALERT_H - 4 - FOOT_H) |
| The footer's top. | |
| #define | FOOT_GAP 8 |
| #define | BR_PG_Y 4 |
| The header row, body y 4 to 52: ROOT / USER / BENCH, the folder and the card's name, and PREV and NEXT while the card holds more than one page. | |
| #define | BR_PG_H UI_TAP_MIN |
| #define | BR_PG_W 140 |
| #define | BR_TAB_W 110 |
| #define | BR_TAB_H 40 |
| #define | BR_TABS |
| ROOT, USER, BENCH. | |
| #define | BR_HEAD_X 368 |
| #define | BR_HEAD_TY (BR_PG_Y + (BR_PG_H - 20) / 2) |
| #define | BR_PREV |
| #define | BR_NEXT gfx_rect_make(LV_R - BR_PG_W, BR_PG_Y, BR_PG_W, BR_PG_H) |
| NEXT, over OPEN. | |
| #define | BR_HEAD_END (LV_R - 2 * BR_PG_W - 8 - 8) |
| #define | BR_HEAD_FAR LV_R |
| #define | BR_LIST_Y 60 |
| The file list under the header row, BR_ROWS rows at a pitch of BR_ROW_H under its 30px heading. | |
| #define | BR_LIST |
| The list's panel. | |
| #define | BR_ROW_H 48 |
| #define | BR_ROWS 7 |
| #define | BR_BAR_W 56 |
| The scroll bar along the list's right edge, BR_BAR_W px wide: 8.4mm on the panel at the 0.150mm a pixel ui_layout.h assumes (not measured). | |
| #define | BR_BAR |
| The track. | |
| #define | BR_ROW_X (LV_L + 8) |
| #define | BR_ROW_W (LV_R - 8 - BR_BAR_W - 8 - BR_ROW_X) |
| #define | BR_SIZE_W 100 |
| A row's three columns of the 10 x 20 face, as offsets from the row's left: the name from 16px, the date in a box of 16 cells ("2026-10-26 09:41"), and the size right-aligned in a box of 10 cells (LOG_DIR's) ending 16px short of the row's end. 16px stand between the columns, so the name takes 604px, LOG_VIEWER_NAME_CELLS (60) cells. | |
| #define | BR_DATE_W 160 |
| #define | BR_NAME_IN 16 |
| #define | BR_SIZE_IN (BR_ROW_W - 16 - BR_SIZE_W) |
| #define | BR_DATE_IN (BR_SIZE_IN - 16 - BR_DATE_W) |
| #define | BR_RESCAN gfx_rect_make(LV_L, FOOT_Y, BR_PG_W, FOOT_H) |
| The footer's buttons, 52px tall, in the order browse_event() hit-tests them: RESCAN, DELETE and OPEN 140px wide, DELETE and OPEN under PREV and NEXT; WI-FI and FILES BR_SMALL_W (100px) wide after RESCAN. | |
| #define | BR_SMALL_W 100 |
| #define | BR_WIFI gfx_rect_make(LV_L + BR_PG_W + 8, FOOT_Y, BR_SMALL_W, FOOT_H) |
| WI-FI. | |
| #define | BR_FILES |
| FILES, the card's folders and files (files_screen.h). | |
| #define | BR_OPEN gfx_rect_make(LV_R - BR_PG_W, FOOT_Y, BR_PG_W, FOOT_H) |
| OPEN. | |
| #define | BR_DELETE |
| #define | BR_MSG_X (LV_L + BR_PG_W + 8 + 2 * (BR_SMALL_W + 8) + 8) |
| A message's left edge in the footer: two lines of 28 cells of the 12 x 24 face from FILES to DELETE, the 28 a message about a file declares and the file's name. BR_MSG_LH is a line's pitch. | |
| #define | BR_MSG_LH 24 |
| #define | BR_EMPTY gfx_rect_make(104, 150, 816, 160) |
| The box an empty list shows in its place: two lines of 64 cells of the 12 x 24 face inside 24px margins. | |
| #define | TX_ROW_H 22 |
| The TEXT view: a report's rows in the browse list's panel, TX_ROW_H px apart under its 30px heading, beside its scroll bar. | |
| #define | TX_ROWS 15 |
| #define | TX_COLS 92 |
| #define | TX_ROW_X (BR_ROW_X + 8) |
| #define | TX_BACK gfx_rect_make(LV_L, FOOT_Y, 140, FOOT_H) |
| BACK under the text, 140 x 52px. | |
| #define | BR_BAR_MIN 32 |
| #define | DQ_BOX gfx_rect_make(162, 100, 700, 280) |
| The DELETE question, drawn in place of the list and the footer: a box of 700 x 280px, CANCEL and DELETE 300 x 56px at its foot. | |
| #define | DQ_CANCEL gfx_rect_make(186, 304, 300, 56) |
| #define | DQ_DELETE gfx_rect_make(538, 304, 300, 56) |
| #define | IM_TOP 44 |
| The import: the file's name over two panels, DETECTED 400px wide and the column list 600px, and four footer buttons of 246px. | |
| #define | IM_LEFT gfx_rect_make(LV_L, IM_TOP, 400, FOOT_Y - FOOT_GAP - IM_TOP) |
| DETECTED. | |
| #define | IM_RIGHT |
| The column list. | |
| #define | IM_ROW_H 48 |
| #define | IM_ROWS 7 |
| #define | IM_KEY_LH 24 |
| #define | IM_WARN_LH 22 |
| #define | IM_BTN_Y FOOT_Y |
| #define | IM_BTN_H FOOT_H |
| #define | IM_BTN_W ((LV_W - 3 * 8) / 4) |
| #define | IM_BTN(i) |
The import's footer button i: 0 SEP, 1 NUM, 2 BACK, 3 PLOT. | |
| #define | IM_FAIL gfx_rect_make(44, 150, 936, 160) |
| The box a file that cannot be read shows: 74 cells of the 12 x 24 face inside 24px margins. | |
| #define | PV_SUM_Y 4 |
| The plot: the summary line, the series' chips, the plot's panel and under it a 16px row of time labels 4px down, above the footer. | |
| #define | CHIP_Y 28 |
| #define | CHIP_H 44 |
| #define | CHIP_X LV_L |
| #define | CHIP_W 240 |
| #define | CHIP_GAP 16 |
| #define | PV_TOP (CHIP_Y + CHIP_H + 8) |
| #define | PV_PANEL_H (FOOT_Y - FOOT_GAP - 16 - 4 - PV_TOP) |
| #define | PV_PANEL gfx_rect_make(LV_L, PV_TOP, LV_W, PV_PANEL_H) |
| The panel. | |
| #define | PV_X (LV_L + 8) |
| #define | PV_Y (PV_TOP + 8) |
| #define | PV_W (LV_W - 16) |
| #define | PV_H (PV_PANEL_H - 16) |
| #define | PV_BAND 10 |
| #define | PV_DIV_X 6 |
| #define | PV_DIV_Y 4 |
| #define | PV_POS_Y (PV_Y + PV_H + 2) |
| The bar under the plot that shows where a zoomed view sits. | |
| #define | PV_POS_H 4 |
| #define | PV_MIN_WIN 8 |
| The narrowest window two fingers can zoom to, in samples. | |
| #define | PV_PAN_SLOP 10 |
| With SET_PLOT_PAN on, a finger that moves further than this many pixels from where it touched down pans the zoomed view instead of selecting. | |
| #define | PV_EMPTY (-1) |
| A pixel column with no number in it: drawn as nothing. | |
| #define | PV_BACK gfx_rect_make(LV_L, FOOT_Y, 140, FOOT_H) |
| The plot's footer: BACK, then < and >, 52px tall; the cursor's line in 10 x 20 from PV_LINE_X. | |
| #define | PV_PREV gfx_rect_make(LV_L + 148, FOOT_Y, 96, FOOT_H) |
| #define | PV_NEXT gfx_rect_make(LV_L + 252, FOOT_Y, 96, FOOT_H) |
| #define | PV_LINE_X (LV_L + 364) |
| #define | PV_NONE gfx_rect_make(104, 150, 816, 120) |
| The box the plot shows with nothing loaded: 64 cells of the 12 x 24 face inside 24px margins. | |
| #define | LV_MSG_MAX 160 |
| The footer message's longest text, bytes with its NUL: a text of the table with a LOG_VIEWER_NAME_MAX name in it. | |
| #define | s lv_s |
| Short name for lv_s inside the viewer's files. | |
Enumerations | |
| enum | view_t { VIEW_BROWSE = 0 , VIEW_IMPORT , VIEW_PLOT , VIEW_TEXT } |
| The view on screen. | |
| enum | lv_msg_kind_t { LV_MSG_NONE = 0 , LV_MSG_TEXT , LV_MSG_ERR } |
| What the footer message holds. More... | |
Functions | |
| void | lv_point (log_viewer_tab_t tab) |
Points the I/O at the folder of tab, for the call that follows. | |
| const char * | lv_volume_now (void) |
| Returns the card's name as the I/O reports it now. | |
| unsigned | lv_mounts_now (void) |
| Returns the I/O's mount number now. | |
| const char * | lv_page_edge (int sign) |
| Returns the entry on the page that log_name_rank() puts first or last: the edges PREV, NEXT and RESCAN name. | |
| void | lv_read_page (log_page_dir_t dir, const char *key) |
Read the page dir and key name, and select its newest run. | |
| void | lv_rescan (void) |
| Reads the page on screen again: the first page from the top, any other from its first entry; another card's name reads from its first page. | |
| bool | lv_paged (void) |
| Returns whether the card holds more than the page shows, either side of it. | |
| bool | lv_can_prev (void) |
| Returns whether a page precedes this one. | |
| bool | lv_can_next (void) |
| Returns whether a page follows this one. | |
| void | lv_drop_data (void) |
| Frees the plot's samples and clears the cursor. | |
| bool | lv_can_delete (void) |
| Returns whether DELETE is offered: the I/O can delete and a file is selected. | |
| void | lv_bar_thumb (int *y, int *h) |
| The browse list's thumb (lv_bar_thumb_of()). | |
| int | lv_bar_scroll_at (int top) |
The browse list's scroll for a thumb at top (lv_bar_scroll_of()). | |
| void | lv_bar_thumb_of (int total, int visible, int scroll, int *y, int *h) |
| The thumb of a scroll bar on BR_BAR: the whole track while every row shows. | |
| int | lv_bar_scroll_of (int total, int visible, int top) |
The scroll that puts a thumb's top on BR_BAR nearest top. | |
| int | lv_text_total (void) |
| Rows the TEXT view scrolls through: the text's, and the line that says it was cut. | |
| void | lv_close_text (void) |
| Leave the TEXT view for the list and free the report's text. | |
| void | lv_say (ui_text_id_t id, const char *name) |
The footer message says id, a refusal or a failure. | |
| void | lv_say_err (log_err_t err) |
The footer message says the reader's verdict err, a failure. | |
| void | lv_quiet (void) |
| The footer message says nothing. | |
| const char * | lv_message (char *buf, size_t n) |
| The footer message in the language showing. | |
| const char * | lv_delim_text (char delimiter) |
| Returns a delimiter's name in the language showing. | |
| void | lv_run_analysis (void) |
| Analyses the open file with the chosen delimiter and number convention, keeping the picked columns by name. | |
| void | lv_compute_spans (void) |
| Reduces the window's samples to a minimum and maximum row per pixel column and series, and the series' ranges. | |
| void | lv_load_data (void) |
| Loads the picked columns of the open file into the plot's samples. | |
| void | lv_open_selected (void) |
| Opens the selected row: a CSV file to the import view, a report to the TEXT view; a folder or an oversized file is refused with a message. | |
| void | lv_render (gfx_canvas_t *c, int buffer_index) |
Draws the view on screen into frame buffer buffer_index. | |
| void | lv_event (const touch_event_t *e) |
| Takes a touch event for the view on screen. | |
Variables | |
| lv_state_t | lv_s |
| The viewer's state, in log_viewer_screen.c. | |
| const ui_color_id_t | lv_series_color [LOG_MAX_SERIES] |
| Colour id of each plot series. | |
| int16_t | lv_span [LOG_MAX_SERIES][PV_W][2] |
| Per series and pixel column, the plot's minimum and maximum row, filled by lv_compute_spans(). | |
| gfx_color_t | lv_band [PV_W *PV_BAND] |
| One band of PV_BAND rows of the plot, drawn at a time. | |
| float | lv_lo [LOG_MAX_SERIES] |
| Per series, the lowest value in the window. | |
| float | lv_hi [LOG_MAX_SERIES] |
| Per series, the highest value in the window. | |
| const log_viewer_tab_t | lv_tab_at [LOG_TAB_COUNT] |
| Folder tab shown for each tab index. | |
The log viewer's private seam between log_viewer_screen.c, the state, the card's listing and paging and the screen's interface, log_viewer_load.c, a file's analysis, data and plot traces, log_viewer_draw.c, the drawing, and log_viewer_events.c, the touch events: the layout the four work on, the state, the plot's traces and the functions one calls in another. Nothing outside shared/ui includes this header; the screen's interface is log_viewer_screen.h.
Included last: its layout macros have short names (FOOT_Y, PV_W) and it names the state s, which no header included after it may meet. What one file calls or reads in another carries the prefix lv_.
SPDX-License-Identifier: MIT
| #define BR_BAR |
The track.
| #define BR_BAR_MIN 32 |
the scroll bar thumb's least height, px
| #define BR_BAR_W 56 |
The scroll bar along the list's right edge, BR_BAR_W px wide: 8.4mm on the panel at the 0.150mm a pixel ui_layout.h assumes (not measured).
The track runs the height of the rows, and the thumb's share of it is the rows' share of the page. A row runs from the list's left inset to 8px short of the bar.
| #define BR_DATE_IN (BR_SIZE_IN - 16 - BR_DATE_W) |
date's left
| #define BR_DATE_W 160 |
16 cells.
| #define BR_DELETE |
DELETE.
| #define BR_FILES |
FILES, the card's folders and files (files_screen.h).
| #define BR_HEAD_FAR LV_R |
The row's right end.
| #define BR_HEAD_X 368 |
The folder's left.
| #define BR_LIST |
| #define BR_LIST_Y 60 |
The file list under the header row, BR_ROWS rows at a pitch of BR_ROW_H under its 30px heading.
A row is drawn BR_ROW_H - 4 (44) px tall; the pitch, 48px, is what a finger hits, UI_TAP_MIN. The list is 372px tall: seven rows under the heading take 366px of it. A row shows the file's name, its date and, right-aligned, its size.
| #define BR_MSG_LH 24 |
A line's pitch.
| #define BR_NAME_IN 16 |
name's left
| #define BR_PG_H UI_TAP_MIN |
PREV and NEXT, 48px.
| #define BR_PG_W 140 |
Their width.
| #define BR_PG_Y 4 |
The header row, body y 4 to 52: ROOT / USER / BENCH, the folder and the card's name, and PREV and NEXT while the card holds more than one page.
PREV and NEXT are 140 x 48px over DELETE and OPEN. The tabs are 110 x 40px, 4px apart, centred on the row; ui_tabs draws its trough 3px round them. The folder follows from BR_HEAD_X and the card's name ends the row, right-aligned: at BR_HEAD_END with PREV and NEXT showing, at BR_HEAD_FAR without them. BR_HEAD_X to BR_HEAD_END is 352px, 35 cells of the 10 x 20 face: an 11-character volume label and a 17-character folder with the 16px between them.
| #define BR_PREV |
| #define BR_ROW_H 48 |
A row's pitch, UI_TAP_MIN.
| #define BR_ROW_X (LV_L + 8) |
A row's left.
| #define BR_ROWS 7 |
The rows the list shows at once.
| #define BR_SMALL_W 100 |
WI-FI's and FILES' width.
| #define BR_TAB_H 40 |
Its height.
| #define BR_TAB_W 110 |
A folder tab's width.
| #define BR_TABS |
| #define CHIP_GAP 16 |
Between two chips.
| #define CHIP_H 44 |
A chip's height.
| #define CHIP_W 240 |
A chip's width.
| #define CHIP_X LV_L |
The first chip's left.
| #define CHIP_Y 28 |
The chips' top.
| #define DQ_CANCEL gfx_rect_make(186, 304, 300, 56) |
CANCEL.
| #define DQ_DELETE gfx_rect_make(538, 304, 300, 56) |
DELETE.
| #define FOOT_GAP 8 |
Above the footer, px.
| #define FOOT_H 52 |
Each view's footer row of buttons: FOOT_H (52px) tall, ending 4px above the router's alert band.
The alert band covers the bottom UI_ALERT_H (44) px of the 540px body while an alert shows and takes the touches there: nothing that acts sits under it. The footer is body y 440 to 491; the band starts at 496. FOOT_GAP is the room between what a view shows above the footer and the footer.
| #define IM_BTN | ( | i | ) |
The import's footer button i: 0 SEP, 1 NUM, 2 BACK, 3 PLOT.
| #define IM_BTN_H FOOT_H |
Its height.
| #define IM_BTN_W ((LV_W - 3 * 8) / 4) |
246px.
| #define IM_BTN_Y FOOT_Y |
The footer's top.
| #define IM_KEY_LH 24 |
DETECTED's key rows' pitch.
| #define IM_RIGHT |
| #define IM_ROW_H 48 |
A column row's pitch.
| #define IM_ROWS 7 |
(388 - 30) / 48: seven rows.
| #define IM_TOP 44 |
The import: the file's name over two panels, DETECTED 400px wide and the column list 600px, and four footer buttons of 246px.
DETECTED holds a 16-character key and a 20-cell value on one row of the 10 x 20 face, and its warnings break into lines of 36 cells. The column list shows IM_ROWS rows at a pitch of IM_ROW_H, drawn 4px shorter.
| #define IM_WARN_LH 22 |
A warning line's pitch.
| #define LV_FONT_BODY UI_FONT_BODY |
12 x 24: prose.
| #define LV_FONT_FINE UI_FONT_FINE |
8 x 16: the plot's figures.
| #define LV_FONT_LABEL (&gfx_font_10x20) |
The faces of the 1024 x 600 type scale this screen draws in.
LV_FONT_LABEL (10 x 20) for every label, button, row, value, warning and the cursor line; LV_FONT_BODY (12 x 24) for prose read at a distance: the empty list's lines, the DELETE question, the file messages in the footer and the boxes that say why nothing shows; LV_FONT_FINE (8 x 16) for the plot's data figures: the time axis and the series' ranges.
| #define PV_BAND 10 |
Rows drawn at a time.
| #define PV_DIV_X 6 |
Grid columns.
| #define PV_DIV_Y 4 |
Grid rows.
| #define PV_H (PV_PANEL_H - 16) |
Its height, 316px.
| #define PV_LINE_X (LV_L + 364) |
The cursor's line.
| #define PV_POS_H 4 |
Its height.
| #define PV_SUM_Y 4 |
The plot: the summary line, the series' chips, the plot's panel and under it a 16px row of time labels 4px down, above the footer.
The chips are CHIP_W x CHIP_H (240 x 44) px, CHIP_GAP apart, from y CHIP_Y. The plot is PV_W x PV_H (992 x 316) px inside its panel; PV_BAND rows of it are drawn at a time. The summary line's top.
| #define PV_W (LV_W - 16) |
Its width, 992px.
| #define PV_X (LV_L + 8) |
The plot's left column.
| #define PV_Y (PV_TOP + 8) |
Its top row.
| #define TX_COLS 92 |
cells a text row holds
| #define TX_ROW_H 22 |
The TEXT view: a report's rows in the browse list's panel, TX_ROW_H px apart under its 30px heading, beside its scroll bar.
A row is TX_COLS cells of the 10 x 20 face, 920px, from 8px into the browse row's box to 8px short of the bar. The thumb is BR_BAR_MIN px at least: a report of 400 rows would make it 12. BACK stands where the plot's BACK does. the pitch of a text row, px
| #define TX_ROW_X (BR_ROW_X + 8) |
a text row's left edge
| #define TX_ROWS 15 |
text rows on screen
| enum lv_msg_kind_t |
| int lv_bar_scroll_at | ( | int | top | ) |
The browse list's scroll for a thumb at top (lv_bar_scroll_of()).
| top | The thumb's top the finger asks for. |
| int lv_bar_scroll_of | ( | int | total, |
| int | visible, | ||
| int | top ) |
The scroll that puts a thumb's top on BR_BAR nearest top.
| total | Rows of the list. |
| visible | Rows on screen. |
| top | The thumb's top the finger asks for. |
total - visible. | void lv_bar_thumb | ( | int * | y, |
| int * | h ) |
The browse list's thumb (lv_bar_thumb_of()).
| y | Takes the thumb's top. |
| h | Takes its height. |
| void lv_bar_thumb_of | ( | int | total, |
| int | visible, | ||
| int | scroll, | ||
| int * | y, | ||
| int * | h ) |
The thumb of a scroll bar on BR_BAR: the whole track while every row shows.
| total | Rows of the list. |
| visible | Rows on screen. |
| scroll | The first row on screen. |
| y | Takes the thumb's top. |
| h | Takes its height, BR_BAR_MIN px at least. |
| bool lv_can_delete | ( | void | ) |
Returns whether DELETE is offered: the I/O can delete and a file is selected.
| bool lv_can_next | ( | void | ) |
Returns whether a page follows this one.
| bool lv_can_prev | ( | void | ) |
Returns whether a page precedes this one.
| void lv_close_text | ( | void | ) |
Leave the TEXT view for the list and free the report's text.
The text is up to 32KiB of the file; the list does not need it, and OPEN reads it again.
| const char * lv_delim_text | ( | char | delimiter | ) |
Returns a delimiter's name in the language showing.
| delimiter | ';', ',', tab or '|' |
| void lv_event | ( | const touch_event_t * | e | ) |
Takes a touch event for the view on screen.
| e | the event |
| const char * lv_message | ( | char * | buf, |
| size_t | n ) |
The footer message in the language showing.
Word the footer message into buf (log_viewer_int.h).
| buf | takes the message; never NULL |
| n | bytes at buf, 1 or more, LV_MSG_MAX for the longest |
buf, "" for no messageThe footer message in the language showing.
| unsigned lv_mounts_now | ( | void | ) |
Returns the I/O's mount number now.
| const char * lv_page_edge | ( | int | sign | ) |
Returns the entry on the page that log_name_rank() puts first or last: the edges PREV, NEXT and RESCAN name.
| sign | 1 for the first entry, -1 for the last |
| bool lv_paged | ( | void | ) |
Returns whether the card holds more than the page shows, either side of it.
| void lv_point | ( | log_viewer_tab_t | tab | ) |
Points the I/O at the folder of tab, for the call that follows.
| tab | the folder tab |
| void lv_quiet | ( | void | ) |
The footer message says nothing.
Clear the footer message (log_viewer_int.h).
The footer message says nothing.
| void lv_read_page | ( | log_page_dir_t | dir, |
| const char * | key ) |
Read the page dir and key name, and select its newest run.
Pages are cut from the top, LOG_VIEWER_MAX_FILES at a time. A page before the key that starts less than a page from the top is the first page, read again from the top: a run recorded since the key was read stands ahead of it, and so does nothing when everything ahead of the key has gone. A page that comes back empty from a card that is not, is a page past the end: the card has fewer entries than when the key was read, after a DELETE or behind the screen's back. The last page is read instead, as the pages from the first one cut it: what is left of the count after whole pages. The newest is the highest number on the page, a report included.
| dir | Which side of key the page is on. |
| key | The name at the page's edge; "" or NULL for the top. |
| void lv_render | ( | gfx_canvas_t * | c, |
| int | buffer_index ) |
Draws the view on screen into frame buffer buffer_index.
| c | canvas drawn on |
| buffer_index | the frame buffer, 0 to MAX_FBS - 1 |
| void lv_say | ( | ui_text_id_t | id, |
| const char * | name ) |
The footer message says id, a refusal or a failure.
Keep id and name as the footer message (log_viewer_int.h).
The message keeps the ID and the name, and lv_message() words it in the language showing, so a change of SET_LANGUAGE rewords it.
| id | the text: LOG_CANNOT_OPEN, LOG_IS_FOLDER, LOG_TOO_BIG, LOG_CANNOT_DELETE and LOG_DELETED format name; any other is shown as it is |
| name | the file's name, or NULL |
The footer message says id, a refusal or a failure.
| void lv_say_err | ( | log_err_t | err | ) |
The footer message says the reader's verdict err, a failure.
Keep err as the footer message (log_viewer_int.h).
| err | the verdict of log_csv_analyse(), log_csv_build() or log_text_load() |
The footer message says the reader's verdict err, a failure.
| int lv_text_total | ( | void | ) |
Rows the TEXT view scrolls through: the text's, and the line that says it was cut.
| const char * lv_volume_now | ( | void | ) |
Returns the card's name as the I/O reports it now.