The MOTOR & ESC screen's drawing: the strip row, the rail with the readouts and the CONTROL card, LIVE's plot or table and the throttle, and the page of the task shown. motor_screen.c holds the state, the commands and the screen's interface (motor_screen.h); motor_live_int.h is what it shares with this file and motor_events.c.
More...
|
|
static gfx_color_t | arm_fill (void) |
| | Green while it will arm, red by the time the fade completes, and white for the flash as the arm takes effect. With nothing held and nothing flashing this is the plain OK or WARN the button has always carried.
|
| static void | draw_arm (gfx_canvas_t *c) |
| | ARM, or DISARM while the bench is armed, in its fill of the moment, on the rail where SERVO has its ARM.
|
| static void | temp_text (char *out, size_t n, const char *label, float v, bool ok) |
| | A temperature as the header line says it: "ESC 44°C", or "ESC --" when nothing has answered.
|
| static void | draw_header (gfx_canvas_t *c, bool on_live) |
| | On LIVE, the poll rate and the link's errors right of PLOT | TABLE, and under them, while the IOmcu has refused a frame, how many; on every task, how hot the three things that get hot, on the line over the rail. MCU is the panel's own die, not the IOmcu's.
|
| static void | draw_derived (gfx_canvas_t *c) |
| | The rated kV, what the motor is actually turning per volt, and what the ratio of the two says about the drivetrain.
|
|
static void | draw_esc_says (gfx_canvas_t *c) |
| | What the ESC says beside what the INA228 measures, while the INA228 is BENCH's source: the ESC's own telemetry voltage and current from the SENSE page, and how far each is from the INA228's, the ESC's less the INA228's. An ESC that reports a current with no sensor behind it shows here as a difference the size of the reading.
|
|
static void | draw_table (gfx_canvas_t *c) |
| | Draws the readings table: a row per channel with its present value and its extreme.
|
| static int | 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_rail_card (gfx_canvas_t *c, gfx_rect_t r, const ui_hero_def_t *def, float value, float peak) |
| | One card of the rail, HERO_H px high: the name and the extreme stacked on the left, the live value in the 32 x 44 numerals, right-aligned with its unit.
|
|
static void | draw_heroes (gfx_canvas_t *c) |
| | The rail: one card per channel, live value over its extreme.
|
|
static void | draw_totals (gfx_canvas_t *c) |
| | What the run has taken out of the pack, on the CONTROL card's title line, right of its tag: STEUERUNG's 9 cells of 8px and the tab's 26.
|
|
static const char * | tag_text (uint8_t tag, char *buf, size_t n) |
| | Writes the tag's text, padded to the widest tag.
|
|
static uint8_t | telemetry_tag (void) |
| | Returns the tag of the telemetry heading: LIVE while the plot is not shown or runs, HELD or IDLE otherwise.
|
| static void | draw_throttle (gfx_canvas_t *c, bool ctrl_moved) |
| | LIVE's throttle card: the readout on the title line, the step keys and the track. A throttle that moved on its own clears the readout's own box and the slider's painted region, not the card: a drag asks for it on every frame. The slider's region is what the widget reports rather than its track, because the thumb and its shadow stand proud of the track.
|
|
static void | render_session (gfx_canvas_t *c, unsigned bit, int buf, const prog_page_set_t *ps) |
| | A session on PROGRAM, full width: the output strip in the strip row, on its text, and the session under it, on its revision.
|
|
static void | render_body (gfx_canvas_t *c, unsigned bit, int buf) |
| | Draws the screen's body into the frame buffer buf: the strip, the page of the task and the rail.
|
| void | mo_render (gfx_canvas_t *c, int buffer_index) |
| | Draws the screen into frame buffer buffer_index.
|
The MOTOR & ESC screen's drawing: the strip row, the rail with the readouts and the CONTROL card, LIVE's plot or table and the throttle, and the page of the task shown. motor_screen.c holds the state, the commands and the screen's interface (motor_screen.h); motor_live_int.h is what it shares with this file and motor_events.c.
SPDX-License-Identifier: MIT
The rated kV, what the motor is actually turning per volt, and what the ratio of the two says about the drivetrain.
The arithmetic is sound and the number is still an estimate, which is why it is labelled EFF rather than efficiency. Terminal voltage splits into the resistive drop and the back-EMF, so rpm/V under load is the rated kV scaled by the fraction of the voltage reaching the back-EMF, and in an ideal motor that fraction is the conversion efficiency exactly.
This motor is not that one. The figure counts copper loss only, so iron loss, friction and windage are missing and it is an upper bound rather than a value. The bench measures pack voltage rather than the motor's terminals, so the ESC's losses are inside it and it describes the drivetrain. And it is only as good as the rated kV, an error in which maps straight into the percentage. docs/Screens.md says so in the words an operator reads.
The rated value comes from the connected ESC when it reports one, and from SET_MOTOR_KV when it does not. Nothing is assumed: with neither, the field is drawn empty and no efficiency is shown, because a guessed kV produces a plausible-looking percentage that is wrong.