mirror of
https://github.com/lumapu/ahoy.git
synced 2025-05-16 02:16:37 +02:00
ESP32 support added
* ESP32 adjustments, compiles and runs * Changed gitignore to ignore debug log files
This commit is contained in:
parent
9ca1792480
commit
0ad53d56d8
13 changed files with 153 additions and 50 deletions
|
@ -6,7 +6,16 @@
|
|||
#ifndef __MQTT_H__
|
||||
#define __MQTT_H__
|
||||
|
||||
#include <ESP8266WiFi.h>
|
||||
#ifdef ESP8266
|
||||
#include <ESP8266WiFi.h>
|
||||
#elif defined(ESP32)
|
||||
#include <WiFi.h>
|
||||
#endif
|
||||
|
||||
#if defined(ESP32) && defined(F)
|
||||
#undef F
|
||||
#define F(sl) (sl)
|
||||
#endif
|
||||
#include <PubSubClient.h>
|
||||
#include "defines.h"
|
||||
|
||||
|
@ -70,7 +79,11 @@ class mqtt {
|
|||
void reconnect(void) {
|
||||
DPRINTLN(DBG_DEBUG, F("mqtt.h:reconnect"));
|
||||
DPRINTLN(DBG_DEBUG, F("MQTT mClient->_state ") + String(mClient->state()) );
|
||||
DPRINTLN(DBG_DEBUG, F("WIFI mEspClient.status ") + String(mEspClient.status()) );
|
||||
|
||||
#ifdef ESP8266
|
||||
DPRINTLN(DBG_DEBUG, F("WIFI mEspClient.status ") + String(mEspClient.status()) );
|
||||
#endif
|
||||
|
||||
boolean resub = false;
|
||||
if(!mClient->connected()) {
|
||||
if(strlen(mDevName) > 0) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue