Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
co2ampel
ampel-firmware
Commits
bf874906
Commit
bf874906
authored
Apr 19, 2021
by
Eric Duminil
Browse files
A bit less log
parent
df65b2d9
Pipeline
#2838
passed with stage
in 1 minute and 41 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
ampel-firmware/sensor_console.cpp
View file @
bf874906
...
...
@@ -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
();
}
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment