-
Notifications
You must be signed in to change notification settings - Fork 18
/
osd.h
80 lines (71 loc) · 1.58 KB
/
osd.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
#ifndef OSD_H
#define OSD_H
#include "drm.h"
#include <cairo.h>
// OSD Vars
struct osd_vars {
int plane_zpos;
int refresh_frequency_ms;
// Video Decoder
bool enable_video;
int current_framerate;
bool enable_latency;
float latency_avg;
float latency_max;
float latency_min;
// Video Feed
int bw_curr;
long long bw_stats[10];
uint32_t video_width;
uint32_t video_height;
// Mavlink WFB-ng
bool enable_wfbng;
int8_t wfb_rssi;
uint16_t wfb_errors;
uint16_t wfb_fec_fixed;
int8_t wfb_flags;
// Mavlink
int enable_telemetry;
int telemetry_level;
float telemetry_altitude;
float telemetry_pitch;
float telemetry_roll;
float telemetry_yaw;
float telemetry_battery;
float telemetry_current;
float telemetry_current_consumed;
double telemetry_lat;
double telemetry_lon;
double telemetry_lat_base;
double telemetry_lon_base;
double telemetry_hdg;
double telemetry_distance;
double s1_double;
double s2_double;
double s3_double;
double s4_double;
float telemetry_sats;
float telemetry_gspeed;
float telemetry_vspeed;
float telemetry_rssi;
float telemetry_throttle;
float telemetry_resolution;
float telemetry_arm;
float armed;
char c1[30];
char c2[30];
char s1[30];
char s2[30];
char s3[30];
char s4[30];
char* ptr;
};
extern struct osd_vars osd_vars;
extern int osd_thread_signal;
extern pthread_mutex_t osd_mutex;
typedef struct {
struct modeset_output *out;
int fd;
} osd_thread_params;
void *__OSD_THREAD__(void *param);
#endif