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

The hold pages of the Hitec programmer's overlay: LEAVE, RELEASE PORT, ENABLE WRITE TO SERVO, WRITE n VALUES, CHECK THIS CHANGE, REPAIR CHECKSUM and RESTORE, what each says before it acts, and what its hold does. More...

#include "hitec_panel.h"
#include <stdio.h>
#include "hitec_reg.h"
#include "ui_text.h"
#include "ui_widgets.h"
#include "hitec_panel_int.h"

Functions

void hpn_page_open (int kind, bool danger, const char *title, const char *apply)
 Opens a hold page of kind.
void hpn_page_add (unsigned level, const char *s)
 Adds a line to the open page at level.
void hpn_page_leave (void)
 The page of LEAVE.
void hpn_page_release (void)
 The page of RELEASE PORT.
static bool classic (void)
 Whether the series in use is the classic one.
static bool moves_horn (const hitec_image_t *to)
 Whether to moves the horn or turns it round: it changes the direction, the centre or an end point.
static void page_values (const hitec_image_t *to, int room)
 The values to changes, in the order of the tabs, on at most room lines: more than fit leave the last line to their count. A value that breaks a soft rule is in the warning colour.
static void page_record (void)
 Where the values before a write are recorded: the card or RAM.
void hpn_page_write (void)
 The page of WRITE n VALUES.
void hpn_page_enable (void)
 The page of ENABLE WRITE TO SERVO.
void hpn_page_soft (void)
 CHECK THIS CHANGE for the edit that waits.
void hpn_page_repair (void)
 The page of REPAIR CHECKSUM.
void hpn_page_restore (void)
 The page of RESTORE from the record.
void hpn_page_apply (void)
 A page's hold completed: what it asked for.

Variables

static const ui_text_id_t k_rule [HITEC_RULE_COUNT]
 The warning of each soft rule, in hitec_prog_rule_t's order.

Detailed Description

The hold pages of the Hitec programmer's overlay: LEAVE, RELEASE PORT, ENABLE WRITE TO SERVO, WRITE n VALUES, CHECK THIS CHANGE, REPAIR CHECKSUM and RESTORE, what each says before it acts, and what its hold does.

Hitec is a name or trademark of its owner; it is used here only to say which servos this overlay works with. The state and the seam are hitec_panel_int.h.

SPDX-License-Identifier: MIT

Function Documentation

◆ classic()

bool classic ( void )
static

Whether the series in use is the classic one.

Returns
true for CLASSIC

◆ hpn_page_add()

void hpn_page_add ( unsigned level,
const char * s )

Adds a line to the open page at level.

Parameters
levelhitec_prog_level_t
sthe line

◆ hpn_page_open()

void hpn_page_open ( int kind,
bool danger,
const char * title,
const char * apply )

Opens a hold page of kind.

Parameters
kindW_*
dangerthe edge in the danger colour
titleits title
applythe hold button's label

◆ moves_horn()

bool moves_horn ( const hitec_image_t * to)
static

Whether to moves the horn or turns it round: it changes the direction, the centre or an end point.

Parameters
tothe image a write leaves
Returns
true when it does

◆ page_values()

void page_values ( const hitec_image_t * to,
int room )
static

The values to changes, in the order of the tabs, on at most room lines: more than fit leave the last line to their count. A value that breaks a soft rule is in the warning colour.

Parameters
tothe image the write leaves
roomthe lines

Variable Documentation

◆ k_rule

const ui_text_id_t k_rule[HITEC_RULE_COUNT]
static
Initial value:
= {
TX_KP_W_SPD_SLOW, TX_KP_W_DEAD_BAND_NARROWED, TX_HP_SOFT_OVERLOAD,
TX_KP_W_END_MOVED, TX_KP_W_NEUTRAL_MOVED, TX_KP_W_REVERSION_CHANGED,
TX_KP_W_UNCONT_POS_FAR,
}

The warning of each soft rule, in hitec_prog_rule_t's order.