Compile error after GPS configuration

This forum is dedicated to all issues and questions related to your individual setups and configurations
Post Reply
ZZ9_Plural
Posts: 3
Joined: Sun Oct 03, 2021 7:29 pm

Compile error after GPS configuration

Post 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?

PatrikE
Posts: 1976
Joined: Tue Apr 12, 2011 6:35 pm
Location: Sweden
Contact:

Re: Compile error after GPS configuration

Post 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

User avatar
synersignart
Posts: 66
Joined: Wed Mar 22, 2017 3:57 am

Re: Compile error after GPS configuration

Post 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

Post Reply