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

About settings #7

Open
MarsWasNotAvailable opened this issue Dec 18, 2022 · 0 comments
Open

About settings #7

MarsWasNotAvailable opened this issue Dec 18, 2022 · 0 comments

Comments

@MarsWasNotAvailable
Copy link

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 NAV_MODE_* and DATA_RATE_*,
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.

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