30 #include "modulesettings.h"
31 #include "hottsettings.h"
32 #include "attitudeactual.h"
33 #include "baroaltitude.h"
34 #include "flightbatterystate.h"
35 #include "flightstatus.h"
37 #include "gpsposition.h"
39 #include "homelocation.h"
40 #include "positionactual.h"
41 #include "systemalarms.h"
42 #include "velocityactual.h"
45 #define IDLE_TIME 10 // idle line delay to prevent data crashes on telemetry line.
46 #define DATA_TIME 3 // time between 2 transmitted bytes
49 #define climbratesize 50 // defines size of ring buffer for climbrate calculation
50 #define statussize 21 // number of characters in status line
51 #define HOTT_MAX_MESSAGE_LENGTH 200
54 #define M_TO_CM 100 // scale m to cm or m/s to cm/s
55 #define MS_TO_KMH 3.6f // scale m/s to km/h
56 #define DEG_TO_UINT 0.5f // devide degrees by 2. then the value fits into a byte.
59 #define OFFSET_ALTITUDE 500 // 500m
60 #define OFFSET_CLIMBRATE 30000 // 30000cm/s or 300m/s
61 #define OFFSET_CLIMBRATE3S 120 // 120m/s
62 #define OFFSET_TEMPERATURE 20 // 20 degrees
65 #define VARIO_INVERT_ALT (1<<0) // altitude
66 #define VARIO_INVERT_MAX (1<<1) // max altitude
67 #define VARIO_INVERT_MIN (1<<2) // min altitude
68 #define VARIO_INVERT_CR1S (1<<3) // climbrate 1s
69 #define VARIO_INVERT_CR3S (1<<4) // climbrate 3s
70 #define VARIO_INVERT_CR10S (1<<5) // climbrate 10s
72 #define GPS_INVERT_HDIST (1<<0) // home distance
73 #define GPS_INVERT_SPEED (1<<1) // speed (kmh)
74 #define GPS_INVERT_ALT (1<<2) // altitude
75 #define GPS_INVERT_CR1S (1<<3) // climbrate 1s
76 #define GPS_INVERT_CR3S (1<<4) // climbrate 3s
77 #define GPS_INVERT2_POS (1<<0) // GPS postion values
79 #define GAM_INVERT_CELL (1<<0) // cell voltage
80 #define GAM_INVERT_BATT1 (1<<1) // battery 1 voltage
81 #define GAM_INVERT_BATT2 (1<<2) // battery 1 voltage
82 #define GAM_INVERT_TEMP1 (1<<3) // temperature 1
83 #define GAM_INVERT_TEMP2 (1<<4) // temperature 2
84 #define GAM_INVERT_FUEL (1<<5) // fuel
85 #define GAM_INVERT2_CURRENT (1<<0) // current
86 #define GAM_INVERT2_VOLTAGE (1<<1) // voltage
87 #define GAM_INVERT2_ALT (1<<2) // altitude
88 #define GAM_INVERT2_CR1S (1<<3) // climbrate 1s
89 #define GAM_INVERT2_CR3S (1<<4) // climbrate 3s
91 #define EAM_INVERT_CAPACITY (1<<0) // capacity
92 #define EAM_INVERT_BATT1 (1<<1) // battery 1 voltage
93 #define EAM_INVERT_BATT2 (1<<2) // battery 1 voltage
94 #define EAM_INVERT_TEMP1 (1<<3) // temperature 1
95 #define EAM_INVERT_TEMP2 (1<<4) // temperature 2
96 #define EAM_INVERT_ALT (1<<5) // altitude
97 #define EAM_INVERT_CURRENT (1<<6) // current
98 #define EAM_INVERT_VOLTAGE (1<<7) // voltage
99 #define EAM_INVERT2_ALT (1<<2) // altitude
100 #define EAM_INVERT2_CR1S (1<<3) // climbrate 1s
101 #define EAM_INVERT2_CR3S (1<<4) // climbrate 3s
103 #define ESC_INVERT_VOLTAGE (1<<0) // voltage
104 #define ESC_INVERT_TEMP1 (1<<1) // temperature 1
105 #define ESC_INVERT_TEMP2 (1<<2) // temperature 2
106 #define ESC_INVERT_CURRENT (1<<3) // current
107 #define ESC_INVERT_RPM (1<<4) // rpm
108 #define ESC_INVERT_CAPACITY (1<<5) // capacity
109 #define ESC_INVERT_MAXCURRENT (1<<6) // maximum current
112 #define HOTT_TEXT_ID 0x7f // Text request
113 #define HOTT_BINARY_ID 0x80 // Binary request
114 #define HOTT_VARIO_ID 0x89 // Vario Module ID
115 #define HOTT_VARIO_TEXT_ID 0x90 // Vario Module TEXT ID
116 #define HOTT_GPS_ID 0x8a // GPS Module ID
117 #define HOTT_GPS_TEXT_ID 0xa0 // GPS Module TEXT ID
118 #define HOTT_ESC_ID 0x8c // ESC Module ID
119 #define HOTT_ESC_TEXT_ID 0xc0 // ESC Module TEXT ID
120 #define HOTT_GAM_ID 0x8d // General Air Module ID
121 #define HOTT_GAM_TEXT_ID 0xd0 // General Air Module TEXT ID
122 #define HOTT_EAM_ID 0x8e // Electric Air Module ID
123 #define HOTT_EAM_TEXT_ID 0xe0 // Electric Air Module TEXT ID
124 #define HOTT_TEXT_START 0x7b // Start byte Text mode
125 #define HOTT_START 0x7c // Start byte Binary mode
126 #define HOTT_STOP 0x7d // End byte
127 #define HOTT_BUTTON_DEC 0xEB // minus button
128 #define HOTT_BUTTON_INC 0xED // plus button
129 #define HOTT_BUTTON_SET 0xE9 // set button
130 #define HOTT_BUTTON_NIL 0x0F // esc button
131 #define HOTT_BUTTON_NEXT 0xEE // next button
132 #define HOTT_BUTTON_PREV 0xE7 // previous button
135 #define HOTT_TONE_A 1 // minimum speed
136 #define HOTT_TONE_B 2 // sink rate 3 seconds
137 #define HOTT_TONE_C 3 // sink rate 1 second
138 #define HOTT_TONE_D 4 // maximum distance
139 #define HOTT_TONE_E 5 // -
140 #define HOTT_TONE_F 6 // minimum temperature sensor 1
141 #define HOTT_TONE_G 7 // minimum temperature sensor 2
142 #define HOTT_TONE_H 8 // maximum temperature sensor 1
143 #define HOTT_TONE_I 9 // maximum temperature sensor 2
144 #define HOTT_TONE_J 10 // overvoltage sensor 1
145 #define HOTT_TONE_K 11 // overvoltage sensor 2
146 #define HOTT_TONE_L 12 // maximum speed
147 #define HOTT_TONE_M 13 // climb rate 3 seconds
148 #define HOTT_TONE_N 14 // climb rate 1 second
149 #define HOTT_TONE_O 15 // minimum height
150 #define HOTT_TONE_P 16 // minimum input voltage
151 #define HOTT_TONE_Q 17 // minimum cell voltage
152 #define HOTT_TONE_R 18 // undervoltage sensor 1
153 #define HOTT_TONE_S 19 // undervoltage sensor 2
154 #define HOTT_TONE_T 20 // minimum rpm
155 #define HOTT_TONE_U 21 // fuel reserve
156 #define HOTT_TONE_V 22 // capacity
157 #define HOTT_TONE_W 23 // maximum current
158 #define HOTT_TONE_X 24 // maximum input voltage
159 #define HOTT_TONE_Y 25 // maximum rpm
160 #define HOTT_TONE_Z 26 // maximum height
161 #define HOTT_TONE_20M 37 // 20 meters
162 #define HOTT_TONE_40M 38 // 40 meters
163 #define HOTT_TONE_60M 39 // 60 meters
164 #define HOTT_TONE_80M 40 // 80 meters
165 #define HOTT_TONE_100M 41 // 100 meters
166 #define HOTT_TONE_42 42 // receiver voltage
167 #define HOTT_TONE_43 43 // receiver temperature
168 #define HOTT_TONE_200M 46 // 200 meters
169 #define HOTT_TONE_400M 47 // 400 meters
170 #define HOTT_TONE_600M 48 // 600 meters
171 #define HOTT_TONE_800M 49 // 800 meters
172 #define HOTT_TONE_1000M 50 // 10000 meters
173 #define HOTT_TONE_51 51 // maximum servo temperature
174 #define HOTT_TONE_52 52 // maximum servo position difference
PositionActualData Position
SystemAlarmsData SysAlarms
uint8_t max_temperatureESC
HoTTSettingsData Settings
uint8_t min_cell_volt_num
char statusline[statussize]
FlightStatusData FlightStatus
uint8_t climbrate_pointer
AttitudeActualData Attitude
int16_t climbratebuffer[climbratesize]
Includes PiOS and core architecture components.
FlightBatteryStateData Battery
uint8_t max_temperatureMOT
VelocityActualData Velocity