|
rcbench
Servo and ESC test bench: panel, IOmcu and shared C
|
SETUP > SENSORS' list. See sensors_rows.h. More...
#include "sensors_rows.h"#include <stdio.h>#include "outputs_screen.h"#include "sense_limit_link.h"#include "settings_screen.h"#include "settings_sensors.h"#include "ui_text.h"#include "ui_theme.h"Functions | |
| void | sensors_rows_set_status (uint16_t word) |
| void | sensors_rows_set_limits (uint16_t word) |
| Sets the LIMIT rows' marks. A change repaints SETUP. | |
| static bool | limit_row (setting_id_t id, int *c) |
| Whether a row is a LIMIT row. | |
| sens_part_t | sensors_rows_status (int a) |
| static bool | fitted (int a) |
| 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_meter (char *buf, size_t n) |
| const char * | sensors_rows_short (char *buf, size_t n) |
| int | sensors_rows_watcher (uint16_t code) |
| void | sensors_rows_publish_watch (void) |
Variables | |
| static uint16_t | s_status |
| static uint16_t | s_limits |
| The limits' marks as the control task last said: bits 0 to 11 the channels, 12 to 15 sense_limit_st_t. | |
SETUP > SENSORS' list. See sensors_rows.h.
SPDX-License-Identifier: MIT
|
static |
Whether a row is a LIMIT row.
| id | the row's setting |
| c | its channel, 0 to 11, for a SENSORS channel row |
| 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.