Skip to content
Snippets Groups Projects
Unverified Commit 5fab267f authored by Jake's avatar Jake
Browse files

Implemented FindCommand

parent 19fedcae
No related branches found
No related tags found
No related merge requests found
......@@ -183,3 +183,14 @@ struct MessageType MessageTypes[MAX_TYPE_ID] =
}
};
int findCommand(char * str)
{
for (int i = 0; i < MAX_TYPE_ID; i++) {
if (strcmp(str, MessageTypes[i].cmdText) == 0) {
return i;
}
}
return -1;
}
......@@ -89,10 +89,6 @@ struct MessageType{
/* Defined in commands.c */
extern struct MessageType MessageTypes[MAX_TYPE_ID];
/* Legacy functions - no idea what uses these. Please do not delete. */
float getFloat(unsigned char* str, int pos);
int getInt(unsigned char* str, int pos);
/* end legacy crap */
int findCommand(char * cmdStr);
#endif
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