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

Add new PGNs and expand AIS PGNs #396

Merged
merged 4 commits into from
May 10, 2024

Conversation

lsoltero
Copy link
Contributor

Added PGN 127510
Added PGN 127750
Modified AIS PGN PGN 129038, 129039, 129794, 129809, and 129810 to include AIS Transceiver Info and SID (where applicable)

Argument list for AIS PGNs has changed but added stubs to keep backward compatibility with previous versions.

lsoltero and others added 4 commits March 18, 2024 15:20
Modify PGN 129038, 129039, 129794, 129809, and 129810 to include AIS Transceiver Info and SID (where applicable)
resolving conflicts for PNG192810
@lsoltero
Copy link
Contributor Author

hi timo,

where do we stand with this?

--luis

@ttlappalainen
Copy link
Owner

Have not had time to check all changes.

@ttlappalainen
Copy link
Owner

No

@ttlappalainen ttlappalainen merged commit c0e04c3 into ttlappalainen:master May 10, 2024
1 check failed
@ttlappalainen
Copy link
Owner

Please check SetN2kPGN129794 again. You add SID at end, while old version added just 0xff for SID as default.

@lsoltero
Copy link
Contributor Author

Hi Timo,

the SID was added to PGN129794 on purpose. It is the static portion of the a class A type 1, 2, or 3 AIS transmission. Since there can be several sources of AIS on a network it's important to tie a particular 129794 mess to the corresponding 129038 message.

So the SID should be there... In my pull request I set the default for this parameter to 0xFF so that it would be backwards compatible and also allow users to use that as the default should there only be one AIS receiver on the network.

@ttlappalainen
Copy link
Owner

N2kMsg.AddByte((DTE & 0x01)<<6 | (GNSStype & 0x0f)<<2 | (AISversion & 0x03));
N2kMsg.AddByte(0xe0 | (AISinfo & 0x1f)); <-- This is field 20 and 21
N2kMsg.AddByte(0xff);  <-- here is SID postition field 22
N2kMsg.AddByte(SID);  <-- this is one byte too much

Did you actually tested you could see SID? Did you test all new functions e.g., 127750 setter and parser?

@lsoltero
Copy link
Contributor Author

I tested this in as much as I parse data from the N2K bus and send it off to the internet and receive data from the internet and put it on the N2K bus. The MFDs display the data correctly and the upstream servers are OK with the data....

But.. yup.. SID is set to 0xff which is valid and SID is ignore.. so we should remove the AddByte(0xff) which should not be there...

did you want me to do a pull request for this? or did you want to fix it on your end. All that should be required is to delete that line.

Thx,

--Luis

@ttlappalainen
Copy link
Owner

The Simulator is exactly for testing. You can use it to show and send specific data.

@lsoltero
Copy link
Contributor Author

agreed that the simulator is a good thing to have for testing. This is why 2 months ago I purchased one and paid for it... Unfortunately I have not been able to take delivery of the unit which made its way from Vancouver to Orlando and then back... So... currently at AOS waiting for shipping instructions.

In the mean time I have fixed my code and repaired the obvious error as per your suggestion and updated our firmware and published it. The question is what to do now... the risk is small for the change.. so my question to you is.. did you want me to

  1. send in a pull request for the change
  2. wait for you to make the change
  3. wait for the simulator to arrive (if/when it does) do the testing and then do 1 or 2 above.

I am on the boat in transit and not sure when I will be at a place long enough to receive a package. So... 3 could take some time.

Let me know how you would like to proceed.

--Luis

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

Successfully merging this pull request may close these issues.

2 participants