we now send packets to mqtt server

This commit is contained in:
Kevin Hester
2021-04-03 22:27:06 +08:00
parent f3f09f0dcf
commit 638cec7f25
5 changed files with 39 additions and 19 deletions

View File

@@ -2,6 +2,7 @@
#include "configuration.h"
#include "concurrency/OSThread.h"
#include <PubSubClient.h>
#include <WiFiClient.h>
@@ -9,7 +10,7 @@
* Our wrapper/singleton for sending/receiving MQTT "udp" packets. This object isolates the MQTT protocol implementation from
* the two components that use it: MQTTPlugin and MQTTSimInterface.
*/
class MQTT
class MQTT : private concurrency::OSThread
{
// supposedly the current version is busted:
// http://www.iotsharing.com/2017/08/how-to-use-esp32-mqtts-with-mqtts-mosquitto-broker-tls-ssl.html
@@ -25,6 +26,9 @@ class MQTT
*/
void publish(const MeshPacket &mp);
protected:
virtual int32_t runOnce();
private:
const char *getCryptTopic(const char *channelId);
};