diff --git a/groundStation/src/backend/commands.c b/groundStation/src/backend/commands.c index d8ce39f9f1148515eeb531accedd0f3ea02c029a..3cf67d0289a8606be838cea96d78b6f1e4972cac 100644 --- a/groundStation/src/backend/commands.c +++ b/groundStation/src/backend/commands.c @@ -86,6 +86,9 @@ command_cb cb_setheightd __attribute__((weak, alias("cb_default"))); command_cb cb_setheight __attribute__((weak, alias("cb_default"))); command_cb cb_setlat __attribute__((weak, alias("cb_default"))); command_cb cb_setlong __attribute__((weak, alias("cb_default"))); +command_cb cb_setyaw __attribute__((weak, alias("cb_default"))); +command_cb cb_setpitch __attribute__((weak, alias("cb_default"))); +command_cb cb_setroll __attribute__((weak, alias("cb_default"))); /* Default callbacks for getters */ command_cb cb_getyawp __attribute__((weak, alias("cb_default"))); @@ -118,6 +121,9 @@ command_cb cb_getheightd __attribute__((weak, alias("cb_default"))); command_cb cb_getheight __attribute__((weak, alias("cb_default"))); command_cb cb_getlat __attribute__((weak, alias("cb_default"))); command_cb cb_getlong __attribute__((weak, alias("cb_default"))); +command_cb cb_getyaw __attribute__((weak, alias("cb_default"))); +command_cb cb_getpitch __attribute__((weak, alias("cb_default"))); +command_cb cb_getroll __attribute__((weak, alias("cb_default"))); /* Default callbacks for responses */ command_cb cb_respyawp __attribute__((weak, alias("cb_default"))); @@ -150,6 +156,9 @@ command_cb cb_respheightd __attribute__((weak, alias("cb_default"))); command_cb cb_respheight __attribute__((weak, alias("cb_default"))); command_cb cb_resplat __attribute__((weak, alias("cb_default"))); command_cb cb_resplong __attribute__((weak, alias("cb_default"))); +command_cb cb_respyaw __attribute__((weak, alias("cb_default"))); +command_cb cb_resppitch __attribute__((weak, alias("cb_default"))); +command_cb cb_resproll __attribute__((weak, alias("cb_default"))); /* Command structure */ struct MessageType MessageTypes[MAX_TYPE] = @@ -533,6 +542,39 @@ struct MessageType MessageTypes[MAX_TYPE] = floatType, // Function pointer &cb_setlong + }, + // yaw setpoint subtype + { + // ID + 0x1E, + // Command text + "setyaw", + // Type of the command data + floatType, + // Function pointer + &cb_setyaw + }, + // pitch setpoint subtype + { + // ID + 0x1F, + // Command text + "setpitch", + // Type of the command data + floatType, + // Function pointer + &cb_setpitch + }, + // roll setpoint subtype + { + // ID + 0x20, + // Command text + "setroll", + // Type of the command data + floatType, + // Function pointer + &cb_setroll } } }, @@ -873,7 +915,41 @@ struct MessageType MessageTypes[MAX_TYPE] = floatType, // Function pointer &cb_getlong + }, + // yaw getpoint subtype + { + // ID + 0x1E, + // Command text + "getyaw", + // Type of the command data + floatType, + // Function pointer + &cb_getyaw + }, + // pitch getpoint subtype + { + // ID + 0x1F, + // Command text + "getpitch", + // Type of the command data + floatType, + // Function pointer + &cb_getpitch + }, + // roll getpoint subtype + { + // ID + 0x20, + // Command text + "getroll", + // Type of the command data + floatType, + // Function pointer + &cb_getroll } + } }, @@ -1213,7 +1289,40 @@ struct MessageType MessageTypes[MAX_TYPE] = floatType, // Function pointer &cb_resplong - } + }, + // yaw resppoint subtype + { + // ID + 0x1E, + // Command text + "respyaw", + // Type of the command data + floatType, + // Function pointer + &cb_respyaw + }, + // pitch resppoint subtype + { + // ID + 0x1F, + // Command text + "resppitch", + // Type of the command data + floatType, + // Function pointer + &cb_resppitch + }, + // roll resppoint subtype + { + // ID + 0x20, + // Command text + "resproll", + // Type of the command data + floatType, + // Function pointer + &cb_resproll + } } }, // UPDATE