Skip to content

Commit

Permalink
[P020] Sourcecode formatting for clarification
Browse files Browse the repository at this point in the history
  • Loading branch information
tonhuisman committed Aug 12, 2023
1 parent 02e449b commit 07252d6
Showing 1 changed file with 10 additions and 14 deletions.
24 changes: 10 additions & 14 deletions src/_P020_Ser2Net.ino
Original file line number Diff line number Diff line change
Expand Up @@ -322,20 +322,16 @@ boolean Plugin_020(uint8_t function, struct EventStruct *event, String& string)
break;
}

if (equals(command, F("serialsend"))) {
task->ser2netSerial->write(string.substring(11).c_str());
task->ser2netSerial->flush();
success = true;
} else

if (equals(command, F("serialsendmix"))) {
std::vector<uint8_t> argument = parseHexTextData(string);
task->ser2netSerial->write(&argument[0], argument.size());
task->ser2netSerial->flush();
success = true;
} else

if ((equals(command, F("ser2netclientsend"))) && (task->hasClientConnected())) {
if (equals(command, F("serialsend"))) {
task->ser2netSerial->write(string.substring(11).c_str());
task->ser2netSerial->flush();
success = true;
} else if (equals(command, F("serialsendmix"))) {
std::vector<uint8_t> argument = parseHexTextData(string);
task->ser2netSerial->write(&argument[0], argument.size());
task->ser2netSerial->flush();
success = true;
} else if ((equals(command, F("ser2netclientsend"))) && (task->hasClientConnected())) {
task->ser2netClient.print(string.substring(18));
task->ser2netClient.flush();
success = true;
Expand Down

0 comments on commit 07252d6

Please sign in to comment.