GPS Listener Thread - #27
Conversation
|
@NArmistead lowkenuinely the fact that it passes the unit tests either way is proof enough for me, im happy to ship it |
|
Please attach the mod PR |
|
oopsie SunDevilRocketry/mod#104 |
| // memset( gps_data_ptr, 0, gps_data_size ); | ||
| if (message_num >= array_size( gps_msgs ) ) | ||
| { | ||
| printf("[GPS DEBUG] Error: index out of range\n"); |
There was a problem hiding this comment.
I think this would cause GPS to stop populating, just FYI. thats fine in this case, I can accept that handling actually
There was a problem hiding this comment.
Yeah I was aware of that. Just figured there's no reason to do anything else at that point
There was a problem hiding this comment.
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.
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 thegps_datastruct isn't populated. Can you verify in gdb if it works once you're in the flight state?Changing the line
token[7] = '\0';totoken[6] = '\0';in GPS_parse fixes this for me.