From da7b55b6dd210bf484d444d282437e7991f69f3a Mon Sep 17 00:00:00 2001 From: richonguzman Date: Wed, 27 Dec 2023 13:49:46 -0300 Subject: [PATCH] 1 --- data/tracker_config.json | 22 ++++++++++++---------- src/LoRa_APRS_Tracker.cpp | 7 ++++++- src/configuration.cpp | 2 ++ src/configuration.h | 2 ++ 4 files changed, 22 insertions(+), 11 deletions(-) diff --git a/data/tracker_config.json b/data/tracker_config.json index 37372a8..82c0bed 100644 --- a/data/tracker_config.json +++ b/data/tracker_config.json @@ -1,7 +1,7 @@ { "beacons": [ { - "callsign": "NOCALL-7", + "callsign": "CA2RXU-7", "symbol": "[", "overlay": "/", "micE": "", @@ -19,7 +19,7 @@ } }, { - "callsign": "NOCALL-7", + "callsign": "CA2RXU-7", "symbol": ">", "overlay": "/", "micE": "", @@ -37,8 +37,8 @@ } }, { - "callsign": "NOCALL-7", - "symbol": "j", + "callsign": "CA2RXU-7", + "symbol": "b", "overlay": "/", "micE": "", "comment": "", @@ -66,7 +66,7 @@ "simplifiedTrackerMode": false, "showSymbolOnScreen": true, "sendCommentAfterXBeacons": 10, - "displayEcoMode": false, + "displayEcoMode": true, "displayTimeout": 4, "path": "WIDE1-1", "nonSmartBeaconRate": 15, @@ -75,7 +75,7 @@ "standingUpdateTime": 15, "sendAltitude": true, "sendBatteryInfo": false, - "bluetoothType": 1, + "bluetoothType": 0, "bluetoothActive": true, "disableGPS": false }, @@ -92,10 +92,12 @@ "heightCorrection": 0 }, "notification": { - "ledTx": false, - "ledTxPin": 13, - "ledMessage": false, - "ledMessagePin": 2, + "ledTx": true, + "ledTxPin": 25, + "ledMessage": true, + "ledMessagePin": 13, + "ledFlashlight": true, + "ledFlashlightPin": 14, "buzzerActive": false, "buzzerPinTone": 33, "buzzerPinVcc": 25, diff --git a/src/LoRa_APRS_Tracker.cpp b/src/LoRa_APRS_Tracker.cpp index c1060f2..0335fc4 100644 --- a/src/LoRa_APRS_Tracker.cpp +++ b/src/LoRa_APRS_Tracker.cpp @@ -85,6 +85,7 @@ uint32_t keyboardTime = millis(); String messageCallsign = ""; String messageText = ""; +bool flashlight = false; bool digirepeaterActive = false; bool sosActive = false; bool disableGPS; @@ -109,13 +110,17 @@ void setup() { pinMode(Config.notification.buzzerPinTone, OUTPUT); pinMode(Config.notification.buzzerPinVcc, OUTPUT); NOTIFICATION_Utils::start(); - } + } if (Config.notification.ledTx){ pinMode(Config.notification.ledTxPin, OUTPUT); } if (Config.notification.ledMessage){ pinMode(Config.notification.ledMessagePin, OUTPUT); } + if (Config.notification.ledFlashlight) { + pinMode(Config.notification.ledFlashlightPin, OUTPUT); + } + show_display(" LoRa APRS", "", " (TRACKER)", "", "Richonguzman / CA2RXU", " " + versionDate, 4000); logger.log(logging::LoggerLevel::LOGGER_LEVEL_INFO, "Main", "RichonGuzman (CA2RXU) --> LoRa APRS Tracker/Station"); logger.log(logging::LoggerLevel::LOGGER_LEVEL_INFO, "Main", "Version: %s", versionDate); diff --git a/src/configuration.cpp b/src/configuration.cpp index 7f24fa7..046088e 100644 --- a/src/configuration.cpp +++ b/src/configuration.cpp @@ -66,6 +66,8 @@ void Configuration::readFile(fs::FS &fs, const char *fileName) { notification.ledTxPin = data["notification"]["ledTxPin"].as(); notification.ledMessage = data["notification"]["ledMessage"].as(); notification.ledMessagePin = data["notification"]["ledMessagePin"].as(); + notification.ledFlashlight = data["notification"]["ledFlashlight"].as(); + notification.ledFlashlightPin = data["notification"]["ledFlashlightPin"].as(); notification.buzzerActive = data["notification"]["buzzerActive"].as(); notification.buzzerPinTone = data["notification"]["buzzerPinTone"].as(); notification.buzzerPinVcc = data["notification"]["buzzerPinVcc"].as(); diff --git a/src/configuration.h b/src/configuration.h index c473c73..c0f716f 100644 --- a/src/configuration.h +++ b/src/configuration.h @@ -54,6 +54,8 @@ public: int ledTxPin; bool ledMessage; int ledMessagePin; + bool ledFlashlight; + int ledFlashlightPin; bool buzzerActive; int buzzerPinTone; int buzzerPinVcc;