Page 1 of 1

Compile error after GPS configuration

Posted: Sun Oct 17, 2021 3:49 pm
by ZZ9_Plural
I am trying to set up ublox GPS for my drone through serial connection. However when I try to compile the firmware, I get an error message saying "flexible array member in union", and the arduino ide leads me to where the GPS receive buffer is coded, to an unsigned int called bytes[]. I can't seem to find anyone with a similar problem. Does anyone have any advice regarding this?

Re: Compile error after GPS configuration

Posted: Sun Oct 24, 2021 10:21 am
by PatrikE
Hi,
Remember this is a very old project that not have been updated for several years.
I think some changes was done in how Arduino UI handles code.
Try an older Arduino version to verify.

Good luck
/Patrik

Re: Compile error after GPS configuration

Posted: Sun Dec 19, 2021 5:21 am
by synersignart
Guys recent update when Compiling with Arduino IDE version 1.8.16 -1.8.18
a member (Jerwin John) pointed this out that the newer IDE dont recognize flexible array base on the old ublox code in GPS
what he suggested is to add 128

GPS.cpp

uint8_t bytes[]
into
uint8_t bytes[128]

as to resolve the issue for UBLOX GPS this is just recent
268495274_4595654310471906_5953686355013154108_n.jpg
267706223_4595725727131431_1059056019547875993_n.jpg
Guys recent update

the old codes would work when using Arduino 1.8.5 or earlier