|
rcbench
Servo and ESC test bench: panel, IOmcu and shared C
|
The SERVO screen's command and the link's reports on it: the state an acknowledged frame rate is shown in, and the rules a kept command and a pause follow (servo_cmd.h). More...
Functions | |
| servo_rate_state_t | servo_rate_in_force (uint16_t minor) |
The state an acknowledged rate is shown in, by the IOmcu's protocol minor minor: SERVO_RATE_IN_FORCE from LINK_MINOR_SERVO_TARGET_RATE (4.19), where the rate reaches the PWM TARGET alone, and SERVO_RATE_IN_FORCE_SURFACES below it. | |
| uint16_t | servo_cmd_pause_root (const servo_cmd_t *c) |
The pause a HOLD c ends when the panel lets it go: the pause its chain rests on (from_pause) when it was posted before an earlier pause's resume was acknowledged, and otherwise its own. | |
| bool | servo_cmd_stale (servo_pause_end_t *e, const servo_cmd_t *c) |
Whether the drive command c (a position, a centre, a sweep or a hold) was asked during the pause e records as let go of, so is stale and is not to be sent: the screen has ended that pause, and the command would hold or move the servo somewhere it no longer shows. | |
| bool | servo_cmd_survives_link_loss (const servo_cmd_t *c) |
| Whether a command kept to be said again may still be said after the link has gone and come back. | |
The SERVO screen's command and the link's reports on it: the state an acknowledged frame rate is shown in, and the rules a kept command and a pause follow (servo_cmd.h).
SPDX-License-Identifier: MIT
| uint16_t servo_cmd_pause_root | ( | const servo_cmd_t * | c | ) |
The pause a HOLD c ends when the panel lets it go: the pause its chain rests on (from_pause) when it was posted before an earlier pause's resume was acknowledged, and otherwise its own.
What the panel records for servo_cmd_stale() and hands to servo_screen_released().
| c | The command to test. NULL is refused. |
| bool servo_cmd_stale | ( | servo_pause_end_t * | e, |
| const servo_cmd_t * | c ) |
Whether the drive command c (a position, a centre, a sweep or a hold) was asked during the pause e records as let go of, so is stale and is not to be sent: the screen has ended that pause, and the command would hold or move the servo somewhere it no longer shows.
The screen asks nothing more of a pause it has left, and commands keep their order, so the first drive command from after the pause retires e; a pause number reused after 65535 more is then not mistaken for it.
| e | The pause record. Cleared (on = false) when c is a drive command that is not stale. Not changed when c is stale or is not a drive command. |
| c | The command to test. |
c is stale and must not be sent, false otherwise, including when e or c is NULL or e is off. | bool servo_cmd_survives_link_loss | ( | const servo_cmd_t * | c | ) |
Whether a command kept to be said again may still be said after the link has gone and come back.
A sweep or a hold may not: both end with the link, on the screen and at the far end, and said again they would start motion nobody asked for. A position is what the screen still shows.
| c | The command to test. NULL is refused. |
| servo_rate_state_t servo_rate_in_force | ( | uint16_t | minor | ) |
The state an acknowledged rate is shown in, by the IOmcu's protocol minor minor: SERVO_RATE_IN_FORCE from LINK_MINOR_SERVO_TARGET_RATE (4.19), where the rate reaches the PWM TARGET alone, and SERVO_RATE_IN_FORCE_SURFACES below it.
| minor | IOmcu protocol minor version, as acknowledged. |
minor at 4.19 or above, SERVO_RATE_IN_FORCE_SURFACES below it. No other state is returned.