diff --git a/src/modules/ExternalNotificationModule.cpp b/src/modules/ExternalNotificationModule.cpp index dbe8e01f4..90fbf28f0 100644 --- a/src/modules/ExternalNotificationModule.cpp +++ b/src/modules/ExternalNotificationModule.cpp @@ -91,23 +91,19 @@ int32_t ExternalNotificationModule::runOnce() void ExternalNotificationModule::setExternalOn() { -#ifdef EXT_NOTIFY_OUT externalCurrentState = 1; externalTurnedOn = millis(); digitalWrite(output, (moduleConfig.external_notification.active ? true : false)); -#endif } void ExternalNotificationModule::setExternalOff() { -#ifdef EXT_NOTIFY_OUT externalCurrentState = 0; digitalWrite(output, (moduleConfig.external_notification.active ? false : true)); -#endif } // -------- @@ -119,8 +115,6 @@ ExternalNotificationModule::ExternalNotificationModule() // restrict to the admin channel for rx boundChannel = Channels::gpioChannel; -#ifdef EXT_NOTIFY_OUT - /* Uncomment the preferences below if you want to use the module without having to configure it from the PythonAPI or WebUI. @@ -155,13 +149,10 @@ ExternalNotificationModule::ExternalNotificationModule() DEBUG_MSG("External Notification Module Disabled\n"); enabled = false; } -#endif } ProcessMessage ExternalNotificationModule::handleReceived(const MeshPacket &mp) { -#ifdef EXT_NOTIFY_OUT - if (moduleConfig.external_notification.enabled) { if (getFrom(&mp) != nodeDB.getNodeNum()) { @@ -195,7 +186,6 @@ ProcessMessage ExternalNotificationModule::handleReceived(const MeshPacket &mp) } else { DEBUG_MSG("External Notification Module Disabled\n"); } -#endif return ProcessMessage::CONTINUE; // Let others look at this message also if they want } diff --git a/src/modules/ExternalNotificationModule.h b/src/modules/ExternalNotificationModule.h index 6fb45e7e2..b5ab64b3c 100644 --- a/src/modules/ExternalNotificationModule.h +++ b/src/modules/ExternalNotificationModule.h @@ -12,8 +12,8 @@ */ class ExternalNotificationModule : public SinglePortModule, private concurrency::OSThread { - uint32_t output = EXT_NOTIFY_OUT; - + uint32_t output = 0; + public: ExternalNotificationModule();