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

The balance screen: sensor placement guides and the correction readout. More...

#include "ui_keypad.h"
#include "ui_screen.h"

Go to the source code of this file.

Enumerations

enum  balance_pane_t { BALANCE_PANE_MEASURE = 0 , BALANCE_PANE_RIG , BALANCE_PANE_AIRCRAFT , BALANCE_PANE_COUNT }
enum  balance_rotor_t { ROTOR_PROP = 0 , ROTOR_EDF , ROTOR_COUNT }

Functions

void balance_invalidate (void)
const ui_screen_t * balance_screen (void)
int balance_screen_blades (void)
int balance_screen_rotor (void)
const ui_keypad_t * balance_screen_keypad (void)
 The keypad a tap on the blade count opens over both cards, for tests and the renderer.
gfx_rect_t balance_screen_blades_rect (void)
 Where the blade count is drawn and tapped, in the screen's coordinates: between BLADES and the "-" key.
const char * balance_screen_model_mark (void)
const char * balance_screen_model_note (void)
void balance_nearest_blades (float angle, int blades, int *lo, int *hi)

Detailed Description

The balance screen: sensor placement guides and the correction readout.

SPDX-License-Identifier: MIT

Function Documentation

◆ balance_invalidate()

void balance_invalidate ( void )

Drop the cached chrome, so the next frame repaints it.

◆ balance_nearest_blades()

void balance_nearest_blades ( float angle,
int blades,
int * lo,
int * hi )

The two blades a correction at angle (degrees from the index mark) falls between, on a rotor of blades blades. Both are 1..blades and wrap, so a correction past the last blade reads "between N and 1".

◆ balance_screen_blades()

int balance_screen_blades ( void )

How many blades the rotor has, 2 to 6.

◆ balance_screen_blades_rect()

gfx_rect_t balance_screen_blades_rect ( void )

Where the blade count is drawn and tapped, in the screen's coordinates: between BLADES and the "-" key.

Returns
The value's rectangle.

◆ balance_screen_keypad()

const ui_keypad_t * balance_screen_keypad ( void )

The keypad a tap on the blade count opens over both cards, for tests and the renderer.

Returns
The keypad, open or closed.

◆ balance_screen_model_mark()

const char * balance_screen_model_mark ( void )

The MODELLED mark the BALANCE pane shows beside its readings, or NULL on the other panes: the angle and both masses are fixed values.

◆ balance_screen_model_note()

const char * balance_screen_model_note ( void )

The words beside the mark ("Not measured."), or NULL where it is not shown.

◆ balance_screen_rotor()

int balance_screen_rotor ( void )

Propeller or ducted fan.