From b6d63059bfe13ea0aad22918d111e6e38eb607d3 Mon Sep 17 00:00:00 2001
From: Solanaceae <93513823+Solarvortx@users.noreply.github.com>
Date: Tue, 7 Dec 2021 21:34:10 -0700
Subject: [PATCH] Change EXT_NOTIFY_PIN to EXT_NOTIFY_OUT per req.
---
src/configuration.h | 8 ++++----
src/plugins/ExternalNotificationPlugin.cpp | 10 +++++-----
2 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/src/configuration.h b/src/configuration.h
index 1b392ad55..0d32e36fd 100644
--- a/src/configuration.h
+++ b/src/configuration.h
@@ -172,7 +172,7 @@ along with this program. If not, see .
#define BUTTON_PIN 38 // The middle button GPIO on the T-Beam
//#define BUTTON_PIN_ALT 13 // Alternate GPIO for an external button if needed. Does anyone use this? It is not documented anywhere.
-#define EXT_NOTIFY_PIN 13 // Default pin to use for Ext Notify Plugin.
+#define EXT_NOTIFY_OUT 13 // Default pin to use for Ext Notify Plugin.
#define LED_INVERTED 1
#define LED_PIN 4 // Newer tbeams (1.1) have an extra led on GPIO4
@@ -214,7 +214,7 @@ along with this program. If not, see .
#define BUTTON_PIN 39
#define BATTERY_PIN 35 // A battery voltage measurement pin, voltage divider connected here to measure battery voltage
-#define EXT_NOTIFY_PIN 13 // Default pin to use for Ext Notify Plugin.
+#define EXT_NOTIFY_OUT 13 // Default pin to use for Ext Notify Plugin.
#define USE_RF95
#define LORA_DIO0 26 // a No connect on the SX1262 module
@@ -318,7 +318,7 @@ along with this program. If not, see .
#define HW_VENDOR HardwareModel_HELTEC_V2_1
#define BATTERY_PIN 37 // A battery voltage measurement pin, voltage divider connected here to measure battery voltage
-#define EXT_NOTIFY_PIN 13 // Default pin to use for Ext Notify Plugin.
+#define EXT_NOTIFY_OUT 13 // Default pin to use for Ext Notify Plugin.
#endif
@@ -341,7 +341,7 @@ along with this program. If not, see .
#define LED_PIN 2 // If defined we will blink this LED
#define BUTTON_PIN 0 // If defined, this will be used for user button presses
#define BUTTON_NEED_PULLUP
-#define EXT_NOTIFY_PIN 13 // Default pin to use for Ext Notify Plugin.
+#define EXT_NOTIFY_OUT 13 // Default pin to use for Ext Notify Plugin.
#define USE_RF95
#define LORA_DIO0 26 // a No connect on the SX1262 module
diff --git a/src/plugins/ExternalNotificationPlugin.cpp b/src/plugins/ExternalNotificationPlugin.cpp
index e731c851c..8b25d77ed 100644
--- a/src/plugins/ExternalNotificationPlugin.cpp
+++ b/src/plugins/ExternalNotificationPlugin.cpp
@@ -44,7 +44,7 @@
*/
// Default configurations
-#define EXT_NOTIFICATION_PLUGIN_OUTPUT EXT_NOTIFY_PIN
+#define EXT_NOTIFICATION_PLUGIN_OUTPUT EXT_NOTIFY_OUT
#define EXT_NOTIFICATION_PLUGIN_OUTPUT_MS 1000
#define ASCII_BELL 0x07
@@ -84,7 +84,7 @@ int32_t ExternalNotificationPlugin::runOnce()
void ExternalNotificationPlugin::setExternalOn()
{
- #ifdef EXT_NOTIFY_PIN
+ #ifdef EXT_NOTIFY_OUT
externalCurrentState = 1;
externalTurnedOn = millis();
@@ -96,7 +96,7 @@ void ExternalNotificationPlugin::setExternalOn()
void ExternalNotificationPlugin::setExternalOff()
{
- #ifdef EXT_NOTIFY_PIN
+ #ifdef EXT_NOTIFY_OUT
externalCurrentState = 0;
digitalWrite((radioConfig.preferences.ext_notification_plugin_output ? radioConfig.preferences.ext_notification_plugin_output
@@ -115,7 +115,7 @@ ExternalNotificationPlugin::ExternalNotificationPlugin()
boundChannel = Channels::gpioChannel;
#ifndef NO_ESP32
- #ifdef EXT_NOTIFY_PIN
+ #ifdef EXT_NOTIFY_OUT
/*
Uncomment the preferences below if you want to use the plugin
@@ -152,7 +152,7 @@ ExternalNotificationPlugin::ExternalNotificationPlugin()
ProcessMessage ExternalNotificationPlugin::handleReceived(const MeshPacket &mp)
{
#ifndef NO_ESP32
- #ifdef EXT_NOTIFY_PIN
+ #ifdef EXT_NOTIFY_OUT
if (radioConfig.preferences.ext_notification_plugin_enabled) {