Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Build] Fix compiler warnings #4757

Merged
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());
TD-er marked this conversation as resolved.
Show resolved Hide resolved
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