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

is it OK to send NMEA sentences with invalid data? #7

Open
bomilkar opened this issue May 10, 2020 · 0 comments
Open

is it OK to send NMEA sentences with invalid data? #7

bomilkar opened this issue May 10, 2020 · 0 comments

Comments

@bomilkar
Copy link
Contributor

Looking into main.c the return values from the Compose_...() functions are ignored when it comes to send.

Unless it is the intention to send (what Compose considers) invalid data it should be like this

                                result = Compose_Pressure_POV_fast(&s[0], vario);

                                // NMEA sentence valid ?? Otherwise print some error !!
                                if (result != 1)
                                {
                                        printf("POV fast NMEA Result = %d\n",result);
                                } else

                                // Send NMEA string via socket to XCSoar
                                if ((sock_err = send(sock, s, strlen(s)+1, 0)) < 0)
                                {
                                        fprintf(stderr, "send POV_E failed\n");
                                        break;
                                }
 

The difference is in } else .

Obviously the other 2 send() should be conditional, too. Same thing.

Here again: review the nmea log files from XCSoar to see the difference.

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