You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In *_commands.json command files, there are fields like this:
"address":"0x00"
When they are parsed into a std::vector<uint8_t> by string_to_chars(std::string hex_str), the written string length in the JSON will be preserved. The problem is that this length passes directly to the SpaceWire packet constructing functions, and results in a too-short SpaceWire address field if the JSON addresses are not explicitly written 4 B long.
Fix
When parsing out the command file JSON, guarantee the result stored in Command is 4 B long. This is done in CommandDeck::add_commands().
The text was updated successfully, but these errors were encountered:
The trouble
In
*_commands.json
command files, there are fields like this:When they are parsed into a
std::vector<uint8_t>
bystring_to_chars(std::string hex_str)
, the written string length in the JSON will be preserved. The problem is that this length passes directly to the SpaceWire packet constructing functions, and results in a too-short SpaceWire address field if the JSON addresses are not explicitly written 4 B long.Fix
When parsing out the command file JSON, guarantee the result stored in
Command
is 4 B long. This is done inCommandDeck::add_commands()
.The text was updated successfully, but these errors were encountered: