rcbench
Servo and ESC test bench: panel, IOmcu and shared C
Loading...
Searching...
No Matches
servo_cmd.h
Go to the documentation of this file.
1
12
13#pragma once
14
15#include <stdbool.h>
16#include <stdint.h>
17
18#ifdef __cplusplus
19extern "C" {
20#endif
21
56
58typedef struct {
60 uint16_t value_us;
73 uint16_t min_us;
74 uint16_t max_us;
84 uint16_t slew_per_s;
92 uint16_t frame_hz;
99 uint16_t sweep_kind,
114 bool resume;
120 uint16_t pause_seq;
126 uint16_t from_pause;
130 uint16_t start_seq;
132
147
159
173
186uint16_t servo_cmd_pause_root(const servo_cmd_t *c);
187
189typedef struct {
190 bool on;
191 uint16_t pause_seq;
193
212
224
225#ifdef __cplusplus
226}
227#endif
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 re...
Definition servo_cmd.c:31
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 ...
Definition servo_cmd.c:23
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.
Definition servo_cmd.c:50
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 ...
Definition servo_cmd.c:16
servo_rate_state_t
What became of a frame rate the panel wrote to the SERVO page.
Definition servo_cmd.h:134
@ SERVO_RATE_REFUSED
Definition servo_cmd.h:138
@ SERVO_RATE_IN_FORCE
Definition servo_cmd.h:136
@ SERVO_RATE_UNSENT
Definition servo_cmd.h:135
@ SERVO_RATE_IN_FORCE_SURFACES
Definition servo_cmd.h:143
@ SERVO_RATE_UNSUPPORTED
Definition servo_cmd.h:141
servo_cmd_kind_t
The kind of a command of the SERVO screen.
Definition servo_cmd.h:23
@ SERVO_CMD_RELEASE
Definition servo_cmd.h:33
@ SERVO_CMD_POSITION
Definition servo_cmd.h:25
@ SERVO_CMD_ARM
Definition servo_cmd.h:34
@ SERVO_CMD_HOLD
Definition servo_cmd.h:54
@ SERVO_CMD_NONE
Definition servo_cmd.h:24
@ SERVO_CMD_DISARM
Definition servo_cmd.h:42
@ SERVO_CMD_SWEEP
Definition servo_cmd.h:48
@ SERVO_CMD_CENTRE
Definition servo_cmd.h:26
servo_sweep_from_t
Where the IOmcu's output was when it started a sweep.
Definition servo_cmd.h:214
@ SERVO_SWEEP_FROM_REST
Definition servo_cmd.h:215
@ SERVO_SWEEP_RESUMED
Definition servo_cmd.h:219
@ SERVO_SWEEP_FROM_HERE
Definition servo_cmd.h:216
@ SERVO_SWEEP_FROM_FROZEN
Definition servo_cmd.h:217
A command of the SERVO screen, as the servo link takes it.
Definition servo_cmd.h:58
uint16_t sweep_span
Definition servo_cmd.h:101
uint16_t max_us
Definition servo_cmd.h:74
uint16_t sweep_kind
SERVO_CMD_SWEEP's curve, as the SERVO page takes it (servo_sweep.h): the curve, thousandths of a cycl...
Definition servo_cmd.h:99
uint16_t slew_per_s
Definition servo_cmd.h:84
uint16_t sweep_dwell_ms
Definition servo_cmd.h:102
uint16_t min_us
The range the channel is configured with, carried with the command: centred on the servo's PULSE CENT...
Definition servo_cmd.h:73
uint16_t sweep_mhz
Definition servo_cmd.h:100
uint16_t frame_hz
Definition servo_cmd.h:92
uint16_t value_us
Definition servo_cmd.h:60
bool ends_sweep
This command ends a sweep the screen was running: a HOLD, a finger on the dial, CENTRE.
Definition servo_cmd.h:109
bool resume
SERVO_CMD_SWEEP carrying on the sweep PAUSE held, from where it was held: the panel asks the IOmcu to...
Definition servo_cmd.h:114
servo_cmd_kind_t kind
Definition servo_cmd.h:59
uint16_t start_seq
SERVO_CMD_SWEEP: which sweep command it is, given back with the acknowledgement of a start in servo_s...
Definition servo_cmd.h:130
uint16_t from_pause
The pause this command derives from – a resume of it, a repeat of that resume, a position said again ...
Definition servo_cmd.h:126
uint16_t pause_seq
SERVO_CMD_HOLD: which pause it is, given back with its acknowledgement in servo_screen_sweep_held().
Definition servo_cmd.h:120
A pause the panel has let go of, for servo_cmd_stale().
Definition servo_cmd.h:189