MqttHandleInverter: Replace all print and println with printf

This commit is contained in:
Thomas Basler
2025-04-11 21:05:17 +02:00
parent 5cb7fcd854
commit 3572f177fa

View File

@@ -169,7 +169,7 @@ void MqttHandleInverterClass::onMqttMessage(Topic t, const espMqttClientTypes::M
auto inv = Hoymiles.getInverterBySerial(serial);
if (inv == nullptr) {
MessageOutput.println("Inverter not found");
MessageOutput.printf("Inverter not found\r\n");
return;
}
@@ -202,7 +202,7 @@ void MqttHandleInverterClass::onMqttMessage(Topic t, const espMqttClientTypes::M
if (!properties.retain) {
inv->sendActivePowerControlRequest(payload_val, PowerLimitControlType::RelativNonPersistent);
} else {
MessageOutput.println("Ignored because retained");
MessageOutput.printf("Ignored because retained\r\n");
}
break;
@@ -212,7 +212,7 @@ void MqttHandleInverterClass::onMqttMessage(Topic t, const espMqttClientTypes::M
if (!properties.retain) {
inv->sendActivePowerControlRequest(payload_val, PowerLimitControlType::AbsolutNonPersistent);
} else {
MessageOutput.println("Ignored because retained");
MessageOutput.printf("Ignored because retained\r\n");
}
break;
@@ -228,7 +228,7 @@ void MqttHandleInverterClass::onMqttMessage(Topic t, const espMqttClientTypes::M
if (!properties.retain && payload_val == 1) {
inv->sendRestartControlRequest();
} else {
MessageOutput.println("Ignored because retained or numeric value not '1'");
MessageOutput.printf("Ignored because retained or numeric value not '1'\r\n");
}
break;
@@ -238,7 +238,7 @@ void MqttHandleInverterClass::onMqttMessage(Topic t, const espMqttClientTypes::M
if (!properties.retain && payload_val == 1) {
inv->resetRadioStats();
} else {
MessageOutput.println("Ignored because retained or numeric value not '1'");
MessageOutput.printf("Ignored because retained or numeric value not '1'\r\n");
}
}
}