feat: add U-BLOX GPS support (#4689)
This commit is contained in:
+9
-2
@@ -22,6 +22,7 @@
|
||||
#ifndef _GPS_H_
|
||||
#define _GPS_H_
|
||||
|
||||
#include "opentx.h"
|
||||
#include <inttypes.h>
|
||||
|
||||
struct gpsdata_t
|
||||
@@ -32,7 +33,7 @@ struct gpsdata_t
|
||||
uint8_t numSat;
|
||||
uint32_t packetCount;
|
||||
uint32_t errorCount;
|
||||
uint16_t altitude; // altitude in 0.1m
|
||||
int32_t altitude; // altitude in 0.1m
|
||||
uint16_t speed; // speed in 0.1m/s
|
||||
uint16_t groundCourse; // degrees * 10
|
||||
uint16_t hdop;
|
||||
@@ -44,8 +45,12 @@ extern gpsdata_t gpsData;
|
||||
extern uint8_t gpsTraceEnabled;
|
||||
#endif
|
||||
|
||||
#define GPS_PROTOCOL_AUTO 0
|
||||
#define GPS_PROTOCOL_NMEA 1
|
||||
#define GPS_PROTOCOL_UBX 2
|
||||
|
||||
// Setup GPS serial port
|
||||
void gpsSetSerialDriver(void* ctx, const etx_serial_driver_t* drv);
|
||||
void gpsSetSerialDriver(void* ctx, const etx_serial_driver_t* drv, int protocol);
|
||||
|
||||
// Periodic processing
|
||||
void gpsWakeup();
|
||||
@@ -53,4 +58,6 @@ void gpsWakeup();
|
||||
// Send a 0-terminated frame
|
||||
void gpsSendFrame(const char * frame);
|
||||
|
||||
uint32_t GPS_coord_to_degrees(const char * coordinateString);
|
||||
|
||||
#endif // _GPS_H_
|
||||
|
||||
Reference in New Issue
Block a user