|
rcbench
Servo and ESC test bench: panel, IOmcu and shared C
|
The limit run's sessions on the programmer. More...
#include "kst_panel.h"#include <math.h>#include "kst_card.h"#include "kst_port.h"#include "kst_reg.h"#include "supply_screen.h"#include "kst_panel_int.h"Enumerations | |
| enum | { RUN_OP_NONE = 0 , RUN_OP_CONNECT , RUN_OP_WRITE , RUN_OP_LEAVE } |
Functions | |
| static void | run_close_editors (void) |
| Whatever the overlay has open goes: the run's step is no operator's. | |
| kst_prog_msg_id_t | kst_panel_run_connect (bool supply, uint16_t mv, uint16_t ma) |
| static bool | run_edit (kst_field_id_t id, uint16_t raw) |
| A field set for the run's write; false where the model refuses it. | |
| static kst_prog_msg_id_t | run_write2 (kst_field_id_t a, uint16_t va, kst_field_id_t b, uint16_t vb) |
Write two fields, a to va and b to vb, and nothing else. | |
| kst_prog_msg_id_t | kst_panel_run_write (uint16_t left, uint16_t right) |
| kst_prog_msg_id_t | kst_panel_run_pulses (uint16_t lower_dus, uint16_t upper_dus) |
| Write PULSE LOWER and PULSE UPPER and nothing else; as kst_panel_run_write() otherwise. | |
| kst_prog_msg_id_t | kst_panel_run_leave (void) |
| kst_panel_run_t | kst_panel_run_poll (void) |
| Reports how the limit run's step ended and takes the end. | |
| bool | kst_panel_run_no_servo (void) |
| Whether the CONNECT of kst_panel_run_connect() ended with no servo answering. | |
| bool | kst_panel_run_servo (uint16_t angle[2], uint16_t *lo, uint16_t *hi, bool *reversion, unsigned *type, uint16_t pulse_dus[3]) |
| The servo as read. | |
| const char * | kst_panel_run_backup (void) |
| bool | kst_panel_run_ready (void) |
| void | kst_panel_run_begin (void) |
| void | kst_panel_run_end (void) |
| kst_prog_t * | kst_panel_model (void) |
| Gives the model the overlay holds. | |
The limit run's sessions on the programmer.
The limit run's sessions on the programmer for KST and Chaservo servos: the CONNECT, the write and the LEAVE the limit run (servo_limrun.h) asks of the overlay's model, and the poll that reports each step's end. The state and the seam are kst_panel_int.h.
SPDX-License-Identifier: MIT
| kst_prog_t * kst_panel_model | ( | void | ) |
Gives the model the overlay holds.
| const char * kst_panel_run_backup | ( | void | ) |
The file that holds the servo as the run found it; "" for none.
| void kst_panel_run_begin | ( | void | ) |
A run begins: no write of it yet.
| kst_prog_msg_id_t kst_panel_run_connect | ( | bool | supply, |
| uint16_t | mv, | ||
| uint16_t | ma ) |
CONNECT on the SERVO screen's port. With supply, a PD mini answers and the session asks it for mv and ma: its set point as it stands, so the ENTER changes nothing. KST_PROG_MSG_NONE when taken.
| void kst_panel_run_end | ( | void | ) |
The run is over: the programming voltage and current go back to the operator's. The servo as the run found it stays held for RESTORE.
| kst_prog_msg_id_t kst_panel_run_leave | ( | void | ) |
LEAVE.
| bool kst_panel_run_no_servo | ( | void | ) |
Whether the CONNECT of kst_panel_run_connect() ended with no servo answering.
True when the programmer's last message is KST_SES_ERR_NO_SERVO and was said after that call. A message left from before it does not count.
| kst_panel_run_t kst_panel_run_poll | ( | void | ) |
Reports how the limit run's step ended and takes the end.
| kst_prog_msg_id_t kst_panel_run_pulses | ( | uint16_t | lower_dus, |
| uint16_t | upper_dus ) |
Write PULSE LOWER and PULSE UPPER and nothing else; as kst_panel_run_write() otherwise.
| lower_dus | PULSE LOWER, 0.1us |
| upper_dus | PULSE UPPER, 0.1us |
| bool kst_panel_run_ready | ( | void | ) |
The programmer's port is in PWM with no operation under way: a run's CONNECT can start.
| bool kst_panel_run_servo | ( | uint16_t | angle[2], |
| uint16_t * | lo, | ||
| uint16_t * | hi, | ||
| bool * | reversion, | ||
| unsigned * | type, | ||
| uint16_t | pulse_dus[3] ) |
The servo as read.
| angle | out: its two angles; filled also when false is returned, where a servo was read |
| lo | out: the value both angles take by the hard rules, at least |
| hi | out: and at most |
| reversion | out: REVERSION |
| type | out: its type number |
| pulse_dus | out: NEUTRAL, PULSE LOWER and PULSE UPPER in 0.1us, 0 for one not shown |
| kst_prog_msg_id_t kst_panel_run_write | ( | uint16_t | left, |
| uint16_t | right ) |
Write LEFT ANGLE left and RIGHT ANGLE right and nothing else. The run's first write holds the servo as read (kst_prog_run_hold()).