foxsi / foxsi-4matter

Code for FOXSI-4 formatter.
https://foxsi.umn.edu/
1 stars 3 forks source link

`TransportLayerMachine::sync_send_buffer_commands_to_system()` should call `::sync_send_command_to_system()` internally #60

Closed thanasipantazides closed 8 months ago

thanasipantazides commented 9 months ago

What it says in the title.

Right now, Circle calls the send_buffer_commands method to do all uplink commanding, and otherwise uses send_command_to_system for general-purpose hardcoded commands. The former (buffer_commands) doesn't check at all if the command gets a reply or not. So this could explain a lot of the #58 behavior.

Implementation plan

The TransportLayerMachine::sync_send_buffer_commands_to_system() try block should only include a call to ::sync_send_command_to_system():

// ...
std::vector<uint8_t> reply(0);
try {
    reply = TransportLayerMachine::sync_send_command_to_system(sys_man, command);
} catch (std::exception& e) {
    utilities::error_print("could not execute uplink command!\n);
}

return reply;
// ...