Optimierung Systemhochlauf
This commit is contained in:
@@ -297,7 +297,7 @@ void MqttClient_Publish_MotorSwitchState(int iMotorIndex, unsigned char nSwitchS
|
||||
{
|
||||
nMqttMotor1SwitchState = nSwitchState;
|
||||
char message[100];
|
||||
snprintf(message, sizeof(message), "%d", nSwitchState);
|
||||
snprintf(message, sizeof(message), "%2X", nSwitchState);
|
||||
mosquitto_publish(mosq, NULL, mqtt_topic_motor1_switchstate, strlen(message), message, 0, false);
|
||||
}
|
||||
}
|
||||
@@ -307,7 +307,7 @@ void MqttClient_Publish_MotorSwitchState(int iMotorIndex, unsigned char nSwitchS
|
||||
{
|
||||
nMqttMotor2SwitchState = nSwitchState;
|
||||
char message[100];
|
||||
snprintf(message, sizeof(message), "%d", nSwitchState);
|
||||
snprintf(message, sizeof(message), "%2X", nSwitchState);
|
||||
mosquitto_publish(mosq, NULL, mqtt_topic_motor2_switchstate, strlen(message), message, 0, false);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user