#654 Fix gpio initilization

This commit is contained in:
Jm 2021-01-28 23:16:10 -08:00
parent 85752b0fc7
commit 9e736ab0d7

View File

@ -27,7 +27,7 @@ This plugin supports:
#define EXT_NOTIFICATION_PLUGIN_ENABLED 0
#define EXT_NOTIFICATION_PLUGIN_ACTIVE 0
#define EXT_NOTIFICATION_PLUGIN_ALERT_MESSAGE 1
#define EXT_NOTIFICATION_PLUGIN_ALERT_MESSAGE 0
#define EXT_NOTIFICATION_PLUGIN_ALERT_BELL 0
#define EXT_NOTIFICATION_PLUGIN_OUTPUT 13
#define EXT_NOTIFICATION_PLUGIN_OUTPUT_MS 1000
@ -63,19 +63,14 @@ int32_t ExternalNotificationPlugin::runOnce()
// Set the direction of a pin
pinMode(EXT_NOTIFICATION_PLUGIN_OUTPUT, OUTPUT);
// if ext_notification_plugin_active
if (EXT_NOTIFICATION_PLUGIN_ACTIVE) {
// Turn off the pin
setExternalOff();
} else {
setExternalOn();
}
externalNotificationPluginRadio = new ExternalNotificationPluginRadio();
firstTime = 0;
} else {
// DEBUG_MSG("EN Loop\n");
if (externalCurrentState) {
// TODO: Test this part. Don't know if this should be greater than or less than.