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

The presses on the Hitec programmer's overlay: a DOWN, its moves and its release, CLOSE and the home tag, each frame's hold, and the supply's lock while a port is held. More...

#include "hitec_panel.h"
#include "supply_screen.h"
#include "ui_tabs.h"
#include "ui_widgets.h"
#include "hitec_panel_int.h"

Functions

static void take (const touch_event_t *evt, int what, int row)
 Takes a press: its contact, what it is on and its row.
static void let_go (void)
 Ends the press.
static void down (const touch_event_t *evt)
 A DOWN: the control under it takes the press.
void hitec_panel_close (void)
 CLOSE: closes while the port is not held; asks for LEAVE on this panel's port and for RELEASE PORT on another's.
void hitec_panel_back (void)
 The home tag or BACK: an editor closes as its CANCEL does, otherwise as hitec_panel_close().
static void rest (const touch_event_t *evt)
 The rest of the press held: a move or its release.
bool hitec_panel_has_press (uint8_t id)
 Whether a press that began in the overlay is on the glass.
void hpn_supply_sync (void)
 The supply's own controls follow the port: held, SUPPLY and the SERVO screen's SET row take an OFF and nothing else.
void hitec_panel_event (const touch_event_t *evt)
 A press in the overlay's area, or the rest of one it owns.
void hitec_panel_cancel (void)
 Touch events were lost: the press and its hold are dropped.
void hitec_panel_leave (void)
 The screen is left: presses and editors go; the port stays.
void hitec_panel_tick (float dt_s)
 One frame: the hold of a page.

Detailed Description

The presses on the Hitec programmer's overlay: a DOWN, its moves and its release, CLOSE and the home tag, each frame's hold, and the supply's lock while a port is held.

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

◆ down()

void down ( const touch_event_t * evt)
static

A DOWN: the control under it takes the press.

Parameters
evtthe event

◆ hitec_panel_event()

void hitec_panel_event ( const touch_event_t * evt)

A press in the overlay's area, or the rest of one it owns.

Parameters
evtthe event

◆ hitec_panel_has_press()

bool hitec_panel_has_press ( uint8_t id)

Whether a press that began in the overlay is on the glass.

Parameters
idthe touch id
Returns
true for the overlay's press

◆ hitec_panel_tick()

void hitec_panel_tick ( float dt_s)

One frame: the hold of a page.

Parameters
dt_sthe time since the last frame, s

◆ rest()

void rest ( const touch_event_t * evt)
static

The rest of the press held: a move or its release.

Parameters
evtthe event

◆ take()

void take ( const touch_event_t * evt,
int what,
int row )
static

Takes a press: its contact, what it is on and its row.

Parameters
evtthe DOWN
whatP_*
rowthe row or entry, -1 none