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

The editors of the programmer's overlay. More...

#include "kst_panel.h"
#include <math.h>
#include <stdio.h>
#include "kst_port.h"
#include "kst_reg.h"
#include "link_pages.h"
#include "settings.h"
#include "supply_screen.h"
#include "ui_text.h"
#include "ui_textkey.h"
#include "ui_widgets.h"
#include "kst_panel_int.h"

Functions

void kpn_close_editors (void)
 Every editor shut: the keypad, the keyboard, the list and the page; a soft limit's edit is cancelled.
static void choice_open (int kind, const char *title)
 Opens the list of choices of kind kind with its title; the entries follow in choice_add().
static void choice_add (const char *label, int value)
 Adds an entry to the open list while it has room, CHOICE_MAX at most.
static void name_open (unsigned why)
 Opens the file-name keyboard for the reason why.
void kpn_name_done (const char *name)
 A file's name typed: the save, or the keyboard again for a name the card's side does not take.
static void files_open (void)
 The list of files as the card gave it, under the entry that saves.
static void files_ask (unsigned first)
 Ask for the list from file first on.
void kpn_card_moved (void)
 What the card's side brought: the list, the name again, a file's warnings.
static void edited (const row_t *r, kst_prog_edit_t e)
 What an edit came to: a warning page for a soft limit.
void kpn_edit_field (const row_t *r)
 Row r's editor: a toggle, the list or the keypad.
static uint16_t supply_max_mv (void)
 The highest programming voltage the keypad takes: a standard servo's until HV SERVO is on, then the port's.
static uint16_t std_mv (long mv)
 A voltage as the settings hold it: a standard servo's at most, and the port's lowest at least.
void kpn_options_keep (void)
 The programmer's options into the settings.
void kpn_options_load (void)
 The programmer's options from the settings.
void kpn_keypad_done (float v)
 The keypad's value v for the row or the supply it edits.
void kpn_step (const row_t *r, bool up)
 One step of a plus (up) or minus key on row r.
bool kpn_leave_waits (const kst_prog_t *p)
 Whether a LEAVE's wait runs: an abort keeps the session.
void kpn_act (const row_t *r)
 The action of row r of the SERVO page.
void kpn_choice_done (int value)
 The list's choice value for what the list was opened for.
bool kpn_row_live (const row_t *r)
 Whether row r's control takes a tap now.
bool kst_panel_row_live (int page, int row, int col)

Detailed Description

The editors of the programmer's overlay.

The editors of the programmer's overlay for KST and Chaservo servos: the list of choices, the keypad, the keyboard for a file's name, the steppers, the actions of the SERVO page's rows and the options kept; and whether a row takes input now. The state and the seam are kst_panel_int.h.

SPDX-License-Identifier: MIT

Function Documentation

◆ kpn_act()

void kpn_act ( const row_t * r)

The action of row r of the SERVO page.

Parameters
rthe row

◆ kpn_choice_done()

void kpn_choice_done ( int value)

The list's choice value for what the list was opened for.

Parameters
valuethe entry's value

◆ kpn_edit_field()

void kpn_edit_field ( const row_t * r)

Row r's editor: a toggle, the list or the keypad.

Parameters
rthe row

◆ kpn_keypad_done()

void kpn_keypad_done ( float v)

The keypad's value v for the row or the supply it edits.

Parameters
vthe value

◆ kpn_leave_waits()

bool kpn_leave_waits ( const kst_prog_t * p)

Whether a LEAVE's wait runs: an abort keeps the session.

Parameters
pthe session
Returns
true when the wait runs

◆ kpn_name_done()

void kpn_name_done ( const char * name)

A file's name typed: the save, or the keyboard again for a name the card's side does not take.

Parameters
namethe name typed

◆ kpn_row_live()

bool kpn_row_live ( const row_t * r)

Whether row r's control takes a tap now.

Parameters
rthe row
Returns
true when the control takes a tap

◆ kpn_step()

void kpn_step ( const row_t * r,
bool up )

One step of a plus (up) or minus key on row r.

Parameters
rthe row
uptrue for plus, false for minus

◆ kst_panel_row_live()

bool kst_panel_row_live ( int page,
int row,
int col )

The control of the row at page, row, col takes a tap now.