Skip to content

GPS Listener Thread - #27

Merged
NArmistead merged 3 commits into
development/appafrom
feature/na/gps-listener
Feb 21, 2026
Merged

GPS Listener Thread#27
NArmistead merged 3 commits into
development/appafrom
feature/na/gps-listener

Conversation

@NArmistead

Copy link
Copy Markdown
Contributor

Baby's first pthread

@ETSells I still haven't figured out why the messages pass the strcmps in GPS_parse() on the FC normally, but won't on the emulator. Everything else works but the gps_data struct isn't populated. Can you verify in gdb if it works once you're in the flight state?

Changing the line token[7] = '\0'; to token[6] = '\0'; in GPS_parse fixes this for me.

@ETSells

ETSells commented Feb 18, 2026

Copy link
Copy Markdown
Member

@NArmistead lowkenuinely the fact that it passes the unit tests either way is proof enough for me, im happy to ship it

@NArmistead
NArmistead marked this pull request as ready for review February 19, 2026 05:49
@NArmistead
NArmistead requested a review from ETSells February 19, 2026 05:49
@ETSells

ETSells commented Feb 19, 2026

Copy link
Copy Markdown
Member

Please attach the mod PR

@NArmistead

Copy link
Copy Markdown
Contributor Author

oopsie SunDevilRocketry/mod#104

@ETSells ETSells left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm!!

Comment thread src/emulator_uart.c
// memset( gps_data_ptr, 0, gps_data_size );
if (message_num >= array_size( gps_msgs ) )
{
printf("[GPS DEBUG] Error: index out of range\n");

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this would cause GPS to stop populating, just FYI. thats fine in this case, I can accept that handling actually

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I was aware of that. Just figured there's no reason to do anything else at that point

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah i think ur 100% right, its good fail-safe handling here, we wanna inform and continue while disabling the feature. only result of hitting the case is gps no longer populated, which would be consistent with a failure of the GPS device on the actual FC.

@NArmistead
NArmistead merged commit b117838 into development/appa Feb 21, 2026
@NArmistead
NArmistead deleted the feature/na/gps-listener branch February 23, 2026 06:35
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

Successfully merging this pull request may close these issues.

2 participants