HaddingtonDynamics / Dexter

GNU General Public License v3.0
367 stars 85 forks source link

Firmware return error for unknown instruction #19

Closed JamesNewton closed 5 years ago

JamesNewton commented 6 years ago

In order for DDE to know if an instruction can actually be executed or not, the firmware needs to return an error if the instruction isn't known. At this point, we can test some changes: In the case of read_from_robot, DDE can tell if the command is not implemented because there will be no file data returned if the firmware hasn't been updated to implement the command. The write_to_robot command can be verified via read_from_robot (checking to see if the file was written). However, In the future, other commands may not return data, so an error message is a good idea.

JamesNewton commented 6 years ago

@kgallspark Can the the Dynamixel command support be detected by looking for Joint 6 / 7 info in the status data? Does it return extra status data for those joints now?

JamesNewton commented 6 years ago

@cfry with the ability to detect if a function isn't supported, either by a lack of return data, or an error message in the future, DDE could suggest user load a new SD Card image if oplet isn't found

JamesNewton commented 6 years ago

Looks like the default: just needs to return false; // (0) and the return after the switch should return true?

JamesNewton commented 3 years ago

Kamino cloned this issue to HaddingtonDynamics/OCADO