|
rcbench
Servo and ESC test bench: panel, IOmcu and shared C
|
The pack: what each cell is doing relative to the others. More...
Go to the source code of this file.
Data Structures | |
| struct | battery_state_t |
| What the balance lead says of a pack. More... | |
Macros | |
| #define | BATTERY_CELLS_MAX 14 |
| The most cells a pack is drawn with. | |
Functions | |
| void | battery_invalidate (void) |
| const ui_screen_t * | battery_screen (void) |
| The BATTERY screen. | |
| void | battery_screen_set (const battery_state_t *b) |
| What the balance lead says. NULL, or valid false, means nothing is on. | |
| float | battery_screen_spread_mv (void) |
| The widest gap between any two cells. | |
| const gfx_font_t * | battery_screen_cells_font (int cells) |
The face of the cells row under the plot for a pack of cells: 12 x 24 while a voltage ("3.81") fits its cell's slot, else the 10 x 20 face, else 8 x 16. | |
| int | battery_screen_text_lines (const char *text, bool note) |
The lines text takes in the right card's column: the verdict's reason in the 12 x 24 face (the card shows two lines), or a part of the note in the 10 x 20 face. | |
The pack: what each cell is doing relative to the others.
SPDX-License-Identifier: MIT
| void battery_invalidate | ( | void | ) |
Drop the cached chrome, so the next frame repaints it.
| const ui_screen_t * battery_screen | ( | void | ) |
The BATTERY screen.
| const gfx_font_t * battery_screen_cells_font | ( | int | cells | ) |
The face of the cells row under the plot for a pack of cells: 12 x 24 while a voltage ("3.81") fits its cell's slot, else the 10 x 20 face, else 8 x 16.
| cells | The pack's cells; under 1 counts as 1. |
| void battery_screen_set | ( | const battery_state_t * | b | ) |
What the balance lead says. NULL, or valid false, means nothing is on.
| b | The pack, copied; NULL clears it. |
| float battery_screen_spread_mv | ( | void | ) |
The widest gap between any two cells.
| int battery_screen_text_lines | ( | const char * | text, |
| bool | note ) |
The lines text takes in the right card's column: the verdict's reason in the 12 x 24 face (the card shows two lines), or a part of the note in the 10 x 20 face.
| text | The text, as the screen shows it. |
| note | True for the note's face, false for the reason's. |