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

Remove unnecessary nonnegative constraint in msgPackSchema #148

Open
wants to merge 1 commit into
base: beta
Choose a base branch
from

Conversation

calvin-laurenson
Copy link

From the spec

Messages shall consist of (in this order):

  • Topic/Publisher ID: unsigned integer, or -1 (RTT measurement)
  • Timestamp: integer microseconds
  • Data type: unsigned integer
  • Data value (see below)

The spec allows negative values for the timestamp. For some reason NetworkTables was sending negative timestamps for me and this fixed it. I haven't done rigorous testing but subscribers are working. The subscription is persistent which is probably related to the negative timestamp but that is an issue for WPILib.

Copy link

codecov bot commented Jan 19, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

❗ No coverage uploaded for pull request base (beta@196f50d). Click here to learn what that means.

Additional details and impacted files
@@           Coverage Diff           @@
##             beta     #148   +/-   ##
=======================================
  Coverage        ?   86.37%           
=======================================
  Files           ?        8           
  Lines           ?      646           
  Branches        ?      127           
=======================================
  Hits            ?      558           
  Misses          ?       88           
  Partials        ?        0           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@cjlawson02
Copy link
Owner

Interesting...

From their design doc:

Timestamps are specified in unsigned integer microseconds

Source

Can you open an issue with them? I'll look in their code to figure out why this is happening.

IMO the schema shouldn't be changed unless this is on purpose. You can make the change in your local node_modules in the meantime

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