Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ublox protocol support not working #34

Open
nsadding opened this issue Jul 16, 2022 · 0 comments
Open

Ublox protocol support not working #34

nsadding opened this issue Jul 16, 2022 · 0 comments

Comments

@nsadding
Copy link

Firstly, Thank you to everyone who contributed to the development and maintenance of this software. The generous nature of the open source community never ceases to impress!
Anyhow, I was experiencing some issues trying to compile the source ver 2.4 with support for UBLOX GPS protocol enabled in the config.h file, using arduino IDE., see following excerpt from the file:-


/* GPS protocol
NMEA - Standard NMEA protocol GGA, GSA and RMC sentences are needed
UBLOX - U-Blox binary protocol, use the ublox config file (u-blox-config.ublox.txt) from the source tree
MTK_BINARY16 and MTK_BINARY19 - MTK3329 chipset based GPS with DIYDrones binary firmware (v1.6 or v1.9)
With UBLOX and MTK_BINARY you don't have to use GPS_FILTERING in multiwii code !!! */

//#define NMEA
#define UBLOX
//#define MTK_BINARY16
//#define MTK_BINARY19
//#define INIT_MTK_GPS        // initialize MTK GPS for using selected speed, 5Hz update rate and GGA & RMC sentence or binary settings

The compiler kept throwing back an error message :-


Arduino: 1.8.13 (Linux), TD: 1.53, Board: "Arduino Mega or Mega 2560, ATmega2560 (Mega 2560)"

GPS.cpp:1177:17: error: flexible array member in union
uint8_t bytes[];
^
exit status 1
flexible array member in union


at line 1177 in GPS.cpp, I changed the source from uint8_t bytes[]; to uint8_t bytes[32];
Apparently Arduino and CPP don't allow an array of undefined size in data structures.

This change seemed to allow the code to compile and my UBLOX NEO 6M GPS data was being transmitted to and reported by, MultiwiiConf.
I'm not sure that this is a good fix but it seems to work for me.

Hopefully someone more skilled than I can decipher this info and adjust the source code to make a robust solution to the problems I have experienced.
Thank you again for your excellent work in making this software available to the community. My hat goes off to you all!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant