Commit bf874906 authored by Eric Duminil's avatar Eric Duminil
Browse files

A bit less log

parent df65b2d9
Pipeline #2838 passed with stage
in 1 minute and 41 seconds
......@@ -50,13 +50,11 @@ namespace sensor_console {
uint8_t parseCommand(const char *command, char *function_name, int32_t &argument) {
char split_command[MAX_COMMAND_SIZE];
strlcpy(split_command, command, MAX_COMMAND_SIZE);
Serial.print(F("Received : '"));
Serial.print(command);
Serial.println("'");
char *arg;
char *part1;
part1 = strtok(split_command, " ");
if (!part1) {
Serial.println(F("Received empty command"));
// Empty string
return 1;
}
......@@ -143,18 +141,20 @@ namespace sensor_console {
Serial.print(F("Calling : "));
Serial.print(function_name);
if (has_argument) {
Serial.print("(");
Serial.print(F("("));
Serial.print(argument);
Serial.println(")");
Serial.println(F(")"));
commands[i].intFunction(argument);
} else {
Serial.println("()");
Serial.println(F("()"));
commands[i].voidFunction();
}
return;
}
}
Serial.println(F("Message not supported. Available commands :"));
Serial.print(F("'"));
Serial.print(command);
Serial.println(F("' not supported. Available commands :"));
listAvailableCommands();
}
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment