rcbench
Servo and ESC test bench: panel, IOmcu and shared C
Loading...
Searching...
No Matches
esc_stick_read.c File Reference

Stick programming: the readouts of a run. More...

#include "esc_stick.h"

Functions

const char * esc_stick_reason_text (esc_stick_reason_t r)
 A word or two for the screen.
esc_stick_reason_t esc_stick_stop_reason (uint32_t stops, uint32_t pressed)
 The end stops stops give, pressed of them pressed by an operator, both counted over the same span: STOP when every one was pressed, BENCH STOPPED when any was not, so a stop the bench raised is never hidden by a press that came with it.
bool esc_stick_reason_is_fault (esc_stick_reason_t r)
 Whether a run that ended for r ended because something was not as expected: a reading, the supply, the link, the arm, the ESC, or a stop the bench raised itself.
const char * esc_stick_phase_text (esc_stick_phase_t ph)
 Short text for a run phase.
bool esc_stick_running (const esc_stick_t *e)
 Whether the run is under way: started and neither done nor aborted.
const esc_stick_out_t * esc_stick_out (const esc_stick_t *e)
 What the bench is to do now.
unsigned esc_stick_done_count (const esc_stick_t *e)
 How many selections have been made.
bool esc_stick_unsure (const esc_stick_t *e, unsigned i)
 Whether change i was selected, but the run was cut short before the ESC stored or confirmed it (esc_stick_cut_short()): the selection being stored when the run ended.
unsigned esc_stick_made_count (const esc_stick_t *e)
 The selections made for certain: esc_stick_done_count() less the one esc_stick_unsure() names.
unsigned esc_stick_beeps (const esc_stick_t *e)
 The beeps of the group under way.

Detailed Description

Stick programming: the readouts of a run.

The words for each reason and phase, whether an end lights the red light, and what a run has done so far. See esc_stick.h.

SPDX-License-Identifier: MIT

Function Documentation

◆ esc_stick_beeps()

unsigned esc_stick_beeps ( const esc_stick_t * e)

The beeps of the group under way.

Parameters
eThe run.
Returns
The number of beeps.

◆ esc_stick_done_count()

unsigned esc_stick_done_count ( const esc_stick_t * e)

How many selections have been made.

Parameters
eThe run.
Returns
The number of selections made.

◆ esc_stick_made_count()

unsigned esc_stick_made_count ( const esc_stick_t * e)

The selections made for certain: esc_stick_done_count() less the one esc_stick_unsure() names.

Parameters
eThe run.
Returns
The number of certain selections.

◆ esc_stick_out()

const esc_stick_out_t * esc_stick_out ( const esc_stick_t * e)

What the bench is to do now.

Parameters
eThe run.
Returns
The bench's output for this step.

◆ esc_stick_phase_text()

const char * esc_stick_phase_text ( esc_stick_phase_t ph)

Short text for a run phase.

Parameters
phThe phase.
Returns
A static text.

◆ esc_stick_reason_is_fault()

bool esc_stick_reason_is_fault ( esc_stick_reason_t r)

Whether a run that ended for r ended because something was not as expected: a reading, the supply, the link, the arm, the ESC, or a stop the bench raised itself.

False for the ends an operator chose (STOP pressed, ABORT, leaving the screen) and for none. The screen's red light.

Parameters
rThe end reason.
Returns
true for a fault.

◆ esc_stick_reason_text()

const char * esc_stick_reason_text ( esc_stick_reason_t r)

A word or two for the screen.

Parameters
rThe reason.
Returns
A static text.

◆ esc_stick_running()

bool esc_stick_running ( const esc_stick_t * e)

Whether the run is under way: started and neither done nor aborted.

Parameters
eThe run.
Returns
true while the run is under way.

◆ esc_stick_stop_reason()

esc_stick_reason_t esc_stick_stop_reason ( uint32_t stops,
uint32_t pressed )

The end stops stops give, pressed of them pressed by an operator, both counted over the same span: STOP when every one was pressed, BENCH STOPPED when any was not, so a stop the bench raised is never hidden by a press that came with it.

Parameters
stopsStops counted over the span.
pressedOf those, the ones an operator pressed.
Returns
The end reason.

◆ esc_stick_unsure()

bool esc_stick_unsure ( const esc_stick_t * e,
unsigned i )

Whether change i was selected, but the run was cut short before the ESC stored or confirmed it (esc_stick_cut_short()): the selection being stored when the run ended.

Parameters
eThe run.
iIndex of the change.
Returns
true when the change is unsure.