mirror of
https://github.com/manuelbl/ttn-esp32.git
synced 2025-07-16 07:32:52 +02:00
Ensure library compiles even if no frequency plan was selected
This commit is contained in:
@ -14,6 +14,7 @@
|
||||
#include "esp_event.h"
|
||||
#include "esp_log.h"
|
||||
#include "TheThingsNetwork.h"
|
||||
#include "config.h"
|
||||
#include "hal.h"
|
||||
#include "hal_esp32.h"
|
||||
#include "lmic.h"
|
||||
@ -37,10 +38,15 @@ static ClientAction clientAction = eActionUnrelated;
|
||||
TheThingsNetwork::TheThingsNetwork()
|
||||
: messageCallback(NULL)
|
||||
{
|
||||
#if defined(TTN_IS_DISABLED)
|
||||
ESP_LOGE(TAG, "TTN is disabled. Configure a frequency plan using 'make menuconfig'");
|
||||
ASSERT(0);
|
||||
esp_restart();
|
||||
#endif
|
||||
|
||||
ASSERT(ttnInstance == NULL);
|
||||
ttnInstance = this;
|
||||
hal_initCriticalSection();
|
||||
|
||||
}
|
||||
|
||||
TheThingsNetwork::~TheThingsNetwork()
|
||||
|
Reference in New Issue
Block a user