@@ -145,7 +145,7 @@ void EmbUI::mqtt_reconnect(){
145
145
}
146
146
147
147
void EmbUI::onMqttDisconnect (AsyncMqttClientDisconnectReason reason) {
148
- Serial. println ( F (" Disconnected from MQTT." ));
148
+ LOG (println, F (" UI: Disconnected from MQTT." ));
149
149
embui.sysData .mqtt_connect = false ;
150
150
embui.sysData .mqtt_connected = false ;
151
151
}
@@ -157,15 +157,15 @@ void EmbUI::_onMqttConnect(bool sessionPresent) {
157
157
void EmbUI::onMqttConnect (){
158
158
sysData.mqtt_connect = false ;
159
159
sysData.mqtt_connected = true ;
160
- Serial. println ( F (" Connected to MQTT." ));
160
+ LOG (println, F (" UI: Connected to MQTT." ));
161
161
if (sysData.mqtt_remotecontrol ){
162
162
subscribeAll ();
163
163
}
164
164
}
165
165
166
166
void EmbUI::onMqttMessage (char * topic, char * payload, AsyncMqttClientMessageProperties properties, size_t len, size_t index, size_t total) {
167
- LOG (print, F (" Publish received: " ));
168
- Serial. println ( topic);
167
+ LOG (print, F (" UI: Publish received: " ));
168
+ LOG (println, topic);
169
169
170
170
char buffer[len + 2 ];
171
171
memset (buffer, 0 , sizeof (buffer));
@@ -201,10 +201,10 @@ void EmbUI::subscribeAll(bool isOnlyGetSet){
201
201
if (isOnlyGetSet){
202
202
mqttClient.subscribe (id (F (" embui/set/#" )).c_str (), 0 );
203
203
mqttClient.subscribe (id (F (" embui/get/#" )).c_str (), 0 );
204
- LOG (println, F (" Subscribe embui/get/# & embui/set/#" ));
204
+ LOG (println, F (" UI: Subscribe embui/get/# & embui/set/#" ));
205
205
} else {
206
206
mqttClient.subscribe (id (F (" embui/#" )).c_str (), 0 );
207
- LOG (println, F (" Subscribe All (embui/#)" ));
207
+ LOG (println, F (" UI: Subscribe All (embui/#)" ));
208
208
}
209
209
}
210
210
0 commit comments