![]() |
dRonin
adbada4
dRonin firmware
|
Process OSD information. More...
Files | |
file | charosd.h |
file | panel.c |
Data Structures | |
struct | telemetry_t |
struct | charosd_state_t |
struct | panel_t |
Typedefs | |
typedef void(* | update_t )(charosd_state_t state, uint8_t x, uint8_t y) |
Functions | |
static void | panel_draw (charosd_state_t state, uint8_t panel, uint8_t x, uint8_t y) |
static void | screen_draw (charosd_state_t state, CharOnScreenDisplaySettingsData *page) |
static void | set_mode (charosd_state_t state, uint8_t video_std) |
static void | program_characters (charosd_state_t state, uint8_t font) |
static void | update_availability (charosd_state_t state) |
static void | update_telemetry (charosd_state_t state) |
static void | splash_screen (charosd_state_t state) |
static void | CharOnScreenDisplayTask (void *parameters) |
int32_t | CharOnScreenDisplayInitialize (void) |
int32_t | CharOnScreenDisplayStart (void) |
MODULE_INITCALL (CharOnScreenDisplayInitialize, CharOnScreenDisplayStart) | |
static float | pythag (float a, float b) |
static void | draw_rect (charosd_state_t state, uint8_t l, uint8_t t, uint8_t w, uint8_t h, bool filled, uint8_t attr) |
STD_PANEL (ALTITUDE, 8,"\x85%d\x8d",(int16_t) round(-state->telemetry.position_actual.Down)) | |
static void | CLIMB_update (charosd_state_t state, uint8_t x, uint8_t y) |
static void | FLIGHTMODE_update (charosd_state_t state, uint8_t x, uint8_t y) |
static void | ARMEDFLAG_update (charosd_state_t state, uint8_t x, uint8_t y) |
static void | FLIGHTTIME_update (charosd_state_t state, uint8_t x, uint8_t y) |
STD_PANEL (ROLL, 7,"\xb2%d\xb0",(int16_t) state->telemetry.attitude_actual.Roll) | |
STD_PANEL (PITCH, 7,"\xb1%d\xb0",(int16_t) state->telemetry.attitude_actual.Pitch) | |
static void | GPS_update (charosd_state_t state, uint8_t x, uint8_t y) |
STD_PANEL (LATITUDE, 11,"\x83%02.6f",(double) state->telemetry.gps_position.Latitude/10000000.0) | |
STD_PANEL (LONGITUDE, 11,"\x84%02.6f",(double) state->telemetry.gps_position.Longitude/10000000.0) | |
void | HORIZON_update (charosd_state_t state, uint8_t x, uint8_t y) |
STD_PANEL (THROTTLE, 7,"\x87%d%%",(int) MAX(-99, state->telemetry.manual.thrust *100)) | |
STD_PANEL (GROUNDSPEED, 7,"\x80%d\x81",(int) roundf(pythag(state->telemetry.velocity_actual.North, state->telemetry.velocity_actual.East)*3.6f)) | |
STD_PANEL (BATTERYVOLT, 8,"%.2f\x8e",(double) state->telemetry.battery.Voltage) | |
STD_PANEL (BATTERYCURRENT, 8,"%.2f\x8f",(double) state->telemetry.battery.Current) | |
STD_PANEL (BATTERYCONSUMED, 8,"%u\x82",(uint16_t) state->telemetry.battery.ConsumedEnergy) | |
static void | RSSIFLAG_update (charosd_state_t state, uint8_t x, uint8_t y) |
static void | HOMEDISTANCE_update (charosd_state_t state, uint8_t x, uint8_t y) |
static void | HOMEDIRECTION_update (charosd_state_t state, uint8_t x, uint8_t y) |
STD_PANEL (HEADING, 6,"%d%c",(int)(round(state->telemetry.attitude_actual.Yaw)+360)%360, CHAROSD_CHAR_DEG) | |
STD_PANEL (CALLSIGN, 11,"%s", state->custom_text) | |
STD_PANEL (TEMPERATURE, 9,"\xfd%.1f\x8a", 0.0) | |
static void | RSSI_update (charosd_state_t state, uint8_t x, uint8_t y) |
static void | COMPASS_update (charosd_state_t state, uint8_t x, uint8_t y) |
static void | AIRSPEED_update (charosd_state_t state, uint8_t x, uint8_t y) |
STD_PANEL (CROSSHAIR, 2,"%c", 0x0a) | |
static void | ALARMS_update (charosd_state_t state, uint8_t x, uint8_t y) |
Variables | |
bool | module_enabled |
static const uint8_t | charosd_font_data [] |
static const uint8_t | charosd_font_small_data [] |
static const uint8_t | charosd_font_thin_data [] |
const panel_t | panels [] |
const uint8_t | panels_count |
const char | _horz_line [PANEL_HORIZON_WIDTH+1] = "\xb8 \xb9" |
const char | _horz_center [PANEL_HORIZON_WIDTH+1] = "\xc8 \xc9" |
const panel_t | panels [CHARONSCREENDISPLAYSETTINGS_PANELTYPE_MAXOPTVAL+1] |
const uint8_t | count = sizeof (panels) / sizeof (panel_t) |
Process OSD information.
#define _ARROWS CHAROSD_CHAR_ARROW_NL |
#define _PAN_HORZ_INT_WIDTH (PANEL_HORIZON_WIDTH - 2) |
#define _PAN_HORZ_LINES (PANEL_HORIZON_HEIGHT * _PAN_HORZ_VRES) |
#define _PAN_HORZ_TOTAL_LINES (PANEL_HORIZON_HEIGHT * _PAN_HORZ_CHAR_LINES) |
#define declare_panel | ( | __name, | |
__req | |||
) |
#define FONT_CHAR_SIZE ((12 * 18 * 2) / 8) |
Definition at line 143 of file charonscreendisplay.c.
#define HAS_SENSOR | ( | available, | |
required | |||
) | ((available & required) == required) |
#define MAX_ALARM_LEN MAX7456_COLUMNS |
#define SPLASH_TIME_MS (5*1000) |
Definition at line 77 of file charonscreendisplay.c.
#define STACK_SIZE_BYTES 3072 |
Definition at line 74 of file charonscreendisplay.c.
#define STD_PANEL | ( | __name, | |
bs, | |||
fmt, | |||
... | |||
) | STD_UPDATE(__name, bs, fmt, __VA_ARGS__); |
#define STD_UPDATE | ( | __name, | |
n, | |||
fmt, | |||
... | |||
) |
#define TASK_PRIORITY PIOS_THREAD_PRIO_LOW |
Definition at line 75 of file charonscreendisplay.c.
#define terminate_buffer | ( | ) | do { buffer [sizeof(buffer) - 1] = 0; } while (0) |
typedef void(* update_t)(charosd_state_t state, uint8_t x, uint8_t y) |
|
static |
|
static |
|
static |
int32_t CharOnScreenDisplayInitialize | ( | void | ) |
Initialize the osd module
Definition at line 329 of file charonscreendisplay.c.
int32_t CharOnScreenDisplayStart | ( | void | ) |
Definition at line 340 of file charonscreendisplay.c.
|
static |
Main osd task. It does not return.
Definition at line 278 of file charonscreendisplay.c.
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
void HORIZON_update | ( | charosd_state_t | state, |
uint8_t | x, | ||
uint8_t | y | ||
) |
MODULE_INITCALL | ( | CharOnScreenDisplayInitialize | , |
CharOnScreenDisplayStart | |||
) |
|
static |
Definition at line 81 of file charonscreendisplay.c.
|
static |
Definition at line 145 of file charonscreendisplay.c.
|
static |
|
static |
|
static |
Definition at line 91 of file charonscreendisplay.c.
|
static |
Definition at line 115 of file charonscreendisplay.c.
|
static |
Definition at line 260 of file charonscreendisplay.c.
STD_PANEL | ( | ALTITUDE | , |
8 | , | ||
"\x85%d\x8d" | , | ||
(int16_t) round(-state->telemetry.position_actual.Down) | |||
) |
STD_PANEL | ( | LATITUDE | , |
11 | , | ||
"\x83%02.6f" | , | ||
(double) state->telemetry.gps_position.Latitude/10000000. | 0 | ||
) |
STD_PANEL | ( | LONGITUDE | , |
11 | , | ||
"\x84%02.6f" | , | ||
(double) state->telemetry.gps_position.Longitude/10000000. | 0 | ||
) |
STD_PANEL | ( | GROUNDSPEED | , |
7 | , | ||
"\x80%d\x81" | , | ||
(int) roundf(pythag(state->telemetry.velocity_actual.North, state->telemetry.velocity_actual.East)*3.6f) | |||
) |
STD_PANEL | ( | BATTERYVOLT | , |
8 | , | ||
"%.2f\x8e" | , | ||
(double) state->telemetry.battery. | Voltage | ||
) |
STD_PANEL | ( | BATTERYCURRENT | , |
8 | , | ||
"%.2f\x8f" | , | ||
(double) state->telemetry.battery. | Current | ||
) |
STD_PANEL | ( | BATTERYCONSUMED | , |
8 | , | ||
"%u\x82" | , | ||
(uint16_t) state->telemetry.battery. | ConsumedEnergy | ||
) |
STD_PANEL | ( | HEADING | , |
6 | , | ||
"%d%c" | , | ||
(int)(round(state->telemetry.attitude_actual.Yaw)+360)% | 360, | ||
CHAROSD_CHAR_DEG | |||
) |
STD_PANEL | ( | CALLSIGN | , |
11 | , | ||
"%s" | , | ||
state-> | custom_text | ||
) |
STD_PANEL | ( | TEMPERATURE | , |
9 | , | ||
"\xfd%.1f\x8a" | , | ||
0. | 0 | ||
) |
0 |
STD_PANEL | ( | CROSSHAIR | , |
2 | , | ||
"%c" | , | ||
0x0a | |||
) |
|
static |
Definition at line 200 of file charonscreendisplay.c.
|
static |
Definition at line 236 of file charonscreendisplay.c.
const char _horz_center[PANEL_HORIZON_WIDTH+1] = "\xc8 \xc9" |
const char _horz_line[PANEL_HORIZON_WIDTH+1] = "\xb8 \xb9" |
|
static |
Definition at line 101 of file charonscreendisplay.c.
|
static |
Definition at line 106 of file charonscreendisplay.c.
|
static |
Definition at line 110 of file charonscreendisplay.c.
bool module_enabled |
Definition at line 79 of file charonscreendisplay.c.
const panel_t panels[CHARONSCREENDISPLAYSETTINGS_PANELTYPE_MAXOPTVAL+1] |
const uint8_t panels_count |