The SUPPLY screen's drawing: the strip row, the rail with the readings and the CONTROL card, LIVE's plot or table and set points, SETTINGS' page and the question. supply_screen.c holds the state, the commands and the screen's interface (supply_screen.h); supply_screen_int.h is what it shares with this file and supply_events.c.
More...
|
|
static gfx_color_t | out_fill (void) |
| | Returns the OUTPUT button's fill: the OK green when off, the danger red when on.
|
| static void | draw_out_button (gfx_canvas_t *c) |
| | OUTPUT ON / OFF at the CONTROL card's foot.
|
|
static const char * | mode_text (void) |
| | Returns the mode's name: CV, CC, the tripped or off word, or "--" when the supply does not answer.
|
|
static const char * | mode_line (void) |
| | Returns the mode's explanation line: a held port, a trip, CC or CV; "" when there is none.
|
| void | supply_screen_header_text (char *out, size_t size) |
| | The left text of the header strip: the supply and its pins, the answer and the rate ("PD MINI TX GPIO 12 RX GPIO 13 ONLINE
38400"), 47 characters at most.
|
| static void | draw_header (gfx_canvas_t *c) |
| | The row right of the strip: where the numbers come from, in the label face, and at its right end the range the set points may take, in the fine face. The longest, PD MINI TX GPIO 12 RX GPIO 13 ANTWORTET NICHT, is 47 cells of the label face (470px) and 10.0-21.0V 0.50-5.00A 22 of the fine face (176px): 646px of the 680px the row holds.
|
|
static void | draw_strip (gfx_canvas_t *c) |
| | Draws the task strip, LIVE | SETTINGS, on the background.
|
| static void | num_text (gfx_canvas_t *c, int right, int y, int w, const char *t, gfx_color_t col) |
| | A reading's numerals in the 32 x 44 face, the 20 x 36 one where they are wider than w, right-aligned to right.
|
| static void | draw_card (gfx_canvas_t *c, gfx_rect_t r, const char *label, const char *set, const char *unit, gfx_color_t color, int decimals, float value, const char *extreme, float peak, bool pressed) |
| | One card of the rail, CARD_H px high, as MOTOR & ESC draws them: the name, with the set point in brackets after it when there is one, over the extreme, and the live value in the 32 x 44 numerals, right-aligned with its unit.
|
|
static float | shown_set_v (void) |
| | The set points as the supply reports holding them, or as this screen holds them while it does not answer.
|
|
static float | shown_set_i (void) |
| | Returns the current limit as the supply reports it, or as this screen holds it while the supply does not answer.
|
| static void | draw_cards (gfx_canvas_t *c) |
| | The rail's four cards: VOLT, CURR and PWR with their set points and extremes, and MODE.
|
| static void | draw_table (gfx_canvas_t *c) |
| | TABLE: each reading's set point and its value now, under the header line, in the legend's and the plot's place.
|
| static void | draw_totals (gfx_canvas_t *c) |
| | What the run has taken from the supply, on the CONTROL card's title line, right of its tag: STEUERUNG's 9 cells and the tab's 26px.
|
| static void | draw_setters (gfx_canvas_t *c) |
| | The two set points: the label, the track, and the value in its box at the right end of the controls, in the reading's colour. Held by a programming port the value takes no press, and is drawn faint, as SERVO's SET row draws it.
|
| static void | draw_steps (gfx_canvas_t *c) |
| | The fine steps at both ends of each track, dim while a programming port holds the supply.
|
|
static uint8_t | save_state (void) |
| | Whether the settings reached the medium: 0 saved, 1 waiting for a quiet moment, 2 refused, 3 changed on SETUP and not asked to be saved – which nothing writes until SAVE there, or a change here, asks for it.
|
|
static void | row_value_text (int i, char *buf, size_t n) |
| | Writes the value of SETTINGS' row i with its unit.
|
| static void | draw_settings (gfx_canvas_t *c) |
| | SETTINGS' page in the left column under the strip: the caps and the start values on the left with RESET PD MINI under them, the trips, their help and the confirmations on the right, and the save line at the foot.
|
| static void | draw_confirm (gfx_canvas_t *c) |
| | The question a change to a live output asks: what changes, from what to what, and APPLY or CANCEL; where to turn it off at its foot. OUTPUT OFF and STOP stay where they are.
|
|
static uint8_t | output_tag (void) |
| | The heading says what the output is doing, on either pane: a held run is the plot's to show, so TABLE says IDLE where PLOT says HELD.
|
| void | sup_render (gfx_canvas_t *c, int buffer_index) |
| | A frame: the chrome once per framebuffer, then each part on its own counter.
|
The SUPPLY screen's drawing: the strip row, the rail with the readings and the CONTROL card, LIVE's plot or table and set points, SETTINGS' page and the question. supply_screen.c holds the state, the commands and the screen's interface (supply_screen.h); supply_screen_int.h is what it shares with this file and supply_events.c.
SPDX-License-Identifier: MIT