kopia lustrzana https://github.com/meshtastic/firmware
possible fix for stuck MQTT handler.
rodzic
c1381b9ebd
commit
ea87193c8f
|
@ -253,7 +253,7 @@ void MQTT::onSend(const MeshPacket &mp, ChannelIndex chIndex)
|
|||
}
|
||||
|
||||
// converts a downstream packet into a json message
|
||||
String MQTT::downstreamPacketToJson(MeshPacket *mp)
|
||||
std::string MQTT::downstreamPacketToJson(MeshPacket *mp)
|
||||
{
|
||||
using namespace json11;
|
||||
|
||||
|
@ -398,8 +398,8 @@ String MQTT::downstreamPacketToJson(MeshPacket *mp)
|
|||
};
|
||||
|
||||
// serialize and return it
|
||||
static std::string jsonStr = jsonObj.dump();
|
||||
std::string jsonStr = jsonObj.dump();
|
||||
DEBUG_MSG("serialized json message: %s\n", jsonStr.c_str());
|
||||
|
||||
return jsonStr.c_str();
|
||||
return jsonStr;
|
||||
}
|
||||
|
|
|
@ -58,7 +58,7 @@ class MQTT : private concurrency::OSThread
|
|||
void onPublish(char *topic, byte *payload, unsigned int length);
|
||||
|
||||
/// Called when a new publish arrives from the MQTT server
|
||||
String downstreamPacketToJson(MeshPacket *mp);
|
||||
std::string downstreamPacketToJson(MeshPacket *mp);
|
||||
|
||||
/// Return 0 if sleep is okay, veto sleep if we are connected to pubsub server
|
||||
// int preflightSleepCb(void *unused = NULL) { return pubSub.connected() ? 1 : 0; }
|
||||
|
|
Ładowanie…
Reference in New Issue