-
Notifications
You must be signed in to change notification settings - Fork 7
/
driver-interface.h
32 lines (24 loc) · 866 Bytes
/
driver-interface.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
#pragma once
#include "definitions.h"
#include "serial-comms.h"
#include "gps_helper.h"
#include <memory>
#include <mavsdk/mavsdk.h>
#include <mavsdk/plugins/rtk/rtk.h>
#include <mavsdk/plugins/telemetry/telemetry.h>
class DriverInterface {
public:
DriverInterface(SerialComms& serial_comms, mavsdk::Mavsdk& mavsdk) :
serial_comms_(serial_comms),
mavsdk_(mavsdk) {}
static int callback_entry(GPSCallbackType type, void* data1, int data2, void* user);
int callback(GPSCallbackType type, void* data1, int data2);
void send_rtcm_data(const uint8_t* data, int data_len);
struct sensor_gps_s gps_pos;
struct satellite_info_s sat_info;
private:
SerialComms& serial_comms_;
mavsdk::Mavsdk& mavsdk_;
std::shared_ptr<mavsdk::Rtk> rtk_plugin_{};
std::shared_ptr<mavsdk::Telemetry> telemetry_plugin_{};
};