From eb0a96a79edd054f01aa862065a2e3252cc1418f Mon Sep 17 00:00:00 2001 From: Ben Meadors Date: Tue, 27 Jun 2023 12:21:06 -0500 Subject: [PATCH] Default ext. notification output for RAK to LED #2 (#2570) * Default ext. notification output for RAK to LED #2 * Enabled by default * Update * Wrong macro * Output and nag --- src/mesh/NodeDB.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/mesh/NodeDB.cpp b/src/mesh/NodeDB.cpp index b3841afe2..565a08ff9 100644 --- a/src/mesh/NodeDB.cpp +++ b/src/mesh/NodeDB.cpp @@ -225,6 +225,15 @@ void NodeDB::installDefaultModuleConfig() moduleConfig.has_store_forward = true; moduleConfig.has_telemetry = true; moduleConfig.has_external_notification = true; +#if defined(RAK4630) || defined(RAK11310) + // Default to RAK led pin 2 (blue) + moduleConfig.external_notification.enabled = true; + moduleConfig.external_notification.output = PIN_LED2; + moduleConfig.external_notification.active = true; + moduleConfig.external_notification.alert_message = true; + moduleConfig.external_notification.output_ms = 1000; + moduleConfig.external_notification.nag_timeout = 60; +#endif moduleConfig.has_canned_message = true; strncpy(moduleConfig.mqtt.address, default_mqtt_address, sizeof(moduleConfig.mqtt.address)); @@ -907,4 +916,4 @@ void recordCriticalError(meshtastic_CriticalErrorCode code, uint32_t address, co LOG_ERROR("A critical failure occurred, portduino is exiting..."); exit(2); #endif -} \ No newline at end of file +}