"src/csv_writer.cpp" did not exist on "00798414325787d72403fb1022f06180d73491fc"
Commit bf874906 authored by Eric Duminil's avatar Eric Duminil
Browse files

A bit less log

parent df65b2d9
...@@ -50,13 +50,11 @@ namespace sensor_console { ...@@ -50,13 +50,11 @@ namespace sensor_console {
uint8_t parseCommand(const char *command, char *function_name, int32_t &argument) { uint8_t parseCommand(const char *command, char *function_name, int32_t &argument) {
char split_command[MAX_COMMAND_SIZE]; char split_command[MAX_COMMAND_SIZE];
strlcpy(split_command, command, MAX_COMMAND_SIZE); strlcpy(split_command, command, MAX_COMMAND_SIZE);
Serial.print(F("Received : '"));
Serial.print(command);
Serial.println("'");
char *arg; char *arg;
char *part1; char *part1;
part1 = strtok(split_command, " "); part1 = strtok(split_command, " ");
if (!part1) { if (!part1) {
Serial.println(F("Received empty command"));
// Empty string // Empty string
return 1; return 1;
} }
...@@ -143,18 +141,20 @@ namespace sensor_console { ...@@ -143,18 +141,20 @@ namespace sensor_console {
Serial.print(F("Calling : ")); Serial.print(F("Calling : "));
Serial.print(function_name); Serial.print(function_name);
if (has_argument) { if (has_argument) {
Serial.print("("); Serial.print(F("("));
Serial.print(argument); Serial.print(argument);
Serial.println(")"); Serial.println(F(")"));
commands[i].intFunction(argument); commands[i].intFunction(argument);
} else { } else {
Serial.println("()"); Serial.println(F("()"));
commands[i].voidFunction(); commands[i].voidFunction();
} }
return; return;
} }
} }
Serial.println(F("Message not supported. Available commands :")); Serial.print(F("'"));
Serial.print(command);
Serial.println(F("' not supported. Available commands :"));
listAvailableCommands(); 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