|
rcbench
Servo and ESC test bench: panel, IOmcu and shared C
|
SPDX-License-Identifier: MIT. More...
Functions | |
| void | openyge_params_reset (openyge_params_t *p) |
| Clear the parameter cache. | |
| void | openyge_params_observe (openyge_params_t *p, uint16_t index, uint16_t value) |
| Record one (index, value) pair from a telemetry frame. | |
| void | openyge_params_begin_writes (openyge_params_t *p) |
| Mark writes outstanding, which withdraws the table until it is re-read. | |
| void | openyge_params_end_writes (openyge_params_t *p) |
| Clear the outstanding-writes mark. | |
| bool | openyge_params_complete (const openyge_params_t *p) |
| True once every index 0..count-1 has been seen and no write is pending. | |
| bool | openyge_params_get (const openyge_params_t *p, uint16_t index, uint16_t *out) |
| Read one. | |
| float | openyge_params_progress (const openyge_params_t *p) |
| 0..1, for a progress bar. | |
| bool | openyge_motor_rpm (const openyge_params_t *p, uint32_t erpm, float *motor_rpm) |
| Mechanical and head RPM (revolutions per minute) from eRPM (electrical RPM) and the gear train. | |
| bool | openyge_head_rpm (const openyge_params_t *p, uint32_t erpm, float *head_rpm) |
| Head rpm from eRPM and the gear train. | |
SPDX-License-Identifier: MIT.
| bool openyge_head_rpm | ( | const openyge_params_t * | p, |
| uint32_t | erpm, | ||
| float * | head_rpm ) |
Head rpm from eRPM and the gear train.
| p | Cache with the pole count and both gear teeth counts. |
| erpm | Electrical rpm. |
| head_rpm | Receives the head rpm. |
| bool openyge_motor_rpm | ( | const openyge_params_t * | p, |
| uint32_t | erpm, | ||
| float * | motor_rpm ) |
Mechanical and head RPM (revolutions per minute) from eRPM (electrical RPM) and the gear train.
False unless the table is complete and the pole count is at least 2. Head speed needs the pinion and main gear teeth too; when either is zero the head figure is not written.
| p | Cache with the pole count. |
| erpm | Electrical rpm. |
| motor_rpm | Receives the motor rpm. |
| void openyge_params_begin_writes | ( | openyge_params_t * | p | ) |
Mark writes outstanding, which withdraws the table until it is re-read.
| p | Cache to update; NULL does nothing. |
| bool openyge_params_complete | ( | const openyge_params_t * | p | ) |
True once every index 0..count-1 has been seen and no write is pending.
| p | Cache to test. |
| void openyge_params_end_writes | ( | openyge_params_t * | p | ) |
Clear the outstanding-writes mark.
| p | Cache to update; NULL does nothing. |
| bool openyge_params_get | ( | const openyge_params_t * | p, |
| uint16_t | index, | ||
| uint16_t * | out ) |
Read one.
False unless the whole table is complete: a half-read table is not the ESC's settings.
| p | Cache to read. |
| index | Parameter index, below the table count. |
| out | Receives the value. |
| void openyge_params_observe | ( | openyge_params_t * | p, |
| uint16_t | index, | ||
| uint16_t | value ) |
Record one (index, value) pair from a telemetry frame.
Ignored while writes are outstanding: a frame already in flight from before a write carries the old value and would overwrite the new one.
| p | Cache to update. |
| index | Parameter index, below OPENYGE_MAX_PARAMS; other values are ignored. |
| value | Parameter value. |
| float openyge_params_progress | ( | const openyge_params_t * | p | ) |
0..1, for a progress bar.
The table fills in about 1.6s at 20Hz and 32 parameters.
| p | Cache to read. |
| void openyge_params_reset | ( | openyge_params_t * | p | ) |
Clear the parameter cache.
| p | Cache to clear; NULL does nothing. |