echo every command in array

This commit is contained in:
Nicu Hodos 2022-10-23 09:05:18 +02:00
parent 711ba29f15
commit cb95fbba71
2 changed files with 4 additions and 6 deletions

View File

@ -15,9 +15,6 @@ steps:
- pio run -e pro-mini
- echo -n 'reset' > /dev/ttyUSB0; sleep 1s; avrdude -patmega328p -carduino -P/dev/ttyUSB0 -b115200 -D -Uflash:w:.pio/build/pro-mini/firmware.hex:i -v
- service ser2net start
when:
target:
- production
trigger:
branch:

View File

@ -128,6 +128,9 @@ void runJsonCommand(String cmd) {
mySwitch.send(rcSwitch["value"]);
// Serial.println((const char*)rcSwitch["value"]);
}
char output[256];
serializeJson(jsonDoc, output);
Serial.println(output);
blink();
} else {
Serial.println(err.c_str());
@ -148,8 +151,6 @@ void readCommand() {
if (cmd.endsWith(",")) {
cmd = cmd.substring(0, cmd.lastIndexOf(','));
}
cmd = "[" + cmd + "]";
Serial.println(cmd);
runJsonCommand(cmd);
runJsonCommand("[" + cmd + "]");
}
}