uas-ugv/main/ugv_comms.h

33 lines
591 B
C
Raw Normal View History

2019-01-03 12:27:17 -07:00
#pragma once
#include <freertos/FreeRTOS.h>
2019-01-03 17:50:12 -07:00
#include <freertos/semphr.h>
2019-01-03 12:27:17 -07:00
#include <freertos/task.h>
2019-01-03 17:50:12 -07:00
#include "messages.pb.h"
2019-01-03 12:27:17 -07:00
#include "sx127x_driver.h"
2019-01-15 18:04:16 -08:00
#ifdef __cplusplus
extern "C" {
#endif
2019-01-03 17:50:12 -07:00
typedef struct ugv_comms_state_s {
sx127x_hndl lora;
TaskHandle_t task_handle;
SemaphoreHandle_t mutex;
uas_ugv_Location location;
uas_ugv_UGV_State ugv_state;
TickType_t last_packet_tick;
int32_t last_packet_rssi;
int8_t last_packet_snr;
} ugv_comms_state_t;
ugv_comms_state_t ugv_comms_state;
2019-01-03 12:27:17 -07:00
void ugv_comms_init();
2019-01-15 18:04:16 -08:00
#ifdef __cplusplus
}
#endif