-
Notifications
You must be signed in to change notification settings - Fork 252
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
Handle different line endings #90
Conversation
- Catch Serial exceptions and exit cleanly, instead of printing Python stack trace. - Catch Serial exception when opening the serial port, log a FATAL message, and exit instead of printing Python stack trace.
Add a NMEA socket driver node, which is like the existing serial driver node, but instead of attaching to a TTY handle from a serial port, it listens to a UDP port for NMEA sentences.
* Adds support for IMU aided GPS systems like the Applanix POS/MV, whose NMEA strings typically begin '$IN'. (e.g. $INGGA). * Adds support for VTG messages, which contain Course Over Ground and Speed Made Good. These are useful when not using RMC messages and you don't have a heading sensor.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @rgov. Thanks for your contribution! I think this looks like a good fix for the issue you reported. I have one small request, and I still have to test the PR to verify it. Once all that's complete, I'll merge the PR to master
and backport it to supported releases.
|
||
# strip the data | ||
data_list = data.strip().split("\n") | ||
data_list = [ line.strip() for line in re.split(r'[\r\n]+', data) ] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you make this a compiled regex at module level to speed it up a bit?
Can you please rebase this PR onto the git rebase melodic-devel --onto master
git push --force |
Closing this to re-create it with a new source branch. |
This changes the behavior of the socket driver to split incoming messages on different line endings including CR (
\r
), LF (\n
) and CRLF (\r\n
). Fixes #89.