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

Updates and fixes to NMEA and Seatalk libraries #2351

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

pgrawehr
Copy link
Contributor

@pgrawehr pgrawehr commented Sep 8, 2024

Adds a few new messages to the NMEA0183 and Setalak protocols. Includes some new position and angle helper methods.

  • Improves UDP broadcast server behavior
Microsoft Reviewers: Open in CodeFlow

pgrawehr and others added 2 commits September 2, 2024 21:07
Intensive real-world testing has been done on
these.
@dotnet-policy-service dotnet-policy-service bot added the area-device-bindings Device Bindings for audio, sensor, motor, and display hardware that can used with System.Device.Gpio label Sep 8, 2024
@pgrawehr pgrawehr marked this pull request as ready for review September 8, 2024 19:19
Copy link
Member

@Ellerbach Ellerbach left a comment

Choose a reason for hiding this comment

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

Looks good all up, just few comments.

src/devices/Common/Iot/Device/Common/SimpleFileLogger.cs Outdated Show resolved Hide resolved
if (unicast.Address.AddressFamily == AddressFamily.InterNetwork)
{
byte[] ipBytes = unicast.Address.GetAddressBytes();
// A virtual address usually looks like a router address, that means it's last part is .1
Copy link
Member

Choose a reason for hiding this comment

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

my router is not on a .1 address, not super sure you can use this trick

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is a bit of trial-and-error code. It tries to find the main ethernet adapter of the local computer. The assumption here is that if an adapter has .1 then it's not the one connecting to the internet, but rather one that is used e.g. as a virtual adapter for docker/VM services.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-device-bindings Device Bindings for audio, sensor, motor, and display hardware that can used with System.Device.Gpio
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants