The drawing of the SERVO screen's pages of rows and the panels they open: SETTINGS' pages and a run's settings with their notes and the save line, the list, the profile warning, the HV warning and SUPPLY's question about a live output.
More...
|
| void | draw_save_line (gfx_canvas_t *c) |
| | Whether the settings reached the card, along the bottom of a page.
|
| static bool | row_unused (const ov_row_t *r) |
| | Whether a row is drawn faint: a test setting the length rule leaves unused, a setting under its lock, a limit run's row it cannot take now.
|
| static void | row_value (const ov_row_t *r, char *buf, size_t n) |
| | A row's value as text.
|
| static void | draw_note (gfx_canvas_t *c, int x, int y, const char *const *lines, int count) |
| | A page's note, NOTE_PITCH px a line, in the faint colour.
|
| bool | servo_in_force_note (char *l1, char *l2, size_t size, uint16_t hz, uint8_t target, uint8_t gpio, bool pwm, int setting) |
| | The OUTPUT page's note while a rate is SERVO_RATE_IN_FORCE: two lines into l1 and l2 of size bytes each, for the rate hz, the drive target / gpio / pwm (as servo_screen_set_drive()) and the PWM TARGET setting setting (SET_SERVO_TARGET: 0 OUTPUTS, 1 PROG PORT, the target the panel asks for). The first line names the target the IOmcu holds, not the setting: "In force: OUTPUTS run at 50Hz.", "In force: PROG PORT GPIO 13 runs at 560Hz.", the port without a known pin, or the target not known (the page not known). With no link it names no rate: "No link: the rate in force is not known.". The second line says "The TARGET chosen is not active." while the setting and the drive differ, "PORT PWM is OFF" while the port renders no pulse, else that a PPM output keeps its own frame. Returns whether the note takes the warning colour: the setting and the drive differ, no link, the target not known, a port without a known pin, or a port with its pulse off. Neither line is written with a NULL buffer or a size of 0, and false is returned.
|
| static void | draw_rate_note (gfx_canvas_t *c, int x, int y) |
| | Whether the frame rate reached the pins, in two lines or more.
|
| void | draw_rows_page (gfx_canvas_t *c) |
| | A page of rows in the page area: SETTINGS' page under its tabs, or a run's settings under the run's name. Its notes, and the save line.
|
| static void | draw_choice (gfx_canvas_t *c) |
| | The list: its title, its choices, the one in force in the accent, and CANCEL.
|
| static gfx_color_t | warn_fill (void) |
| | HOLD TO APPLY's fill: sunk, fading to the danger red across its hold.
|
| void | draw_warn_apply (gfx_canvas_t *c) |
| | The profile warning's HOLD TO APPLY.
|
| static void | warn_frame (gfx_canvas_t *c, gfx_rect_t a, gfx_color_t red) |
| | The red frame of a warning, 3px, around the left column.
|
| static void | draw_warning (gfx_canvas_t *c) |
| | The warning a type or a frame rate that can destroy a servo needs before it is applied: in the danger colour, saying what it is and what it does to a servo not made for it.
|
| void | draw_ask_apply (gfx_canvas_t *c) |
| | The HV warning's HOLD TO APPLY.
|
| static void | draw_hv (gfx_canvas_t *c) |
| | The HV warning: a voltage raised past a standard servo's rating, in the danger colour of the profile warning, saying what it does to a servo not rated for it.
|
| static void | draw_ask (gfx_canvas_t *c) |
| | SUPPLY's question before a set point changes a live output, with its words: the change reaches the load at once. The HV warning where the voltage passes a standard servo's rating.
|
| void | draw_overlay (gfx_canvas_t *c) |
| | The panel open over the left column, if any: the keypad, the keyboard, the question or the HV warning, the profile warning, or the list.
|
The drawing of the SERVO screen's pages of rows and the panels they open: SETTINGS' pages and a run's settings with their notes and the save line, the list, the profile warning, the HV warning and SUPPLY's question about a live output.
What a press on them does, and the rows they draw, are servo_settings_panel.c; the state and the layout they share are servo_screen_int.h.
SPDX-License-Identifier: MIT
| bool servo_in_force_note |
( |
char * | l1, |
|
|
char * | l2, |
|
|
size_t | size, |
|
|
uint16_t | hz, |
|
|
uint8_t | target, |
|
|
uint8_t | gpio, |
|
|
bool | pwm, |
|
|
int | setting ) |
The OUTPUT page's note while a rate is SERVO_RATE_IN_FORCE: two lines into l1 and l2 of size bytes each, for the rate hz, the drive target / gpio / pwm (as servo_screen_set_drive()) and the PWM TARGET setting setting (SET_SERVO_TARGET: 0 OUTPUTS, 1 PROG PORT, the target the panel asks for). The first line names the target the IOmcu holds, not the setting: "In force: OUTPUTS run at 50Hz.", "In force: PROG PORT GPIO 13 runs at 560Hz.", the port without a known pin, or the target not known (the page not known). With no link it names no rate: "No link: the rate in force is not known.". The second line says "The TARGET chosen is not active." while the setting and the drive differ, "PORT PWM is OFF" while the port renders no pulse, else that a PPM output keeps its own frame. Returns whether the note takes the warning colour: the setting and the drive differ, no link, the target not known, a port without a known pin, or a port with its pulse off. Neither line is written with a NULL buffer or a size of 0, and false is returned.
- Parameters
-
- Returns
- whether the note takes the warning colour