diff --git a/groundStation/src/backend/commands.c b/groundStation/src/backend/commands.c index fe8151978f113fbdba1c94264790098cbb363818..1c451d39bf6b6eb415e7d5b163d4fdc543dbc533 100644 --- a/groundStation/src/backend/commands.c +++ b/groundStation/src/backend/commands.c @@ -73,111 +73,71 @@ struct MessageType MessageTypes[MAX_TYPE_ID] = { // DEBUG { - // ID - DEBUG_ID, // Command text "debug", - // Type of the command data - stringType, // Function pointer &cb_debug }, // PACKETLOG { - // ID - PACKETLOG_ID, // Command text "packetlog", - // Type of the command data - stringType, // Function pointer &cb_packetlog }, // GETPACKETLOGS { - // ID - GETPACKETLOGS_ID, // Command text "getpacketlogs", - // Type of the command data - stringType, // Function pointer &cb_getpacketlogs }, // UPDATE { - // ID - UPDATE_ID, // Command text "update", - // Type of the command data - stringType, // Function pointer &cb_update }, // BEGINUPDATE { - // ID - BEGINUPDATE_ID, // Command text "beginupdate", - // Type of the command data - stringType, // Function pointer &cb_beginupdate }, // LOG { - // ID - LOG_ID, // Command text "log", - // Type of the command data - stringType, // Function pointer &cb_log }, // RESPONSE { - // ID - RESPONSE_ID, // Command text "response", - // Type of the command data - stringType, // Function pointer &cb_response }, // SETCONTROL { - // ID - SETCONTROL_ID, // Command text "setcontrol", - // Type of the command data - floatType, // Function pointer &cb_setcontrol }, // GETCONTROL { - // ID - GETCONTROL_ID, // Command text "getcontrol", - // Type of the command data - floatType, // Function pointer &cb_getcontrol }, // RESPCONTROL { - // ID - RESPCONTROL_ID, // Command text "respcontrol", - // Type of the command data - floatType, // Function pointer &cb_respcontrol } diff --git a/groundStation/src/backend/commands.h b/groundStation/src/backend/commands.h index ecbae2c0438b372ac370121eab71fb5166c09676..aeb11ad20e57b50f6c8757009766a3e4d022abe2 100644 --- a/groundStation/src/backend/commands.h +++ b/groundStation/src/backend/commands.h @@ -14,17 +14,6 @@ enum Message{ END_CHAR = 0xED }; -/* - * Enumeration of the data types that a callback function may use - * doubleType should get added here at some point - */ -enum DataType -{ - floatType, // 00 - intType, // 01 - stringType // 02 -}; - /* * Message type IDs used to know what kind of message we are dealing with * Enumeration used to index the MessageTypes array in commands.c @@ -74,16 +63,7 @@ enum ControllerValueID{ * pointers located in commands.c */ struct MessageType{ - /* TODO The ID may not even be needed since it already an enumerated value - * I found some instances of this being used like the following: - * "MessageTypes[LOG_TYPE_ID].ID" which makes no sense since the ID member - * in the MessageType is already set to be equal to the enumeration value - * instead they could have just done "LOG_TYPE_ID" directly since - * MessageTypes[LOG_TYPE_ID].ID always == LOG_TYPE_ID - */ - char ID; char cmdText[MAX_CMD_TEXT_LENGTH]; - char cmdDataType; command_cb * functionPtr; };