mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-16 21:05:35 +03:00
Cleanup GPS compilation warnings from
ca746d2ff47c8eb589386045b91bbccdd76246d1
This commit is contained in:
parent
74c3e28a12
commit
f08760634e
1 changed files with 3 additions and 12 deletions
|
@ -1040,15 +1040,6 @@ static uint32_t grab_fields(char *src, uint8_t mult)
|
||||||
return tmp;
|
return tmp;
|
||||||
}
|
}
|
||||||
|
|
||||||
static uint8_t hex_c(uint8_t n)
|
|
||||||
{ // convert '0'..'9','A'..'F' to 0..15
|
|
||||||
n -= '0';
|
|
||||||
if (n > 9)
|
|
||||||
n -= 7;
|
|
||||||
n &= 0x0F;
|
|
||||||
return n;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* This is a light implementation of a GPS frame decoding
|
/* This is a light implementation of a GPS frame decoding
|
||||||
This should work with most of modern GPS devices configured to output NMEA frames.
|
This should work with most of modern GPS devices configured to output NMEA frames.
|
||||||
It assumes there are some NMEA GGA frames to decode on the serial bus
|
It assumes there are some NMEA GGA frames to decode on the serial bus
|
||||||
|
@ -1070,16 +1061,16 @@ static uint8_t hex_c(uint8_t n)
|
||||||
|
|
||||||
static bool gpsNewFrameNMEA(char c)
|
static bool gpsNewFrameNMEA(char c)
|
||||||
{
|
{
|
||||||
typedef struct gpsdata_t {
|
typedef struct gpsdata_s {
|
||||||
int32_t latitude;
|
int32_t latitude;
|
||||||
int32_t longitude;
|
int32_t longitude;
|
||||||
uint8_t numSat;
|
uint8_t numSat;
|
||||||
uint16_t altitude;
|
uint16_t altitude;
|
||||||
uint16_t speed;
|
uint16_t speed;
|
||||||
uint16_t ground_course;
|
uint16_t ground_course;
|
||||||
};
|
} gpsdata_t;
|
||||||
|
|
||||||
static gpsdata_t gps_Msg;
|
static gpsdata_t gps_Msg;
|
||||||
|
|
||||||
uint8_t frameOK = 0;
|
uint8_t frameOK = 0;
|
||||||
static uint8_t param = 0, offset = 0, parity = 0;
|
static uint8_t param = 0, offset = 0, parity = 0;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue