forked from SamuelBrucksch/wifibroadcast_osd
-
Notifications
You must be signed in to change notification settings - Fork 3
/
telemetry.h
76 lines (72 loc) · 1.42 KB
/
telemetry.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
#pragma once
#include <stdbool.h>
#include <stdint.h>
#include <time.h>
#include "osdconfig.h"
typedef struct {
uint32_t received_packet_cnt;
uint32_t wrong_crc_cnt;
int8_t current_signal_dbm;
} wifi_adapter_rx_status_t;
typedef struct {
time_t last_update;
uint32_t received_block_cnt;
uint32_t damaged_block_cnt;
uint32_t tx_restart_cnt;
uint32_t wifi_adapter_cnt;
wifi_adapter_rx_status_t adapter[8];
} wifibroadcast_rx_status_t;
typedef struct {
float voltage;
float ampere;
int cells;
float baro_altitude;
float heading;
float speed;
float altitude;
double longitude;
double latitude;
int16_t x, y, z;
int16_t ew, ns;
bool setting_home;
bool home_set;
bool gps_fix;
float home_lat;
float home_lon;
float home_alt;
char* callsign;
#ifdef LTM
int16_t roll, pitch;
uint8_t rssi;
uint8_t airspeed;
uint8_t sats;
uint8_t fix;
#endif
#ifdef MAVLINK
float pitch;
float roll;
float throttle;
float climb;
float lat,lng,alt;
float wp_lat,wp_lng,wp_alt;
float gps_alt;
float hdop;
float airspeed;
float vehicle_clearance;
float battery_remaining;
float rc_rssi;
uint8_t sats;
uint8_t armed;
uint8_t fix_type;
uint16_t wp_target_bearing;
uint16_t wp_dist;
uint16_t wp_number;
bool haltset;
bool message_pending;
char* message;
char* flight_mode;
#endif
wifibroadcast_rx_status_t *rx_status;
int rx_port;
} telemetry_data_t;
wifibroadcast_rx_status_t *telemetry_wbc_status_memory_open(int rx_port);