diff --git a/src/CHANGES.md b/src/CHANGES.md index 9b423b7e..fa6709fb 100644 --- a/src/CHANGES.md +++ b/src/CHANGES.md @@ -6,3 +6,4 @@ * generate `bin.gz` only for 1M device ESP8285 * fix calcSunrise was not called every day * incresed number of allowed characters for MQTT user, broker and password +* added NRF24 info to Systeminfo, thanks @DanielR92 diff --git a/src/app.cpp b/src/app.cpp index 1882a3d2..b84dbe51 100644 --- a/src/app.cpp +++ b/src/app.cpp @@ -62,14 +62,14 @@ void app::setup() { DPRINTLN(DBG_WARN, F("WARNING! your NRF24 module can't be reached, check the wiring")); // when WiFi is in client mode, then enable mqtt broker - if ((mConfig->mqtt.broker[0] > 0) && (WiFi.getMode() == WIFI_STA)) { - mMqtt.setup(&mConfig->mqtt, mConfig->sys.deviceName, mVersion, mSys, &mTimestamp, &mSunrise, &mSunset); + #if !defined(AP_ONLY) + if (mConfig->mqtt.broker[0] > 0) { mPayload.addListener(std::bind(&PubMqttType::payloadEventListener, &mMqtt, std::placeholders::_1)); everySec(std::bind(&PubMqttType::tickerSecond, &mMqtt)); everyMin(std::bind(&PubMqttType::tickerMinute, &mMqtt)); mMqtt.setSubscriptionCb(std::bind(&app::mqttSubRxCb, this, std::placeholders::_1)); } - + #endif setupLed(); mWeb = new web(this, mConfig, &mStat, mVersion); diff --git a/src/hm/hmRadio.h b/src/hm/hmRadio.h index f021e0dd..90eaa40f 100644 --- a/src/hm/hmRadio.h +++ b/src/hm/hmRadio.h @@ -296,7 +296,7 @@ class HmRadio { return mNrf24.isChipConnected(); } - rf24_datarate_e getDataRate(void) { + uint8_t getDataRate(void) { return mNrf24.getDataRate(); }