|
rcbench
Servo and ESC test bench: panel, IOmcu and shared C
|
SETUP > SENSORS' list: which SENSORS rows show, the headings over them, and what each fitted part is doing. The list is SETUP's own list renderer (settings_draw.c); this file decides its rows. More...
#include <stdbool.h>#include <stddef.h>#include <stdint.h>#include "gfx.h"#include "sense_limit_link.h"#include "sense_map_link.h"#include "settings.h"Go to the source code of this file.
Functions | |
| void | sensors_rows_set_status (uint16_t word) |
| sens_part_t | sensors_rows_status (int a) |
| void | sensors_rows_set_limits (uint16_t word) |
| Sets the LIMIT rows' marks. A change repaints SETUP. | |
| bool | sensors_rows_listed (setting_id_t id) |
| int | sensors_rows_heading (setting_id_t id) |
| const char * | sensors_rows_title (int a, char *buf, size_t n) |
| const char * | sensors_rows_state (int a) |
| gfx_color_t | sensors_rows_state_color (int a) |
| bool | sensors_rows_unheld (setting_id_t id) |
Whether the row of id is marked. | |
| const char * | sensors_rows_why (setting_id_t id) |
| const char * | sensors_rows_alert (char *buf, size_t n, sense_limit_link_ev_t ev, unsigned ch, uint16_t ma, int watch) |
| Builds the band's line for a SENSE_LIMIT alert, in the panel's language. | |
| const char * | sensors_rows_channel (int c, char *buf, size_t n) |
| const char * | sensors_rows_short (char *buf, size_t n) |
| const char * | sensors_rows_meter (char *buf, size_t n) |
| int | sensors_rows_watcher (uint16_t code) |
| void | sensors_rows_publish_watch (void) |
SETUP > SENSORS' list: which SENSORS rows show, the headings over them, and what each fitted part is doing. The list is SETUP's own list renderer (settings_draw.c); this file decides its rows.
The list: the heading INA3221 PARTS over 0x40 FITTED to 0x43 FITTED, then per fitted part a heading "INA3221 0x4n" with the part's state on its right, over its channels' WATCHES, SHUNT and LIMIT rows. A part not fitted has no heading and no rows.
A row of a part the IOmcu does not read is marked as SETUP marks a value the IOmcu does not hold: its edge and value in the warning colour and a line in place of its help (sensors_rows_why()). That is a part the SENSE_MAP page refused, one with every channel off, one on the INA228's address, and on an IOmcu older than 4.25 every fitted part but the one SENSE reads. A LIMIT row is marked as well while the IOmcu does not hold its limit: owed, refused, or any limit on an IOmcu older than 4.27.
SPDX-License-Identifier: MIT
| const char * sensors_rows_alert | ( | char * | buf, |
| size_t | n, | ||
| sense_limit_link_ev_t | ev, | ||
| unsigned | ch, | ||
| uint16_t | ma, | ||
| int | watch ) |
Builds the band's line for a SENSE_LIMIT alert, in the panel's language.
| buf | where the line goes. |
| n | the size of buf, bytes; UI_ALERT_MAX holds every line. |
| ev | the alert, from sense_limit_link_event(). |
| ch | for EV_OVER the channel, 0 to 11. |
| ma | for EV_OVER the limit it passed, mA, shown in A to 0.01A. |
| watch | for EV_OVER the channel's WATCHES option, said in brackets; none for SENS_W_NONE. |
buf; "" for EV_NONE, a channel past 11, or no buffer. | const char * sensors_rows_channel | ( | int | c, |
| char * | buf, | ||
| size_t | n ) |
Channel c (0 to 11) as the screens name it, "0x41 CH2", into buf; "" for no channel.
| int sensors_rows_heading | ( | setting_id_t | id | ) |
The part whose heading stands above id, 0 to 3: id is the first row of a fitted part. -1 otherwise.
| bool sensors_rows_listed | ( | setting_id_t | id | ) |
Whether SETUP lists id: any id that is not a SENSORS row, a FITTED row, and the channel rows of a fitted part.
| const char * sensors_rows_meter | ( | char * | buf, |
| size_t | n ) |
The servo rail's INA3221 meter as the reports and the LIMIT RUN line name it: the channel watching the tester's target, "INA3221 0x41 CH2", or "INA3221" with none; into buf.
| void sensors_rows_publish_watch | ( | void | ) |
Each programming port's WATCHED BY line on OUTPUTS, from the settings as they stand (outputs_screen_set_port_watch()).
| void sensors_rows_set_limits | ( | uint16_t | word | ) |
Sets the LIMIT rows' marks. A change repaints SETUP.
| word | sense_limit_link_unheld()'s 12 bits in bits 0 to 11, and sense_limit_link_status() in bits 12 to 15. |
| void sensors_rows_set_status | ( | uint16_t | word | ) |
The parts' states, sense_map_link_status()'s word: 4 bits a part, part 0 lowest. A change repaints SETUP. 0 at start: every part SENS_PART_UNKNOWN.
| const char * sensors_rows_short | ( | char * | buf, |
| size_t | n ) |
The same over SERVO's plot and on the TEST card: "INA 0x41 CH2", or "INA3221" with none; into buf.
| const char * sensors_rows_state | ( | int | a | ) |
Part a's state in words, and the colour it is drawn in.
| sens_part_t sensors_rows_status | ( | int | a | ) |
Part a's state as last set.
| const char * sensors_rows_title | ( | int | a, |
| char * | buf, | ||
| size_t | n ) |
Part a's heading, "INA3221 0x4n", into buf.
| bool sensors_rows_unheld | ( | setting_id_t | id | ) |
Whether the row of id is marked.
| id | a setting id. |
| int sensors_rows_watcher | ( | uint16_t | code | ) |
The lowest channel with a shunt on a fitted part whose WATCH is the page code code (LINK_SM_WATCH_*), 0 to 11; -1 for none.
| const char * sensors_rows_why | ( | setting_id_t | id | ) |
The line a marked row shows in place of its help.