Handle unsupported commands gracefully in terms of their numerical range. Introduce an error code for out-of-range commands.

This commit is contained in:
Lorenz Meier
2015-12-21 09:19:39 +01:00
parent 802ce6ae0b
commit 2041e3f3bc
2 changed files with 10 additions and 3 deletions
+2 -2
View File
@@ -63,8 +63,8 @@ enum NAV_CMD {
NAV_CMD_PATHPLANNING = 81,
NAV_CMD_DO_JUMP = 177,
NAV_CMD_DO_SET_SERVO=183,
NAV_CMD_DO_REPEAT_SERVO=184
NAV_CMD_DO_REPEAT_SERVO=184,
NAV_CMD_INVALID=UINT16_MAX /* ensure that casting a large number results in a specific error */
};
enum ORIGIN {