Skip to content

Conversation

@mfine
Copy link
Contributor

@mfine mfine commented Jun 5, 2015

Setup a new bootloader message from the device, containing both the bootloader version and the SBP protocol version as strings. Also add SBP protocol version as a string to the heartbeat.

There's a lot more changes that need to happen on top of this - collecting feedback before embarking on those changes.

/cc @fnoble @cbeighley @mookerji

@swiftnav-jenkins
Copy link
Contributor

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
http://zazu.ci.swiftnav.com/job/libsbp_Pull_Requests/122/
Test PASSed.

@cbeighley
Copy link
Member

lgtm

Copy link
Contributor

Choose a reason for hiding this comment

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

I believe that the intention for the version stuff would go into the reserved field of the heartbeat message?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@mookerji are we using a version string? If we we're packing the version elements (major, minor, sub-minor) into the reserved field, that might be possible - but if we're using an opaque string, that doesn't seem like it will work.

/cc @henryhallam

Copy link
Member

Choose a reason for hiding this comment

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

We've currently got a bit of a mix of encoding vs raw strings for versioning info throughout Piksi. It would probably be good to standardize this. Off the top of my head:

  • STM FW Version
    • String
  • NAP FW Version
    • String
    • Note: Older versions were a 4 byte identifier
  • Bootloader Version
    • String
    • Note: Older versions were a 1 byte identifier
  • HW Version
    • Currently a 4 byte identifier. Should we change this to a string?
  • SBP Protocol Version
    • This PR would introduce it as a string

Copy link
Contributor

Choose a reason for hiding this comment

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

@mfine: Not a version string. In this case, this would put the SBP protocol minor version into the reserved field, like 42.

Copy link
Contributor

Choose a reason for hiding this comment

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

The NAP FW string has already proved to be troublesome to use as a string programmatically - the first 100 lines of main.c in piksi_firmware are a NAP version comparison function (https://github.com/swift-nav/piksi_firmware/blob/master/src/main.c#L57).

I'd vote for making the SBP protocol version a tuple of u8s or something else thats easy to compare programmatically and is more efficient to send in frequent message such as the MSG_HEARTBEAT.

Standardization would be good eventually but I don't think we should get too deep into that right now? I'd say we should make the best choice for the SBP version and use that going forward and we can improve the other versioning schemes later.

For the FW versions I think strings make more sense anyway as they are primarily just for displaying to the user.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

So we'd have 24 bits in the reserved field of the heartbeat message? And use a similar fields scheme for the new bootloader handshake? Makes sense to be more formal and rigid with the SBP protocol version. Any objections?

Copy link
Member

Choose a reason for hiding this comment

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

Sounds good

Copy link
Contributor

Choose a reason for hiding this comment

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

👍 💯

@mfine
Copy link
Contributor Author

mfine commented Jun 5, 2015

👍 for standardizing.

@mookerji
Copy link
Contributor

mookerji commented Jun 5, 2015

👍 for standardizing

@swiftnav-jenkins
Copy link
Contributor

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
http://zazu.ci.swiftnav.com/job/libsbp_Pull_Requests/123/
Test PASSed.

@cbeighley
Copy link
Member

Do we need 24 bits for the SBP protocol version? Seems like a lot. Would be nice if it was byte aligned as well for the heartbeat. What about 16 bits from [8:24)?

@mfine
Copy link
Contributor Author

mfine commented Jun 5, 2015

@cbeighley k, had it in my head we wanted a 3 tuple - but yeah, just needs a major.minor for communication. Will update and make it byte aligned.

@swiftnav-jenkins
Copy link
Contributor

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
http://zazu.ci.swiftnav.com/job/libsbp_Pull_Requests/124/
Test PASSed.

@swiftnav-jenkins
Copy link
Contributor

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
http://zazu.ci.swiftnav.com/job/libsbp_Pull_Requests/125/
Test PASSed.

@mfine
Copy link
Contributor Author

mfine commented Jun 8, 2015

bump on any reviews here.

Copy link
Contributor

Choose a reason for hiding this comment

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

Do you think deprecated messages should be public? I can see arguments both ways...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, maybe they should inherit their previous state? Like if they were public, they stay public? And vice versa.

@swiftnav-jenkins
Copy link
Contributor

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
http://zazu.ci.swiftnav.com/job/libsbp_Pull_Requests/126/
Test PASSed.

@swiftnav-jenkins
Copy link
Contributor

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
http://zazu.ci.swiftnav.com/job/libsbp_Pull_Requests/127/
Test PASSed.

@mookerji
Copy link
Contributor

mookerji commented Jun 8, 2015

Looking at this just now.

@mookerji
Copy link
Contributor

mookerji commented Jun 8, 2015

Looks good. Merge at will.

@swiftnav-jenkins
Copy link
Contributor

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
http://zazu.ci.swiftnav.com/job/libsbp_Pull_Requests/128/
Test PASSed.

mfine added a commit that referenced this pull request Jun 8, 2015
Deprecate bootloader handshake +  send SBP protocol version
@mfine mfine merged commit 434020b into swift-nav:master Jun 8, 2015
@mfine mfine deleted the mfine-protocol-version branch June 8, 2015 22:07
silverjam pushed a commit that referenced this pull request May 25, 2023
…RCE_DIR (#154) (#1330)

Automated PR by Jenkins. If CI has passed successfully, merge away!

**cmake**  38cf865b  ->  12b7f037
- 12b7f037 : Fix TEST_SRCS property - use CMAKE_SOURCE_DIR
(swift-nav/cmake#154)


This pull request was created by
https://jenkins.ci.swift-nav.com/job/CI%20Infra/job/submodule-update/14233/.
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.

5 participants