|
rcbench
Servo and ESC test bench: panel, IOmcu and shared C
|
The texts of the Hitec programmer's overlay: the rows' labels, the values as read, the PORT row, the state line and the messages. More...
#include "hitec_panel.h"#include <stdio.h>#include <string.h>#include "hitec_reg.h"#include "link_pages.h"#include "ui_text.h"#include "hitec_panel_int.h"Macros | |
| #define | W_NAME ((uint8_t)HITEC_P_COUNT) |
| The classic model name row, as hitec_panel.c names it. | |
| #define | DEG "\xc2\xb0" |
| The degree sign, UTF-8. | |
Functions | |
| static const char * | series_name (uint8_t series) |
| The series' name. | |
| const char * | hpn_label (const hpn_row_t *r) |
| A row's label as it is drawn now. | |
| const char * | hpn_choice_text (uint8_t id, int32_t value) |
The words of a CHOICE value of id: "CW", "ON". | |
| static void | fmt_value (uint8_t id, uint8_t unit, const hitec_value_t *v, bool with_raw, char *out, size_t n) |
A decoded value in its unit, with the stored value beside it where the two differ and with_raw asks for it. | |
| void | hpn_fmt_param (uint8_t id, int32_t value, char *out, size_t n) |
A value of parameter id in its unit, without the stored value: "30%", "CW", "1500.00us". | |
| const char * | hpn_param_label (uint8_t id) |
The label of parameter id's row in the series in use. | |
| static void | image_value (uint8_t id, const hitec_image_t *img, char *out, size_t n) |
Parameter id of img as a line's value: decoded, or RAW. | |
| void | hpn_change_line (uint8_t id, const hitec_image_t *img, char *out, size_t n) |
"LABEL: was -> now" of parameter id, the servo's value and img's. | |
| bool | hpn_row_edited (const hpn_row_t *r) |
Whether row r shows a value the draft changes. | |
| static void | name_value (char *out, size_t n) |
| The classic model's name: Hitec's, the name cells as read, or "--". | |
| static void | act_value (const hpn_row_t *r, char *out, size_t n) |
| The text on an action row's button. | |
| void | hpn_value_text (const hpn_row_t *r, char *out, size_t n, bool *warn) |
The text in a row's control into out. | |
| bool | hpn_port_unbound (void) |
| Whether the PORT row names no pin: the warning colour. | |
| static void | supply_text (char *out, size_t n) |
The supply a CONNECT asks, or the session's, into out. | |
| bool | hpn_port_line (int i, char *out, size_t n) |
Line i of the PORT row into out. | |
| static void | pwm_line (char *out, size_t n) |
| The state line while the tester has the port. | |
| static void | held_line (char *out, size_t n) |
| The state line while the port is this panel's and nothing runs. | |
| static void | writing_line (char *out, size_t n) |
| The state line while a write runs: the step, the save, the check. | |
| void | hpn_state_line (char *out, size_t n) |
The state line of the SERVO tab into out. | |
| static bool | rec_by_pin (const hitec_prog_msg_t *m) |
| Whether a record message names the record's pin: it names its port where the pin is not known. | |
| static unsigned | rec_num (const hitec_prog_msg_t *m) |
| The number a record line names: the pin, or the port counted from 1. | |
| static void | cut_line (char *out, unsigned kind, unsigned addr) |
The line of a write cut at step kind kind. | |
| static int | write_lines (const hitec_prog_msg_t *m, char out[HITEC_PANEL_MSG_LINES][HITEC_PANEL_LINE]) |
| The lines of a write's message: what it wrote, where it was cut, what an edit refused. | |
| static int | formatted (const hitec_prog_msg_t *m, char out[HITEC_PANEL_MSG_LINES][HITEC_PANEL_LINE]) |
| The lines of a message whose text takes its arguments. | |
| int | hitec_panel_message_lines (const hitec_prog_msg_t *m, char out[HITEC_PANEL_MSG_LINES][HITEC_PANEL_LINE]) |
| A message's lines, in the language in force. | |
Variables | |
| static const int16_t | k_lines [HITEC_PROG_MSG_COUNT][2] |
| A message's first line and, where it has one, its second. | |
The texts of the Hitec programmer's overlay: the rows' labels, the values as read, the PORT row, the state line and the messages.
Hitec is a name or trademark of its owner; it is used here only to say which servos this overlay works with. The state and the seam are hitec_panel_int.h.
SPDX-License-Identifier: MIT
|
static |
The text on an action row's button.
| r | the row |
| out | the text |
| n | bytes at out |
|
static |
The line of a write cut at step kind kind.
| out | the line |
| kind | hitec_step_kind_t, or HITEC_PROG_CUT_CHECK for the read-back |
| addr | the register or cell |
|
static |
A decoded value in its unit, with the stored value beside it where the two differ and with_raw asks for it.
| id | hitec_param_t |
| unit | hitec_unit_t |
| v | the value |
| with_raw | the stored value in brackets |
| out | the text |
| n | bytes at out |
|
static |
The lines of a message whose text takes its arguments.
| m | the message |
| out | the lines |
|
static |
The state line while the port is this panel's and nothing runs.
| out | the text |
| n | bytes at out |
| int hitec_panel_message_lines | ( | const hitec_prog_msg_t * | m, |
| char | out[HITEC_PANEL_MSG_LINES][HITEC_PANEL_LINE] ) |
A message's lines, in the language in force.
| m | the message |
| out | receives the lines |
| void hpn_change_line | ( | uint8_t | id, |
| const hitec_image_t * | img, | ||
| char * | out, | ||
| size_t | n ) |
"LABEL: was -> now" of parameter id, the servo's value and img's.
| id | hitec_param_t |
| img | the image the write leaves |
| out | the text |
| n | bytes at out |
| const char * hpn_choice_text | ( | uint8_t | id, |
| int32_t | value ) |
The words of a CHOICE value of id: "CW", "ON".
| id | hitec_param_t |
| value | the value |
| void hpn_fmt_param | ( | uint8_t | id, |
| int32_t | value, | ||
| char * | out, | ||
| size_t | n ) |
A value of parameter id in its unit, without the stored value: "30%", "CW", "1500.00us".
| id | hitec_param_t |
| value | the decoded value |
| out | the text |
| n | bytes at out |
| const char * hpn_label | ( | const hpn_row_t * | r | ) |
A row's label as it is drawn now.
| r | the row |
| const char * hpn_param_label | ( | uint8_t | id | ) |
The label of parameter id's row in the series in use.
| id | hitec_param_t |
| bool hpn_port_line | ( | int | i, |
| char * | out, | ||
| size_t | n ) |
Line i of the PORT row into out.
| i | 0 or 1 |
| out | the text |
| n | bytes at out |
| bool hpn_port_unbound | ( | void | ) |
Whether the PORT row names no pin: the warning colour.
| bool hpn_row_edited | ( | const hpn_row_t * | r | ) |
Whether row r shows a value the draft changes.
| r | the row |
| void hpn_state_line | ( | char * | out, |
| size_t | n ) |
The state line of the SERVO tab into out.
| out | the text |
| n | bytes at out |
| void hpn_value_text | ( | const hpn_row_t * | r, |
| char * | out, | ||
| size_t | n, | ||
| bool * | warn ) |
The text in a row's control into out.
| r | the row |
| out | the text |
| n | bytes at out |
| warn | set when the value shows raw, as it fits no encoding |
|
static |
Parameter id of img as a line's value: decoded, or RAW.
| id | hitec_param_t |
| img | the image |
| out | the text |
| n | bytes at out |
|
static |
The classic model's name: Hitec's, the name cells as read, or "--".
| out | the text |
| n | bytes at out |
|
static |
The state line while the tester has the port.
| out | the text |
| n | bytes at out |
|
static |
Whether a record message names the record's pin: it names its port where the pin is not known.
| m | the message: arg the pin, reg the port |
|
static |
The number a record line names: the pin, or the port counted from 1.
| m | the message |
|
static |
|
static |
The supply a CONNECT asks, or the session's, into out.
| out | the text |
| n | bytes at out |
|
static |
The lines of a write's message: what it wrote, where it was cut, what an edit refused.
| m | the message |
| out | the lines |
|
static |
The state line while a write runs: the step, the save, the check.
| out | the text |
| n | bytes at out |