kopia lustrzana https://github.com/martin-ger/esp_mqtt
Call published event after subscribe, resolved #12
rodzic
f837152bde
commit
34a3ea49b5
|
@ -111,8 +111,11 @@ void MQTT_Publish( MQTT_Client *client,
|
|||
```
|
||||
|
||||
**Default configuration**
|
||||
|
||||
See: *include/user_config.h* and *include/config.c*
|
||||
|
||||
If you want to load new default configurations, just change the value of CFG_HOLDER in ***include/user_config.h***
|
||||
|
||||
Now in the Makefile, it will erase section hold the user configuration at 0x3C000
|
||||
|
||||
```bash
|
||||
|
|
|
@ -168,8 +168,7 @@ mqtt_tcpclient_recv(void *arg, char *pdata, unsigned short len)
|
|||
|
||||
} else {
|
||||
INFO("MQTT: Connected to %s:%d\r\n", client->host, client->port);
|
||||
if(client->connectedCb)
|
||||
client->connectedCb((uint32_t*)client);
|
||||
|
||||
client->connState = MQTT_SUBSCIBE_SEND;
|
||||
}
|
||||
break;
|
||||
|
@ -185,6 +184,8 @@ mqtt_tcpclient_recv(void *arg, char *pdata, unsigned short len)
|
|||
} else {
|
||||
if(QUEUE_IsEmpty(&client->topicQueue)){
|
||||
client->connState = MQTT_DATA;
|
||||
if(client->connectedCb)
|
||||
client->connectedCb((uint32_t*)client);
|
||||
} else {
|
||||
client->connState = MQTT_SUBSCIBE_SEND;
|
||||
}
|
||||
|
|
Ładowanie…
Reference in New Issue