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

Handle different line endings #90

Closed
wants to merge 6 commits into from
Closed

Handle different line endings #90

wants to merge 6 commits into from

Conversation

rgov
Copy link
Contributor

@rgov rgov commented Jan 16, 2020

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.

Vikrant Shah and others added 6 commits December 29, 2018 14:45
- 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.
Copy link
Collaborator

@evenator evenator left a 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) ]
Copy link
Collaborator

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?

@evenator evenator changed the base branch from melodic-devel to master January 19, 2020 00:42
@evenator
Copy link
Collaborator

Can you please rebase this PR onto the master branch? You should be able to do that with the following commands:

git rebase melodic-devel --onto master
git push --force

@rgov
Copy link
Contributor Author

rgov commented Jan 19, 2020

Closing this to re-create it with a new source branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Nothing published to /fix
3 participants