Skip to content
Snippets Groups Projects
Commit c24d94c2 authored by dawehr's avatar dawehr
Browse files

added the datatype parameter back into MessageType struct in commands.h...

added the datatype parameter back into MessageType struct in commands.h because Jake actually does need it.
parent b3672bd2
No related branches found
No related tags found
No related merge requests found
......@@ -75,6 +75,8 @@ struct MessageType MessageTypes[MAX_TYPE_ID] =
{
// Command text
"debug",
// Type of the command data
stringType,
// Function pointer
&cb_debug
},
......@@ -82,6 +84,8 @@ struct MessageType MessageTypes[MAX_TYPE_ID] =
{
// Command text
"packetlog",
// Type of the command data
stringType,
// Function pointer
&cb_packetlog
},
......@@ -89,6 +93,8 @@ struct MessageType MessageTypes[MAX_TYPE_ID] =
{
// Command text
"getpacketlogs",
// Type of the command data
stringType,
// Function pointer
&cb_getpacketlogs
},
......@@ -96,6 +102,8 @@ struct MessageType MessageTypes[MAX_TYPE_ID] =
{
// Command text
"update",
// Type of the command data
stringType,
// Function pointer
&cb_update
},
......@@ -103,6 +111,8 @@ struct MessageType MessageTypes[MAX_TYPE_ID] =
{
// Command text
"beginupdate",
// Type of the command data
stringType,
// Function pointer
&cb_beginupdate
},
......@@ -110,6 +120,8 @@ struct MessageType MessageTypes[MAX_TYPE_ID] =
{
// Command text
"log",
// Type of the command data
stringType,
// Function pointer
&cb_log
},
......@@ -117,6 +129,8 @@ struct MessageType MessageTypes[MAX_TYPE_ID] =
{
// Command text
"response",
// Type of the command data
stringType,
// Function pointer
&cb_response
},
......@@ -124,6 +138,8 @@ struct MessageType MessageTypes[MAX_TYPE_ID] =
{
// Command text
"setcontrol",
// Type of the command data
floatType,
// Function pointer
&cb_setcontrol
},
......@@ -131,6 +147,8 @@ struct MessageType MessageTypes[MAX_TYPE_ID] =
{
// Command text
"getcontrol",
// Type of the command data
floatType,
// Function pointer
&cb_getcontrol
},
......@@ -138,6 +156,8 @@ struct MessageType MessageTypes[MAX_TYPE_ID] =
{
// Command text
"respcontrol",
// Type of the command data
floatType,
// Function pointer
&cb_respcontrol
}
......
......@@ -14,6 +14,17 @@ 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
......@@ -64,6 +75,7 @@ enum ControllerValueID{
*/
struct MessageType{
char cmdText[MAX_CMD_TEXT_LENGTH];
char cmdDataType;
command_cb * functionPtr;
};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment