mirror of
https://github.com/lumapu/ahoy.git
synced 2025-06-05 04:01:41 +02:00
fix changes from merge
This commit is contained in:
parent
f0014e8c70
commit
dc9eda5ee3
3 changed files with 5 additions and 4 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue