Velleman / VMA430_GPS_Module

Library for working with the VMA430 - GPS Module U-BLOX NEO-7M
Other
7 stars 5 forks source link

About settings #7

Open MarsWasNotAvailable opened 1 year ago

MarsWasNotAvailable commented 1 year ago

Hi,

I've been reading the implementation code in this function: byte *VMA430_GPS::generateConfiguration();

There's a switch to set DataRefreshRate into a local settings array. I could not help to notice you're assigning to the same index twice for every cases, like:

settings[1] = highByte(DATA_RATE_1HZ);
settings[1] = lowByte(DATA_RATE_1HZ);

I feel like this would overwrite the previous step.

Also, why is settings[2] never set.

So in the end, I'm not entirely sure if this is an issue or the intended behavior, maybe some sort of a comment block to explain how is settings[] structured could be useful there. Maybe add a reference to where it is described in the uBlox specification file (I couldn't find it in the PDF link in the header file - I surely was lazy when looking for it). I hope I didn't waste your time.

PS: I'm sure NavMode and DataRate enumerations could take on the values from the #define NAVMODE and DATARATE, and you would simply need to assign the variables instead of those switches. I could take some time to write and push some changes, but I need confirmation on how that settings array is structured.