mirror of
https://github.com/lumapu/ahoy.git
synced 2025-05-29 16:56:10 +02:00
Improved ESP8266 support for HMS version (same code base: only ESP32 supports HMS!)
This commit is contained in:
parent
8c67f59eed
commit
27f16c4e91
5 changed files with 39 additions and 19 deletions
24
src/app.cpp
24
src/app.cpp
|
@ -61,22 +61,20 @@ void app::setup() {
|
|||
mMiPayload.enableSerialDebug(mConfig->serial.debug);
|
||||
mMiPayload.addPayloadListener(std::bind(&app::payloadEventListener, this, std::placeholders::_1));
|
||||
|
||||
if(!mNrfRadio.isChipConnected())
|
||||
DPRINTLN(DBG_WARN, F("WARNING! your NRF24 module can't be reached, check the wiring"));
|
||||
}
|
||||
//if(mConfig->cmt.enabled) {
|
||||
#if defined(ESP32)
|
||||
mHmsPayload.setup(this, &mSys, &mCmtRadio, &mStat, 5, &mTimestamp);
|
||||
mHmsPayload.enableSerialDebug(mConfig->serial.debug);
|
||||
mHmsPayload.addPayloadListener(std::bind(&app::payloadEventListener, this, std::placeholders::_1));
|
||||
//}
|
||||
|
||||
#endif
|
||||
/*DBGPRINTLN("--- after payload");
|
||||
DBGPRINTLN(String(ESP.getFreeHeap()));
|
||||
DBGPRINTLN(String(ESP.getHeapFragmentation()));
|
||||
DBGPRINTLN(String(ESP.getMaxFreeBlockSize()));*/
|
||||
|
||||
//if (!mSys.Radio.isChipConnected())
|
||||
// DPRINTLN(DBG_WARN, F("WARNING! your NRF24 module can't be reached, check the wiring"));
|
||||
if(mConfig->nrf.enabled) {
|
||||
if (!mSys.Radio.isChipConnected())
|
||||
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 !defined(AP_ONLY)
|
||||
|
@ -371,10 +369,12 @@ void app::tickMidnight(void) {
|
|||
|
||||
//-----------------------------------------------------------------------------
|
||||
void app::tickSend(void) {
|
||||
/*if(!mNrfRadio.isChipConnected()) {
|
||||
DPRINTLN(DBG_WARN, F("NRF24 not connected!"));
|
||||
return;
|
||||
}*/
|
||||
if(mConfig->nrf.enabled) {
|
||||
if(!mNrfRadio.isChipConnected()) {
|
||||
DPRINTLN(DBG_WARN, F("NRF24 not connected!"));
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (mIVCommunicationOn) {
|
||||
if (!mNrfRadio.mBufCtrl.empty()) {
|
||||
if (mConfig->serial.debug) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue