28 #if HOTT_SIM_GAM_SENSOR
31 #if HOTT_SIM_EAM_SENSOR
34 #if HOTT_SIM_GPS_SENSOR
35 #include "hott/hott_gps.h"
37 #if HOTT_SIM_VARIO_SENSOR
38 #include "hott/hott_vario.h"
44 #define HOTT_TEXT_MODE_REQUEST_ID 0x7f
45 #define HOTT_BINARY_MODE_REQUEST_ID 0x80
49 #define HOTT_TELEMETRY_GPS_SENSOR_ID 0x8A
51 #define HOTT_TELEMETRY_VARIO_SENSOR_ID 0x89
57 #if HOTT_SIM_GPS_SENSOR
58 bool HOTT_REQ_UPDATE_GPS =
false;
60 #if HOTT_SIM_EAM_SENSOR
61 bool HOTT_REQ_UPDATE_EAM =
false;
63 #if HOTT_SIM_VARIO_SENSOR
64 bool HOTT_REQ_UPDATE_VARIO =
false;
66 #if HOTT_SIM_GAM_SENSOR
67 bool HOTT_REQ_UPDATE_GAM =
false;
75 #if HOTT_SIM_GAM_SENSOR
78 #if HOTT_SIM_EAM_SENSOR
81 #if HOTT_SIM_GPS_SENSOR
82 static struct HOTT_GPS_MSG hott_gps_msg;
84 #if HOTT_SIM_VARIO_SENSOR
85 static struct HOTT_VARIO_MSG hott_vario_msg;
94 #if HOTT_SIM_EAM_SENSOR
97 #if HOTT_SIM_GAM_SENSOR
100 #if HOTT_SIM_GPS_SENSOR
101 hott_init_gps_msg(&hott_gam_msg);
103 #if HOTT_SIM_VARIO_SENSOR
104 hott_init_vario_msg(&hott_gam_msg);
106 #if HOTT_SIM_TEXTMODE
107 hott_init_text_msg(&hott_gam_msg);
131 #if HOTT_SIM_EAM_SENSOR
133 HOTT_REQ_UPDATE_EAM ==
TRUE) {
135 HOTT_REQ_UPDATE_EAM =
false;
138 #if HOTT_SIM_GAM_SENSOR
140 HOTT_REQ_UPDATE_GAM ==
TRUE) {
142 HOTT_REQ_UPDATE_GAM =
false;
145 #if HOTT_SIM_GPS_SENSOR
147 HOTT_REQ_UPDATE_GPS ==
TRUE) {
148 hott_update_gps_msg(&hott_gam_msg);
149 HOTT_REQ_UPDATE_GPS =
false;
152 #if HOTT_SIM_VARIO_SENSOR
154 HOTT_REQ_UPDATE_VARIO ==
TRUE) {
155 hott_update_vario_msg(&hott_gam_msg);
156 HOTT_REQ_UPDATE_VARIO =
false;
199 static uint32_t hott_serial_request_timer = 0;
203 if (hott_serial_request_timer == 0) {
204 hott_serial_request_timer = tnow;
207 if (tnow - hott_serial_request_timer < 4600) {
210 hott_serial_request_timer = 0;
216 #if HOTT_SIM_TEXTMODE
220 hott_txt_msg.start_byte = 0x7b;
221 hott_txt_msg.stop_byte = 0x7d;
223 if (tmp == (HOTT_SIM_TEXTMODE_ADDRESS & 0x0f)) {
224 HOTT_Clear_Text_Screen();
225 HOTT_HandleTextMode(addr);
226 hott_send_text_msg();
232 #if HOTT_SIM_EAM_SENSOR
235 HOTT_REQ_UPDATE_EAM =
true;
239 #if HOTT_SIM_GAM_SENSOR
242 HOTT_REQ_UPDATE_GAM =
true;
246 #if HOTT_SIM_GPS_SENSOR
249 HOTT_REQ_UPDATE_GPS =
true;
253 #if HOTT_SIM_VARIO_SENSOR
256 HOTT_REQ_UPDATE_VARIO =
true;
269 hott_serial_request_timer = 0;
281 if (tnow - hott_serial_timer < 3000) {
288 hott_serial_timer = tnow;
bool autopilot_get_motors_on(void)
get motors status
uint32_t get_sys_time_usec(void)
Get the time in microseconds since startup.
static uint32_t hott_event_timer
static int8_t * hott_msg_ptr
static bool hott_telemetry_is_sending
#define HOTT_BINARY_MODE_REQUEST_ID
static void hott_enable_receiver(void)
static void hott_send_telemetry_data(void)
#define HOTT_TEXT_MODE_REQUEST_ID
static void hott_send_msg(int8_t *buffer, int16_t len)
static void hott_enable_transmitter(void)
static void hott_periodic_event(uint32_t tnow)
#define HOTT_TELEMETRY_VARIO_SENSOR_ID
static void hott_msgs_init(void)
Initializes a HoTT GPS message (Receiver answer type !Not Smartbox)
void hott_init(void)
RC init function.
static int16_t hott_msg_len
static void hott_check_serial_data(uint32_t tnow)
#define HOTT_TELEMETRY_GPS_SENSOR_ID
static uint16_t hott_telemetry_sendig_msgs_id
void hott_event(void)
RC event function.
Graupner HOTT telemetry control module.
Graupner HOTT electric air module description.
static void hott_update_eam_msg(struct HOTT_EAM_MSG *hott_eam_msg)
static void hott_init_eam_msg(struct HOTT_EAM_MSG *hott_eam_msg)
#define HOTT_TELEMETRY_EAM_SENSOR_ID
#define HOTT_TELEMETRY_GAM_SENSOR_ID
static void hott_init_gam_msg(struct HOTT_GAM_MSG *hott_gam_msg)
static void hott_update_gam_msg(struct HOTT_GAM_MSG *hott_gam_msg)
void uart_put_byte(struct uart_periph *periph, long fd, uint8_t data)
int uart_char_available(struct uart_periph *p)
Check UART for available chars in receive buffer.
uint8_t uart_getch(struct uart_periph *p)
void uart_periph_set_mode(struct uart_periph *p, bool tx_enabled, bool rx_enabled, bool hw_flow_control)
Architecture independent timing functions.
#define SysTimeTimerStart(_t)
arch independent UART (Universal Asynchronous Receiver/Transmitter) API
unsigned short uint16_t
Typedef defining 16 bit unsigned short type.
unsigned int uint32_t
Typedef defining 32 bit unsigned int type.
short int16_t
Typedef defining 16 bit short type.
unsigned char uint8_t
Typedef defining 8 bit unsigned char type.
signed char int8_t
Typedef defining 8 bit char type.