DelfiSpace / DelfiPQcore

0 stars 1 forks source link

Cannot retrieve SW update version via PQ9bus #51

Closed StefanoSperetta closed 4 years ago

StefanoSperetta commented 4 years ago

The SoftwareUpdateService::getVersionNumber() function responds on the bus:

[8, 11, 1, 18, 2, 0, 212, 23, 26, 55, 208, 5, 10, 94, 89, 135]

where the 6th byte is the slot number (currently slot 0, see https://github.com/DelfiSpace/DelfiPQcore/blob/9e15f6c53f2400e0761cb6f53432710689a95594/SoftwareUpdateService.cpp#L203) and not "no error" as in https://github.com/DelfiSpace/DelfiPQcore/blob/9e15f6c53f2400e0761cb6f53432710689a95594/SoftwareUpdateService.cpp#L267

The OTA responses are a bit hard to parse as they require a state (basically the answer is valid if we know we just sent a getVersion command but we cannot parse it without that knowledge).

CasperBroekhuizen commented 4 years ago

This field was used to make sure the current slot would be easy to distinguish. This functionality has been absorbed by the Housekeeping Header 'Status' field (tc->setStatus(Bootloader::getCurrentSlot());).

Hence the payload_data[0] field has been reverted back to NO_ERROR in https://github.com/DelfiSpace/DelfiPQcore/commit/13598a792bf933fb1558e2e1a1e4d963dc5a5d88