mirror of
https://github.com/richonguzman/LoRa_APRS_iGate.git
synced 2026-07-11 04:11:23 +02:00
Compare commits
83 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 63f4660ef6 | |||
| efabe9b1f7 | |||
| beae88d557 | |||
| 8b4d8c2d1d | |||
| 08ae1e322b | |||
| d576be0f2b | |||
| 7c9903ac12 | |||
| 0d7cff14f5 | |||
| 5c89635a23 | |||
| 7a35f9e32a | |||
| 7695675a7c | |||
| c8c0be636d | |||
| 76fe27a0ab | |||
| da80391921 | |||
| d638093dbf | |||
| 66a5f03c12 | |||
| ce8cf3a2fe | |||
| 4b45b90c88 | |||
| dbe980a081 | |||
| bb3d59a20d | |||
| fe590b41b0 | |||
| 3f76005949 | |||
| 6d95231b9c | |||
| 81692010cf | |||
| 50b738d04b | |||
| 026d6b2eeb | |||
| fe705519cb | |||
| 1fa74b8697 | |||
| a3794085b4 | |||
| 0a898a40e6 | |||
| ff8c7581fa | |||
| 449a8557d2 | |||
| 4419c98920 | |||
| 45bf90817b | |||
| ef30a1bf58 | |||
| 9a705d3dfa | |||
| 63f74396d2 | |||
| 400b77c2d3 | |||
| 31daddf917 | |||
| 529a44018f | |||
| 5ba9c5b382 | |||
| c7a0e3773b | |||
| a5f9e5b844 | |||
| 24f407d51c | |||
| 2c6665b557 | |||
| 38f52564f1 | |||
| 49e92c622f | |||
| 5370850ae1 | |||
| 984e9f9561 | |||
| f60252ef94 | |||
| 63257d6329 | |||
| 18929ad379 | |||
| cda901142d | |||
| 8008143267 | |||
| 3416e21a8c | |||
| 5882b54c62 | |||
| 6a4c0ef01a | |||
| 0bd3201ef7 | |||
| b5d9103ea5 | |||
| 20a5029da8 | |||
| b3cc8af180 | |||
| ca16761f68 | |||
| e593b2c670 | |||
| 08a7e0aac1 | |||
| 9b258c42ab | |||
| 8712122d33 | |||
| 9e34684627 | |||
| e4aa52241d | |||
| c840ef01fa | |||
| 98f85725f8 | |||
| 10bde884b1 | |||
| 546e4f63a4 | |||
| 87f2ec2b7b | |||
| c9c7e24aae | |||
| b86133223d | |||
| 880a41bfd8 | |||
| d610b3a90f | |||
| 23a33ed27c | |||
| 72ef827900 | |||
| b756f97f55 | |||
| 2625e7b91d | |||
| 75337d6c29 | |||
| a618383617 |
@@ -71,6 +71,10 @@ jobs:
|
|||||||
chip: esp32c3
|
chip: esp32c3
|
||||||
- name: heltec_wireless_paper_v1
|
- name: heltec_wireless_paper_v1
|
||||||
chip: esp32s3
|
chip: esp32s3
|
||||||
|
- name: heltec_wireless_paper_v1_2
|
||||||
|
chip: esp32s3
|
||||||
|
- name: heltec_vision_master_e290
|
||||||
|
chip: esp32s3
|
||||||
- name: OE5HWN_MeshCom
|
- name: OE5HWN_MeshCom
|
||||||
chip: esp32
|
chip: esp32
|
||||||
- name: WEMOS-LOLIN32-OLED-DIY
|
- name: WEMOS-LOLIN32-OLED-DIY
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
This firmware is for using ESP32 based boards with LoRa Modules and GPS to live in the APRS world.
|
This firmware is for using ESP32 based boards with LoRa Modules and GPS to live in the APRS world.
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
__(This iGate Firmware works with all LoRa Tracker Firmwares (specially this <a href="https://github.com/richonguzman/LoRa_APRS_Tracker" target="_blank">LoRa APRS Tracker Firmware</a>))__
|
__(This iGate Firmware works with all LoRa Tracker Firmwares (specially this <a href="https://github.com/richonguzman/LoRa_APRS_Tracker" target="_blank">LoRa APRS Tracker Firmware</a>))__
|
||||||
<br />
|
<br />
|
||||||
@@ -12,13 +12,13 @@ ____________________________________________________
|
|||||||
# <a href="https://richonguzman.github.io/lora-igate-web-flasher/installer.html" target="_blank">WEB FLASHER/INSTALLER</a>
|
# <a href="https://richonguzman.github.io/lora-igate-web-flasher/installer.html" target="_blank">WEB FLASHER/INSTALLER</a>
|
||||||
|
|
||||||
|
|
||||||
# <a href="https://github.com/richonguzman/LoRa_APRS_iGate/blob/main/manual/LoRa_APRS_iGate_CA2RXU_Firmware_Manual.pdf" target="_blank">LoRa APRS iGate CA2RXU Firmware Manual</a>
|
# <a href="https://drive.google.com/file/d/1Hff_Szd7ks8RC7_RiV6POxPJlclbO05M/view?usp=sharing" target="_blank">LoRa APRS iGate CA2RXU Firmware Manual</a>
|
||||||
|
|
||||||
____________________________________________________
|
____________________________________________________
|
||||||
|
|
||||||
## You can support this project to continue to grow:
|
## You can support this project to continue to grow:
|
||||||
|
|
||||||
[<img src="https://github.com/richonguzman/LoRa_APRS_Tracker/blob/main/images/github-sponsors.png">](https://github.com/sponsors/richonguzman) [<img src="https://github.com/richonguzman/LoRa_APRS_Tracker/blob/main/images/paypalme.png">](http://paypal.me/richonguzman)
|
[<img src="https://github.com/richonguzman/LoRa_APRS_Tracker/raw/main/images/github-sponsors.png">](https://github.com/sponsors/richonguzman) [<img src="https://github.com/richonguzman/LoRa_APRS_Tracker/raw/main/images/paypalme.png">](http://paypal.me/richonguzman)
|
||||||
|
|
||||||
____________________________________________________
|
____________________________________________________
|
||||||
|
|
||||||
@@ -51,9 +51,15 @@ ____________________________________________________
|
|||||||
<br />
|
<br />
|
||||||
|
|
||||||
# Timeline (Versions):
|
# Timeline (Versions):
|
||||||
|
- 2026-01-07 Tactical Callsign added.
|
||||||
|
- 2026-01-05 Heltec V4 support added.
|
||||||
|
- 2025-12-22 Heltec Wireless Paper V1.2 and VisionMaster E290 Added. Thanks HA5SZI.
|
||||||
|
- 2025-12-18 TCXO and packet decoding updates.
|
||||||
|
- 2025-12-01 APRSPacketLib updates, AHT20 sensor added, INA219 support added.
|
||||||
|
- 2025-10-15 APRS Bridge for TNC added.
|
||||||
- 2025-10-13 Rx and Tx Frequencies are now with fully configurable.
|
- 2025-10-13 Rx and Tx Frequencies are now with fully configurable.
|
||||||
- 2025-10-13 Startup Delay to allow the Router/Modem to start WiFiAP before connecting.
|
- 2025-10-13 Startup Delay to allow the Router/Modem to start WiFiAP before connecting.
|
||||||
- 2025-10-12 Choose to send Beacon on Rx or Tx frequency in Digipeater Mode.
|
- 2025-10-12 Choose to send Beacon on Rx or Tx frequency.
|
||||||
- 2025-10-11 User defined NTP server and send beacon over MQTT added.
|
- 2025-10-11 User defined NTP server and send beacon over MQTT added.
|
||||||
- 2025-10-10 Converted the Wiki into a PDF manual.
|
- 2025-10-10 Converted the Wiki into a PDF manual.
|
||||||
- 2025-09-26 Heltec Wireless Bridge support added.
|
- 2025-09-26 Heltec Wireless Bridge support added.
|
||||||
|
|||||||
+25
-24
@@ -2,42 +2,43 @@
|
|||||||
build_flags =
|
build_flags =
|
||||||
-Werror -Wall
|
-Werror -Wall
|
||||||
-DELEGANTOTA_USE_ASYNC_WEBSERVER=1
|
-DELEGANTOTA_USE_ASYNC_WEBSERVER=1
|
||||||
-DRADIOLIB_EXCLUDE_CC1101=1
|
-D RADIOLIB_EXCLUDE_CC1101=1
|
||||||
-DRADIOLIB_EXCLUDE_NRF24=1
|
-D RADIOLIB_EXCLUDE_RF69=1
|
||||||
-DRADIOLIB_EXCLUDE_RF69=1
|
-D RADIOLIB_EXCLUDE_RFM2X=1
|
||||||
-DRADIOLIB_EXCLUDE_SX1231=1
|
-D RADIOLIB_EXCLUDE_SX1231=1
|
||||||
-DRADIOLIB_EXCLUDE_SX1233=1
|
-D RADIOLIB_EXCLUDE_SX1233=1
|
||||||
-DRADIOLIB_EXCLUDE_SI443X=1
|
-D RADIOLIB_EXCLUDE_SI443X=1
|
||||||
-DRADIOLIB_EXCLUDE_RFM2X=1
|
-D RADIOLIB_EXCLUDE_NRF24=1
|
||||||
-DRADIOLIB_EXCLUDE_AFSK=1
|
-D RADIOLIB_EXCLUDE_AFSK=1
|
||||||
-DRADIOLIB_EXCLUDE_BELL=1
|
-D RADIOLIB_EXCLUDE_APRS=1
|
||||||
-DRADIOLIB_EXCLUDE_HELLSCHREIBER=1
|
-D RADIOLIB_EXCLUDE_AX25=1
|
||||||
-DRADIOLIB_EXCLUDE_MORSE=1
|
-D RADIOLIB_EXCLUDE_BELL=1
|
||||||
-DRADIOLIB_EXCLUDE_RTTY=1
|
-D RADIOLIB_EXCLUDE_FSK4=1
|
||||||
-DRADIOLIB_EXCLUDE_SSTV=1
|
-D RADIOLIB_EXCLUDE_HELLSCHREIBER=1
|
||||||
-DRADIOLIB_EXCLUDE_AX25=1
|
-D RADIOLIB_EXCLUDE_LORAWAN=1
|
||||||
-DRADIOLIB_EXCLUDE_DIRECT_RECEIVE=1
|
-D RADIOLIB_EXCLUDE_MORSE=1
|
||||||
-DRADIOLIB_EXCLUDE_BELL=1
|
-D RADIOLIB_EXCLUDE_PAGER=1
|
||||||
-DRADIOLIB_EXCLUDE_PAGER=1
|
-D RADIOLIB_EXCLUDE_DIRECT_RECEIVE=1
|
||||||
-DRADIOLIB_EXCLUDE_FSK4=1
|
-D RADIOLIB_EXCLUDE_RTTY=1
|
||||||
-DRADIOLIB_EXCLUDE_APRS=1
|
-D RADIOLIB_EXCLUDE_SSTV=1
|
||||||
-DRADIOLIB_EXCLUDE_LORAWAN=1
|
|
||||||
-I variants/${PIOENV}
|
-I variants/${PIOENV}
|
||||||
lib_deps =
|
lib_deps =
|
||||||
adafruit/Adafruit Unified Sensor @ 1.1.14
|
adafruit/Adafruit Unified Sensor @ 1.1.14
|
||||||
|
adafruit/Adafruit AHTX0 @ 2.0.5
|
||||||
adafruit/Adafruit BME280 Library @ 2.2.4
|
adafruit/Adafruit BME280 Library @ 2.2.4
|
||||||
adafruit/Adafruit BMP280 Library @ 2.6.8
|
adafruit/Adafruit BMP280 Library @ 2.6.8
|
||||||
adafruit/Adafruit BME680 Library @ 2.0.4
|
adafruit/Adafruit BME680 Library @ 2.0.4
|
||||||
|
adafruit/Adafruit INA219 @ 1.2.3
|
||||||
adafruit/Adafruit Si7021 Library @ 1.5.3
|
adafruit/Adafruit Si7021 Library @ 1.5.3
|
||||||
arduino-libraries/NTPClient @ 3.2.1
|
arduino-libraries/NTPClient @ 3.2.1
|
||||||
ayushsharma82/ElegantOTA @ 3.1.5
|
ayushsharma82/ElegantOTA @ 3.1.7
|
||||||
bblanchon/ArduinoJson @ 6.21.3
|
bblanchon/ArduinoJson @ 6.21.3
|
||||||
jgromes/RadioLib @ 7.1.0
|
jgromes/RadioLib @ 7.1.0
|
||||||
knolleary/PubSubClient @ 2.8
|
knolleary/PubSubClient @ 2.8
|
||||||
mathieucarbou/AsyncTCP @ 3.2.5
|
ESP32Async/AsyncTCP @ 3.4.9
|
||||||
mathieucarbou/ESPAsyncWebServer @ 3.2.3
|
ESP32Async/ESPAsyncWebServer @ 3.9.3
|
||||||
mikalhart/TinyGPSPlus @ 1.0.3
|
mikalhart/TinyGPSPlus @ 1.0.3
|
||||||
richonguzman/APRSPacketLib @1.0.0
|
richonguzman/APRSPacketLib @ 1.0.4
|
||||||
display_libs =
|
display_libs =
|
||||||
adafruit/Adafruit GFX Library @ 1.11.9
|
adafruit/Adafruit GFX Library @ 1.11.9
|
||||||
adafruit/Adafruit SSD1306 @ 2.5.10
|
adafruit/Adafruit SSD1306 @ 2.5.10
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
"statusActive": false,
|
"statusActive": false,
|
||||||
"statusPacket": "",
|
"statusPacket": "",
|
||||||
"gpsActive": false,
|
"gpsActive": false,
|
||||||
"gpsAmbiguity": false
|
"ambiguityLevel": 0
|
||||||
},
|
},
|
||||||
"aprs_is": {
|
"aprs_is": {
|
||||||
"active": false,
|
"active": false,
|
||||||
@@ -36,7 +36,8 @@
|
|||||||
"blacklist": "",
|
"blacklist": "",
|
||||||
"digi": {
|
"digi": {
|
||||||
"mode": 0,
|
"mode": 0,
|
||||||
"ecoMode": 0
|
"ecoMode": 0,
|
||||||
|
"backupDigiMode": false
|
||||||
},
|
},
|
||||||
"lora": {
|
"lora": {
|
||||||
"rxActive": true,
|
"rxActive": true,
|
||||||
@@ -61,11 +62,12 @@
|
|||||||
"monitorInternalVoltage": false,
|
"monitorInternalVoltage": false,
|
||||||
"internalSleepVoltage": 2.9,
|
"internalSleepVoltage": 2.9,
|
||||||
"sendExternalVoltage": false,
|
"sendExternalVoltage": false,
|
||||||
"externalVoltagePin": 34,
|
|
||||||
"monitorExternalVoltage": false,
|
"monitorExternalVoltage": false,
|
||||||
"externalSleepVoltage": 10.9,
|
"externalSleepVoltage": 10.9,
|
||||||
|
"useExternalI2CSensor": false,
|
||||||
"voltageDividerR1": 100.0,
|
"voltageDividerR1": 100.0,
|
||||||
"voltageDividerR2": 27.0,
|
"voltageDividerR2": 27.0,
|
||||||
|
"externalVoltagePin": 34,
|
||||||
"sendVoltageAsTelemetry": false
|
"sendVoltageAsTelemetry": false
|
||||||
},
|
},
|
||||||
"wxsensor": {
|
"wxsensor": {
|
||||||
@@ -82,7 +84,8 @@
|
|||||||
"tnc": {
|
"tnc": {
|
||||||
"enableServer": false,
|
"enableServer": false,
|
||||||
"enableSerial": false,
|
"enableSerial": false,
|
||||||
"acceptOwn": false
|
"acceptOwn": false,
|
||||||
|
"aprsBrigdeActive": false
|
||||||
},
|
},
|
||||||
"mqtt": {
|
"mqtt": {
|
||||||
"active": false,
|
"active": false,
|
||||||
@@ -111,7 +114,6 @@
|
|||||||
},
|
},
|
||||||
"other": {
|
"other": {
|
||||||
"rememberStationTime": 30,
|
"rememberStationTime": 30,
|
||||||
"backupDigiMode": false,
|
|
||||||
"rebootMode": false,
|
"rebootMode": false,
|
||||||
"rebootModeTime": 6,
|
"rebootModeTime": 6,
|
||||||
"startupDelay": 0
|
"startupDelay": 0
|
||||||
|
|||||||
+127
-133
@@ -1,5 +1,5 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en" data-bs-theme="auto">
|
<html lang="en" data-bs-theme="dark">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8" />
|
<meta charset="utf-8" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||||
@@ -36,8 +36,8 @@
|
|||||||
<li class="nav-item dropdown">
|
<li class="nav-item dropdown">
|
||||||
<a class="nav-link dropdown-toggle" data-bs-toggle="dropdown" href="#" role="button" aria-haspopup="true" aria-expanded="false">Backup</a>
|
<a class="nav-link dropdown-toggle" data-bs-toggle="dropdown" href="#" role="button" aria-haspopup="true" aria-expanded="false">Backup</a>
|
||||||
<div class="dropdown-menu">
|
<div class="dropdown-menu">
|
||||||
<a class="dropdown-item" href="#" id="backup">Download</a>
|
<a class="dropdown-item" href="#" id="backup">Download Conf.</a>
|
||||||
<a class="dropdown-item" href="#" id="restore">Restore</a>
|
<a class="dropdown-item" href="#" id="restore">Restore Conf.</a>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
<li class="nav-item dropdown">
|
<li class="nav-item dropdown">
|
||||||
@@ -119,7 +119,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="col-lg-9 col-sm-12">
|
<div class="col-lg-9 col-sm-12">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-12">
|
<div class="col-6">
|
||||||
<label for="callsign" class="form-label"
|
<label for="callsign" class="form-label"
|
||||||
>Callsign - SSID</label
|
>Callsign - SSID</label
|
||||||
>
|
>
|
||||||
@@ -133,6 +133,19 @@
|
|||||||
oninput="this.value = this.value.toUpperCase();"
|
oninput="this.value = this.value.toUpperCase();"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="col-6">
|
||||||
|
<label for="tacticalCallsign" class="form-label"
|
||||||
|
>Tactical Callsign</label
|
||||||
|
>
|
||||||
|
<input
|
||||||
|
type="text"
|
||||||
|
name="tacticalCallsign"
|
||||||
|
id="tacticalCallsign"
|
||||||
|
class="form-control"
|
||||||
|
placeholder=""
|
||||||
|
oninput="this.value = this.value.toUpperCase();"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
<div class="col-12 mt-3">
|
<div class="col-12 mt-3">
|
||||||
<label
|
<label
|
||||||
for="beacon.comment"
|
for="beacon.comment"
|
||||||
@@ -144,8 +157,7 @@
|
|||||||
name="beacon.comment"
|
name="beacon.comment"
|
||||||
id="beacon.comment"
|
id="beacon.comment"
|
||||||
class="form-control"
|
class="form-control"
|
||||||
placeholder="LoRa APRS"
|
placeholder=""
|
||||||
required=""
|
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12 mt-3">
|
<div class="col-12 mt-3">
|
||||||
@@ -159,7 +171,7 @@
|
|||||||
name="beacon.path"
|
name="beacon.path"
|
||||||
id="beacon.path"
|
id="beacon.path"
|
||||||
class="form-control"
|
class="form-control"
|
||||||
placeholder="We prefer WIDE1-1"
|
placeholder="WIDE1-1"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-8 mt-3">
|
<div class="col-8 mt-3">
|
||||||
@@ -189,18 +201,10 @@
|
|||||||
name="action.symbol"
|
name="action.symbol"
|
||||||
id="action.symbol"
|
id="action.symbol"
|
||||||
>
|
>
|
||||||
<option value="L#">
|
<option value="L#">Green Star with L - Digipeater</option>
|
||||||
Green star with L
|
<option value="L_">Blue Circle with L - Station with Wx Data</option>
|
||||||
</option>
|
<option value="L&">Black Diamond with L - Rx (only) iGate</option>
|
||||||
<option value="L_">
|
<option value="La" selected>Red Diamond with L - Rx+Tx iGate</option>
|
||||||
Blue circle with L
|
|
||||||
</option>
|
|
||||||
<option value="L&">
|
|
||||||
Black diamond with L
|
|
||||||
</option>
|
|
||||||
<option value="La">
|
|
||||||
Red diamond with L
|
|
||||||
</option>
|
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
@@ -253,7 +257,7 @@
|
|||||||
name="personalNote"
|
name="personalNote"
|
||||||
id="personalNote"
|
id="personalNote"
|
||||||
class="form-control"
|
class="form-control"
|
||||||
placeholder="A couple of words"
|
placeholder="Describe here your Station"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12 mt-3">
|
<div class="col-12 mt-3">
|
||||||
@@ -583,12 +587,8 @@
|
|||||||
name="beacon.beaconFreq"
|
name="beacon.beaconFreq"
|
||||||
id="beacon.beaconFreq"
|
id="beacon.beaconFreq"
|
||||||
>
|
>
|
||||||
<option value="0">
|
<option value="0">Beacon on Rx Freq</option>
|
||||||
Beacon on Rx Freq
|
<option value="1">Beacon on Tx Freq</option>
|
||||||
</option>
|
|
||||||
<option value="1">
|
|
||||||
Beacon on Tx Freq
|
|
||||||
</option>
|
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -604,17 +604,34 @@
|
|||||||
type="number"
|
type="number"
|
||||||
name="beacon.interval"
|
name="beacon.interval"
|
||||||
id="beacon.interval"
|
id="beacon.interval"
|
||||||
placeholder="15"
|
|
||||||
class="form-control"
|
class="form-control"
|
||||||
required=""
|
value="15"
|
||||||
|
min="10"
|
||||||
step="1"
|
step="1"
|
||||||
min="15"
|
required
|
||||||
/>
|
/>
|
||||||
<span class="input-group-text"
|
<span class="input-group-text"
|
||||||
>minutes
|
>minutes
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="col-6">
|
||||||
|
<label
|
||||||
|
for="beacon.ambiguityLevel"
|
||||||
|
class="form-label"
|
||||||
|
>APRS Position Ambiguity</label
|
||||||
|
>
|
||||||
|
<select
|
||||||
|
class="form-select form-select"
|
||||||
|
name="beacon.ambiguityLevel"
|
||||||
|
id="beacon.ambiguityLevel"
|
||||||
|
>
|
||||||
|
<option value="0" selected>No Ambiguity</option>
|
||||||
|
<option value="1">~110 m forced Ambiguity</option>
|
||||||
|
<option value="2">~1.1 km forced Ambiguity</option>
|
||||||
|
<option value="3">~11 km forced Ambiguity</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12 mt-3">
|
<div class="col-12 mt-3">
|
||||||
<div class="form-check form-switch">
|
<div class="form-check form-switch">
|
||||||
@@ -631,21 +648,6 @@
|
|||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12">
|
|
||||||
<div class="form-check form-switch">
|
|
||||||
<input
|
|
||||||
type="checkbox"
|
|
||||||
name="beacon.gpsAmbiguity"
|
|
||||||
id="beacon.gpsAmbiguity"
|
|
||||||
class="form-check-input"
|
|
||||||
/>
|
|
||||||
<label
|
|
||||||
for="beacon.gpsAmbiguity"
|
|
||||||
class="form-label"
|
|
||||||
>Send Real-GPS Beacon with Ambiguity <small>(~ 1 Km of Random Error)</small>
|
|
||||||
</label>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<hr>
|
<hr>
|
||||||
@@ -667,7 +669,7 @@
|
|||||||
</svg>
|
</svg>
|
||||||
Black List
|
Black List
|
||||||
</h5>
|
</h5>
|
||||||
<small>Add Callsigns with space between them to Blacklist them (* wild card allowed)</small>
|
<small>Add Callsigns with space between them to Blacklist (* wildcard allowed)</small>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-9">
|
<div class="col-9">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
@@ -723,15 +725,9 @@
|
|||||||
name="digi.mode"
|
name="digi.mode"
|
||||||
id="digi.mode"
|
id="digi.mode"
|
||||||
>
|
>
|
||||||
<option value="0">
|
<option value="0" selected>OFF</option>
|
||||||
OFF
|
<option value="2">WIDE1 (fill-in) Digi</option>
|
||||||
</option>
|
<option value="3">WIDE2 (+WIDE1) Digi</option>
|
||||||
<option value="2">
|
|
||||||
WIDE1 (fill-in) Digi
|
|
||||||
</option>
|
|
||||||
<option value="3">
|
|
||||||
WIDE2 (+WIDE1) Digi
|
|
||||||
</option>
|
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12 mt-3">
|
<div class="col-12 mt-3">
|
||||||
@@ -748,16 +744,28 @@
|
|||||||
name="digi.ecoMode"
|
name="digi.ecoMode"
|
||||||
id="digi.ecoMode"
|
id="digi.ecoMode"
|
||||||
>
|
>
|
||||||
<option value="0">
|
<option value="0" selected>OFF (Normal Mode - WiFiAP and Serial Output enabled)</option>
|
||||||
OFF (Normal Mode - WiFiAP and Serial Output enabled)
|
<option value="1">Ultra Eco Mode (Sleep till Packet Rx (WiFiAP/WebUI & Display disabled))</option>
|
||||||
</option>
|
<option value="2">OFF (Normal Mode - WiFiAP disabled but Serial Output still enabled)</option>
|
||||||
<option value="1">
|
|
||||||
Ultra Eco Mode (Sleep till Packet Rx (WiFiAP/WebUI & Display disabled))
|
|
||||||
</option>
|
|
||||||
<option value="2">
|
|
||||||
OFF (Normal Mode - WiFiAP disabled but Serial Output still enabled)
|
|
||||||
</option>
|
|
||||||
</select>
|
</select>
|
||||||
|
</div>
|
||||||
|
<div class="col-12 mt-3">
|
||||||
|
<div class="form-check form-switch">
|
||||||
|
<div class="form-text">
|
||||||
|
If WiFi/server connection is lost in iGate-only mode, the device switches to Digipeater mode (WIDE1-1) and retries connection every 15 minutes.
|
||||||
|
</div>
|
||||||
|
<input
|
||||||
|
type="checkbox"
|
||||||
|
name="digi.backupDigiMode"
|
||||||
|
id="digi.backupDigiMode"
|
||||||
|
class="form-check-input"
|
||||||
|
/>
|
||||||
|
<label
|
||||||
|
for="digi.backupDigiMode"
|
||||||
|
class="form-label"
|
||||||
|
>Backup Digipeater Mode</label
|
||||||
|
>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -876,7 +884,9 @@
|
|||||||
id="lora.rxSpreadingFactor"
|
id="lora.rxSpreadingFactor"
|
||||||
required=""
|
required=""
|
||||||
>
|
>
|
||||||
<option value="7">SF7 - Lowest battery usage</option>
|
<option value="5">SF5 - Lowest battery usage</option>
|
||||||
|
<option value="6">SF6</option>
|
||||||
|
<option value="7">SF7</option>
|
||||||
<option value="8">SF8</option>
|
<option value="8">SF8</option>
|
||||||
<option value="9">SF9</option>
|
<option value="9">SF9</option>
|
||||||
<option value="10">SF10</option>
|
<option value="10">SF10</option>
|
||||||
@@ -896,7 +906,9 @@
|
|||||||
id="lora.txSpreadingFactor"
|
id="lora.txSpreadingFactor"
|
||||||
required=""
|
required=""
|
||||||
>
|
>
|
||||||
<option value="7">SF7 - Lowest battery usage</option>
|
<option value="5">SF5 - Lowest battery usage</option>
|
||||||
|
<option value="6">SF6</option>
|
||||||
|
<option value="7">SF7</option>
|
||||||
<option value="8">SF8</option>
|
<option value="8">SF8</option>
|
||||||
<option value="9">SF9</option>
|
<option value="9">SF9</option>
|
||||||
<option value="10">SF10</option>
|
<option value="10">SF10</option>
|
||||||
@@ -1219,7 +1231,20 @@
|
|||||||
>Send External Voltage</label
|
>Send External Voltage</label
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-check form-switch mt-5">
|
<div class="form-check form-switch">
|
||||||
|
<input
|
||||||
|
type="checkbox"
|
||||||
|
name="battery.useExternalI2CSensor"
|
||||||
|
id="battery.useExternalI2CSensor"
|
||||||
|
class="form-check-input"
|
||||||
|
/>
|
||||||
|
<label
|
||||||
|
for="battery.useExternalI2CSensor"
|
||||||
|
class="form-label"
|
||||||
|
>Use External I2C Voltage Sensor</label
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
<div class="form-check form-switch">
|
||||||
<input
|
<input
|
||||||
type="checkbox"
|
type="checkbox"
|
||||||
name="battery.monitorExternalVoltage"
|
name="battery.monitorExternalVoltage"
|
||||||
@@ -1511,25 +1536,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="col-lg-9 col-sm-12">
|
<div class="col-lg-9 col-sm-12">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-12">
|
<div class="col-6">
|
||||||
<div class="form-check form-switch">
|
|
||||||
<div class="form-text">
|
|
||||||
Server will be available at port <strong>8001</strong>
|
|
||||||
</div>
|
|
||||||
<input
|
|
||||||
type="checkbox"
|
|
||||||
name="tnc.enableServer"
|
|
||||||
id="tnc.enableServer"
|
|
||||||
class="form-check-input"
|
|
||||||
/>
|
|
||||||
<label
|
|
||||||
for="tnc.enableServer"
|
|
||||||
class="form-label"
|
|
||||||
>Enable TNC server</label
|
|
||||||
>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col-12">
|
|
||||||
<div class="form-check form-switch">
|
<div class="form-check form-switch">
|
||||||
<input
|
<input
|
||||||
type="checkbox"
|
type="checkbox"
|
||||||
@@ -1544,7 +1551,24 @@
|
|||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12">
|
<div class="col-6">
|
||||||
|
<div class="form-check form-switch">
|
||||||
|
<input
|
||||||
|
type="checkbox"
|
||||||
|
name="tnc.enableServer"
|
||||||
|
id="tnc.enableServer"
|
||||||
|
class="form-check-input"
|
||||||
|
/>
|
||||||
|
<label
|
||||||
|
for="tnc.enableServer"
|
||||||
|
class="form-label"
|
||||||
|
>Enable TNC server <small><strong>(Port 8001)</strong></small></label
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row mt-2">
|
||||||
|
<div class="col-6">
|
||||||
<div class="form-check form-switch">
|
<div class="form-check form-switch">
|
||||||
<input
|
<input
|
||||||
type="checkbox"
|
type="checkbox"
|
||||||
@@ -1559,6 +1583,21 @@
|
|||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="col-6">
|
||||||
|
<div class="form-check form-switch">
|
||||||
|
<input
|
||||||
|
type="checkbox"
|
||||||
|
name="tnc.aprsBridgeActive"
|
||||||
|
id="tnc.aprsBridgeActive"
|
||||||
|
class="form-check-input"
|
||||||
|
/>
|
||||||
|
<label
|
||||||
|
for="tnc.aprsBridgeActive"
|
||||||
|
class="form-label"
|
||||||
|
>Enable APRS Bridge</label
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -2018,6 +2057,7 @@
|
|||||||
name="remoteManagement.managers"
|
name="remoteManagement.managers"
|
||||||
id="remoteManagement.managers"
|
id="remoteManagement.managers"
|
||||||
class="form-control"
|
class="form-control"
|
||||||
|
oninput="this.value = this.value.toUpperCase();"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -2105,52 +2145,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<hr>
|
<hr>
|
||||||
|
|
||||||
<div class="row my-5 d-flex align-items-top">
|
|
||||||
<div class="col-lg-3 col-sm-12">
|
|
||||||
<h5>
|
|
||||||
<svg
|
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
|
||||||
width="20"
|
|
||||||
height="20"
|
|
||||||
fill="currentColor"
|
|
||||||
class="bi bi-heart-pulse-fill"
|
|
||||||
viewBox="0 0 16 16"
|
|
||||||
>
|
|
||||||
<path
|
|
||||||
d="M1.475 9C2.702 10.84 4.779 12.871 8 15c3.221-2.129 5.298-4.16 6.525-6H12a.5.5 0 0 1-.464-.314l-1.457-3.642-1.598 5.593a.5.5 0 0 1-.945.049L5.889 6.568l-1.473 2.21A.5.5 0 0 1 4 9z"
|
|
||||||
/>
|
|
||||||
<path
|
|
||||||
d="M.88 8C-2.427 1.68 4.41-2 7.823 1.143q.09.083.176.171a3 3 0 0 1 .176-.17C11.59-2 18.426 1.68 15.12 8h-2.783l-1.874-4.686a.5.5 0 0 0-.945.049L7.921 8.956 6.464 5.314a.5.5 0 0 0-.88-.091L3.732 8z"
|
|
||||||
/>
|
|
||||||
</svg>
|
|
||||||
Experimental
|
|
||||||
</h5>
|
|
||||||
<small>You can test new features. <u>Use at your own risk!</u></small>
|
|
||||||
</div>
|
|
||||||
<div class="col-lg-9 col-sm-12">
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-12">
|
|
||||||
<div class="form-check form-switch">
|
|
||||||
<div class="form-text">
|
|
||||||
When "only" iGate Mode loses WiFi, it will change into a Digipeater Mode and after 15 min check if WiFi available and return to "only" iGate Mode.
|
|
||||||
</div>
|
|
||||||
<input
|
|
||||||
type="checkbox"
|
|
||||||
name="other.backupDigiMode"
|
|
||||||
id="other.backupDigiMode"
|
|
||||||
class="form-check-input"
|
|
||||||
/>
|
|
||||||
<label
|
|
||||||
for="other.backupDigiMode"
|
|
||||||
class="form-label"
|
|
||||||
>Backup Digipeater Mode</label
|
|
||||||
>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</main>
|
</main>
|
||||||
<footer
|
<footer
|
||||||
@@ -2205,7 +2199,7 @@
|
|||||||
<a
|
<a
|
||||||
href="https://cd3eap.aguayoki.cl/"
|
href="https://cd3eap.aguayoki.cl/"
|
||||||
target="_blank"
|
target="_blank"
|
||||||
>CD3EAP</a
|
>CA3EAP</a
|
||||||
></b
|
></b
|
||||||
>: Settings Page.
|
>: Settings Page.
|
||||||
</p>
|
</p>
|
||||||
|
|||||||
+28
-17
@@ -54,6 +54,7 @@ function loadSettings(settings) {
|
|||||||
currentSettings = settings;
|
currentSettings = settings;
|
||||||
// General
|
// General
|
||||||
document.getElementById("callsign").value = settings.callsign;
|
document.getElementById("callsign").value = settings.callsign;
|
||||||
|
document.getElementById("tacticalCallsign").value = settings.tacticalCallsign;
|
||||||
document.getElementById("beacon.comment").value = settings.beacon.comment;
|
document.getElementById("beacon.comment").value = settings.beacon.comment;
|
||||||
document.getElementById("beacon.path").value = settings.beacon.path;
|
document.getElementById("beacon.path").value = settings.beacon.path;
|
||||||
document.getElementById("beacon.symbol").value = settings.beacon.symbol;
|
document.getElementById("beacon.symbol").value = settings.beacon.symbol;
|
||||||
@@ -131,7 +132,7 @@ function loadSettings(settings) {
|
|||||||
StatusPacket.disabled = !StatusCheckbox.checked;
|
StatusPacket.disabled = !StatusCheckbox.checked;
|
||||||
|
|
||||||
document.getElementById("beacon.gpsActive").checked = settings.beacon.gpsActive;
|
document.getElementById("beacon.gpsActive").checked = settings.beacon.gpsActive;
|
||||||
document.getElementById("beacon.gpsAmbiguity").checked = settings.beacon.gpsAmbiguity;
|
document.getElementById("beacon.ambiguityLevel").value = settings.beacon.ambiguityLevel;
|
||||||
|
|
||||||
// Black List
|
// Black List
|
||||||
document.getElementById("blacklist").value = settings.blacklist;
|
document.getElementById("blacklist").value = settings.blacklist;
|
||||||
@@ -139,6 +140,7 @@ function loadSettings(settings) {
|
|||||||
// Digi
|
// Digi
|
||||||
document.getElementById("digi.mode").value = settings.digi.mode;
|
document.getElementById("digi.mode").value = settings.digi.mode;
|
||||||
document.getElementById("digi.ecoMode").value = settings.digi.ecoMode;
|
document.getElementById("digi.ecoMode").value = settings.digi.ecoMode;
|
||||||
|
document.getElementById("digi.backupDigiMode").checked = settings.digi.backupDigiMode;
|
||||||
|
|
||||||
// LoRa
|
// LoRa
|
||||||
document.getElementById("lora.rxActive").checked = settings.lora.rxActive;
|
document.getElementById("lora.rxActive").checked = settings.lora.rxActive;
|
||||||
@@ -168,13 +170,16 @@ function loadSettings(settings) {
|
|||||||
MonitorInternalSleepVoltage.disabled = !MonitorInternalVoltageCheckbox.checked;
|
MonitorInternalSleepVoltage.disabled = !MonitorInternalVoltageCheckbox.checked;
|
||||||
|
|
||||||
document.getElementById("battery.sendExternalVoltage").checked = settings.battery.sendExternalVoltage;
|
document.getElementById("battery.sendExternalVoltage").checked = settings.battery.sendExternalVoltage;
|
||||||
|
document.getElementById("battery.useExternalI2CSensor").checked = settings.battery.useExternalI2CSensor;
|
||||||
document.getElementById("battery.externalVoltagePin").value = settings.battery.externalVoltagePin;
|
document.getElementById("battery.externalVoltagePin").value = settings.battery.externalVoltagePin;
|
||||||
document.getElementById("battery.voltageDividerR1").value = settings.battery.voltageDividerR1.toFixed(1);
|
document.getElementById("battery.voltageDividerR1").value = settings.battery.voltageDividerR1.toFixed(1);
|
||||||
document.getElementById("battery.voltageDividerR2").value = settings.battery.voltageDividerR2.toFixed(1);
|
document.getElementById("battery.voltageDividerR2").value = settings.battery.voltageDividerR2.toFixed(1);
|
||||||
SendExternalVoltageCheckbox.checked = settings.battery.sendExternalVoltage;
|
SendExternalVoltageCheckbox.checked = settings.battery.sendExternalVoltage;
|
||||||
ExternalVoltagePin.disabled = !SendExternalVoltageCheckbox.checked;
|
UseExternalI2CSensorCheckbox.disabled = !SendExternalVoltageCheckbox.checked;
|
||||||
ExternalVoltageDividerR1.disabled = !SendExternalVoltageCheckbox.checked;
|
ExternalVoltagePin.disabled = !SendExternalVoltageCheckbox.checked || UseExternalI2CSensorCheckbox.checked;
|
||||||
ExternalVoltageDividerR2.disabled = !SendExternalVoltageCheckbox.checked;
|
ExternalVoltageDividerR1.disabled = !SendExternalVoltageCheckbox.checked || UseExternalI2CSensorCheckbox.checked;
|
||||||
|
ExternalVoltageDividerR2.disabled = !SendExternalVoltageCheckbox.checked || UseExternalI2CSensorCheckbox.checked;
|
||||||
|
|
||||||
|
|
||||||
document.getElementById("battery.monitorExternalVoltage").checked = settings.battery.monitorExternalVoltage;
|
document.getElementById("battery.monitorExternalVoltage").checked = settings.battery.monitorExternalVoltage;
|
||||||
document.getElementById("battery.externalSleepVoltage").value = settings.battery.externalSleepVoltage.toFixed(1);
|
document.getElementById("battery.externalSleepVoltage").value = settings.battery.externalSleepVoltage.toFixed(1);
|
||||||
@@ -206,6 +211,7 @@ function loadSettings(settings) {
|
|||||||
document.getElementById("tnc.enableServer").checked = settings.tnc.enableServer;
|
document.getElementById("tnc.enableServer").checked = settings.tnc.enableServer;
|
||||||
document.getElementById("tnc.enableSerial").checked = settings.tnc.enableSerial;
|
document.getElementById("tnc.enableSerial").checked = settings.tnc.enableSerial;
|
||||||
document.getElementById("tnc.acceptOwn").checked = settings.tnc.acceptOwn;
|
document.getElementById("tnc.acceptOwn").checked = settings.tnc.acceptOwn;
|
||||||
|
document.getElementById("tnc.aprsBridgeActive").checked = settings.tnc.aprsBridgeActive;
|
||||||
}
|
}
|
||||||
|
|
||||||
// MQTT
|
// MQTT
|
||||||
@@ -215,14 +221,14 @@ function loadSettings(settings) {
|
|||||||
document.getElementById("mqtt.username").value = settings.mqtt.username;
|
document.getElementById("mqtt.username").value = settings.mqtt.username;
|
||||||
document.getElementById("mqtt.password").value = settings.mqtt.password;
|
document.getElementById("mqtt.password").value = settings.mqtt.password;
|
||||||
document.getElementById("mqtt.port").value = settings.mqtt.port;
|
document.getElementById("mqtt.port").value = settings.mqtt.port;
|
||||||
document.getElementById("mqtt.beaconOverMqtt").value = settings.mqtt.beaconOverMqtt;
|
document.getElementById("mqtt.beaconOverMqtt").checked = settings.mqtt.beaconOverMqtt;
|
||||||
MqttCheckbox.checked = settings.mqtt.active;
|
MqttCheckbox.checked = settings.mqtt.active;
|
||||||
MqttServer.disabled = !MqttCheckbox.check;
|
MqttServer.disabled = !MqttCheckbox.checked;
|
||||||
MqttTopic.disabled = !MqttCheckbox.check;
|
MqttTopic.disabled = !MqttCheckbox.checked;
|
||||||
MqttUsername.disabled = !MqttCheckbox.check;
|
MqttUsername.disabled = !MqttCheckbox.checked;
|
||||||
MqttPassword.disabled = !MqttCheckbox.check;
|
MqttPassword.disabled = !MqttCheckbox.checked;
|
||||||
MqttPort.disabled = !MqttCheckbox.check;
|
MqttPort.disabled = !MqttCheckbox.checked;
|
||||||
MqttBeaconOverMqtt.disabled = !MqttCheckbox.check;
|
MqttBeaconOverMqtt.disabled = !MqttCheckbox.checked;
|
||||||
|
|
||||||
// Reboot
|
// Reboot
|
||||||
document.getElementById("other.rebootMode").checked = settings.other.rebootMode;
|
document.getElementById("other.rebootMode").checked = settings.other.rebootMode;
|
||||||
@@ -254,9 +260,6 @@ function loadSettings(settings) {
|
|||||||
document.getElementById("ntp.server").value = settings.ntp.server;
|
document.getElementById("ntp.server").value = settings.ntp.server;
|
||||||
document.getElementById("ntp.gmtCorrection").value = settings.ntp.gmtCorrection;
|
document.getElementById("ntp.gmtCorrection").value = settings.ntp.gmtCorrection;
|
||||||
|
|
||||||
// Experimental
|
|
||||||
document.getElementById("other.backupDigiMode").checked = settings.other.backupDigiMode;
|
|
||||||
|
|
||||||
updateImage();
|
updateImage();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -359,13 +362,21 @@ MonitorExternalVoltageCheckbox.addEventListener("change", function () {
|
|||||||
MonitorExternalSleepVoltage.disabled = !this.checked;
|
MonitorExternalSleepVoltage.disabled = !this.checked;
|
||||||
});
|
});
|
||||||
const SendExternalVoltageCheckbox = document.querySelector('input[name="battery.sendExternalVoltage"]');
|
const SendExternalVoltageCheckbox = document.querySelector('input[name="battery.sendExternalVoltage"]');
|
||||||
|
const UseExternalI2CSensorCheckbox = document.querySelector('input[name="battery.useExternalI2CSensor"]');
|
||||||
const ExternalVoltagePin = document.querySelector('input[name="battery.externalVoltagePin"]');
|
const ExternalVoltagePin = document.querySelector('input[name="battery.externalVoltagePin"]');
|
||||||
const ExternalVoltageDividerR1 = document.querySelector('input[name="battery.voltageDividerR1"]');
|
const ExternalVoltageDividerR1 = document.querySelector('input[name="battery.voltageDividerR1"]');
|
||||||
const ExternalVoltageDividerR2 = document.querySelector('input[name="battery.voltageDividerR2"]');
|
const ExternalVoltageDividerR2 = document.querySelector('input[name="battery.voltageDividerR2"]');
|
||||||
SendExternalVoltageCheckbox.addEventListener("change", function () {
|
SendExternalVoltageCheckbox.addEventListener("change", function () {
|
||||||
ExternalVoltagePin.disabled = !this.checked;
|
UseExternalI2CSensorCheckbox.disabled = !this.checked;
|
||||||
ExternalVoltageDividerR1.disabled = !this.checked;
|
ExternalVoltagePin.disabled = !this.checked || UseExternalI2CSensorCheckbox.checked;
|
||||||
ExternalVoltageDividerR2.disabled = !this.checked;
|
ExternalVoltageDividerR1.disabled = !this.checked || UseExternalI2CSensorCheckbox.checked;
|
||||||
|
ExternalVoltageDividerR2.disabled = !this.checked || UseExternalI2CSensorCheckbox.checked;
|
||||||
|
});
|
||||||
|
|
||||||
|
UseExternalI2CSensorCheckbox.addEventListener("change", function () {
|
||||||
|
ExternalVoltagePin.disabled = this.checked;
|
||||||
|
ExternalVoltageDividerR1.disabled = this.checked;
|
||||||
|
ExternalVoltageDividerR2.disabled = this.checked;
|
||||||
});
|
});
|
||||||
|
|
||||||
// Telemetry Switches
|
// Telemetry Switches
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ public:
|
|||||||
bool statusActive;
|
bool statusActive;
|
||||||
String statusPacket;
|
String statusPacket;
|
||||||
bool gpsActive;
|
bool gpsActive;
|
||||||
bool gpsAmbiguity;
|
int ambiguityLevel;
|
||||||
};
|
};
|
||||||
|
|
||||||
class APRS_IS {
|
class APRS_IS {
|
||||||
@@ -68,7 +68,8 @@ public:
|
|||||||
class DIGI {
|
class DIGI {
|
||||||
public:
|
public:
|
||||||
int mode;
|
int mode;
|
||||||
int ecoMode; // 0 = Not Active | 1 = Ultra EcoMode | 2 = Not Active (WiFi OFF, Serial ON)
|
int ecoMode; // 0 = Not Active | 1 = Ultra EcoMode | 2 = Not Active (WiFi OFF, Serial ON)
|
||||||
|
bool backupDigiMode;
|
||||||
};
|
};
|
||||||
|
|
||||||
class LoraModule {
|
class LoraModule {
|
||||||
@@ -102,6 +103,7 @@ public:
|
|||||||
int externalVoltagePin;
|
int externalVoltagePin;
|
||||||
bool monitorExternalVoltage;
|
bool monitorExternalVoltage;
|
||||||
float externalSleepVoltage;
|
float externalSleepVoltage;
|
||||||
|
bool useExternalI2CSensor;
|
||||||
float voltageDividerR1;
|
float voltageDividerR1;
|
||||||
float voltageDividerR2;
|
float voltageDividerR2;
|
||||||
bool sendVoltageAsTelemetry;
|
bool sendVoltageAsTelemetry;
|
||||||
@@ -127,6 +129,7 @@ public:
|
|||||||
bool enableServer;
|
bool enableServer;
|
||||||
bool enableSerial;
|
bool enableSerial;
|
||||||
bool acceptOwn;
|
bool acceptOwn;
|
||||||
|
bool aprsBridgeActive;
|
||||||
};
|
};
|
||||||
|
|
||||||
class OTA {
|
class OTA {
|
||||||
@@ -168,8 +171,8 @@ public:
|
|||||||
class Configuration {
|
class Configuration {
|
||||||
public:
|
public:
|
||||||
String callsign;
|
String callsign;
|
||||||
|
String tacticalCallsign;
|
||||||
int rememberStationTime;
|
int rememberStationTime;
|
||||||
bool backupDigiMode;
|
|
||||||
bool rebootMode;
|
bool rebootMode;
|
||||||
int rebootModeTime;
|
int rebootModeTime;
|
||||||
int startupDelay;
|
int startupDelay;
|
||||||
|
|||||||
+2
-2
@@ -27,8 +27,8 @@ namespace TNC_Utils {
|
|||||||
void setup();
|
void setup();
|
||||||
void loop();
|
void loop();
|
||||||
|
|
||||||
void sendToClients(const String& packet);
|
void sendToClients(const String& packet, bool stripBytes = false);
|
||||||
void sendToSerial(const String& packet);
|
void sendToSerial(const String& packet, bool stripBytes = false);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -20,6 +20,7 @@
|
|||||||
#define WX_UTILS_H_
|
#define WX_UTILS_H_
|
||||||
|
|
||||||
#include <Adafruit_Sensor.h>
|
#include <Adafruit_Sensor.h>
|
||||||
|
#include <Adafruit_AHTX0.h>
|
||||||
#include <Adafruit_BME280.h>
|
#include <Adafruit_BME280.h>
|
||||||
#include <Adafruit_BMP280.h>
|
#include <Adafruit_BMP280.h>
|
||||||
#include <Adafruit_BME680.h>
|
#include <Adafruit_BME680.h>
|
||||||
|
|||||||
Binary file not shown.
@@ -67,8 +67,8 @@ ___________________________________________________________________*/
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
String versionDate = "2025-10-15";
|
String versionDate = "2026-01-21";
|
||||||
String versionNumber = "3.1.4";
|
String versionNumber = "3.2";
|
||||||
Configuration Config;
|
Configuration Config;
|
||||||
WiFiClient aprsIsClient;
|
WiFiClient aprsIsClient;
|
||||||
WiFiClient mqttClient;
|
WiFiClient mqttClient;
|
||||||
@@ -86,7 +86,7 @@ WiFi_AP *currentWiFi = &Config.wifiAPs[myWiFiAPIndex];
|
|||||||
bool isUpdatingOTA = false;
|
bool isUpdatingOTA = false;
|
||||||
uint32_t lastBatteryCheck = 0;
|
uint32_t lastBatteryCheck = 0;
|
||||||
|
|
||||||
bool backUpDigiMode = false;
|
bool backupDigiMode = false;
|
||||||
bool modemLoggedToAPRSIS = false;
|
bool modemLoggedToAPRSIS = false;
|
||||||
|
|
||||||
#ifdef HAS_EPAPER
|
#ifdef HAS_EPAPER
|
||||||
@@ -187,14 +187,14 @@ void loop() {
|
|||||||
APRS_IS_Utils::processLoRaPacket(packet); // Send received packet to APRSIS
|
APRS_IS_Utils::processLoRaPacket(packet); // Send received packet to APRSIS
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Config.loramodule.txActive && (Config.digi.mode == 2 || Config.digi.mode == 3 || backUpDigiMode)) { // If Digi enabled
|
if (Config.loramodule.txActive && (Config.digi.mode == 2 || Config.digi.mode == 3 || backupDigiMode)) { // If Digi enabled
|
||||||
STATION_Utils::clean25SegBuffer();
|
STATION_Utils::clean25SegBuffer();
|
||||||
DIGI_Utils::processLoRaPacket(packet); // Send received packet to Digi
|
DIGI_Utils::processLoRaPacket(packet); // Send received packet to Digi
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Config.tnc.enableServer) TNC_Utils::sendToClients(packet); // Send received packet to TNC KISS
|
if (Config.tnc.enableServer) TNC_Utils::sendToClients(packet, true); // Send received packet to TNC KISS
|
||||||
if (Config.tnc.enableSerial) TNC_Utils::sendToSerial(packet); // Send received packet to Serial KISS
|
if (Config.tnc.enableSerial) TNC_Utils::sendToSerial(packet, true); // Send received packet to Serial KISS
|
||||||
if (Config.mqtt.active) MQTT_Utils::sendToMqtt(packet); // Send received packet to MQTT
|
if (Config.mqtt.active) MQTT_Utils::sendToMqtt(packet); // Send received packet to MQTT
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Config.aprs_is.active) APRS_IS_Utils::listenAPRSIS(); // listen received packet from APRSIS
|
if (Config.aprs_is.active) APRS_IS_Utils::listenAPRSIS(); // listen received packet from APRSIS
|
||||||
|
|||||||
+97
-83
@@ -16,6 +16,7 @@
|
|||||||
* along with LoRa APRS iGate. If not, see <https://www.gnu.org/licenses/>.
|
* along with LoRa APRS iGate. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <APRSPacketLib.h>
|
||||||
#include <WiFi.h>
|
#include <WiFi.h>
|
||||||
#include "configuration.h"
|
#include "configuration.h"
|
||||||
#include "aprs_is_utils.h"
|
#include "aprs_is_utils.h"
|
||||||
@@ -25,6 +26,7 @@
|
|||||||
#include "query_utils.h"
|
#include "query_utils.h"
|
||||||
#include "A7670_utils.h"
|
#include "A7670_utils.h"
|
||||||
#include "digi_utils.h"
|
#include "digi_utils.h"
|
||||||
|
#include "tnc_utils.h"
|
||||||
#include "display.h"
|
#include "display.h"
|
||||||
#include "utils.h"
|
#include "utils.h"
|
||||||
|
|
||||||
@@ -40,11 +42,13 @@ extern String fifthLine;
|
|||||||
extern String sixthLine;
|
extern String sixthLine;
|
||||||
extern String seventhLine;
|
extern String seventhLine;
|
||||||
extern bool modemLoggedToAPRSIS;
|
extern bool modemLoggedToAPRSIS;
|
||||||
extern bool backUpDigiMode;
|
extern bool backupDigiMode;
|
||||||
extern String versionNumber;
|
extern String versionNumber;
|
||||||
|
|
||||||
uint32_t lastRxTime = millis();
|
uint32_t lastRxTime = millis();
|
||||||
bool passcodeValid = false;
|
bool passcodeValid = false;
|
||||||
|
uint32_t lastServerCheck = 0;
|
||||||
|
|
||||||
|
|
||||||
#ifdef HAS_A7670
|
#ifdef HAS_A7670
|
||||||
extern bool stationBeacon;
|
extern bool stationBeacon;
|
||||||
@@ -92,7 +96,7 @@ namespace APRS_IS_Utils {
|
|||||||
if (WiFi.status() == WL_CONNECTED) {
|
if (WiFi.status() == WL_CONNECTED) {
|
||||||
wifiState = "OK";
|
wifiState = "OK";
|
||||||
} else {
|
} else {
|
||||||
if (backUpDigiMode || Config.digi.ecoMode == 1 || Config.digi.ecoMode == 2) {
|
if (backupDigiMode || Config.digi.ecoMode == 1 || Config.digi.ecoMode == 2) {
|
||||||
wifiState = "--";
|
wifiState = "--";
|
||||||
} else {
|
} else {
|
||||||
wifiState = "AP";
|
wifiState = "AP";
|
||||||
@@ -235,12 +239,7 @@ namespace APRS_IS_Utils {
|
|||||||
String buildPacketToTx(const String& aprsisPacket, uint8_t packetType) {
|
String buildPacketToTx(const String& aprsisPacket, uint8_t packetType) {
|
||||||
String packet = aprsisPacket;
|
String packet = aprsisPacket;
|
||||||
packet.trim();
|
packet.trim();
|
||||||
String outputPacket = Config.callsign;
|
String outputPacket = APRSPacketLib::generateBasePacket(Config.callsign, "APLRG1", Config.beacon.path);
|
||||||
outputPacket += ">APLRG1";
|
|
||||||
if (Config.beacon.path != "") {
|
|
||||||
outputPacket += ",";
|
|
||||||
outputPacket += Config.beacon.path;
|
|
||||||
}
|
|
||||||
outputPacket += ":}";
|
outputPacket += ":}";
|
||||||
outputPacket += packet.substring(0, packet.indexOf(",")); // Callsign>Tocall
|
outputPacket += packet.substring(0, packet.indexOf(",")); // Callsign>Tocall
|
||||||
outputPacket.concat(",TCPIP,");
|
outputPacket.concat(",TCPIP,");
|
||||||
@@ -277,94 +276,109 @@ namespace APRS_IS_Utils {
|
|||||||
return outputPacket;
|
return outputPacket;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void processAckMessage(const String& sender, const String& message) {
|
||||||
|
String ackPacket = Config.callsign;
|
||||||
|
ackPacket += ">APLRG1,TCPIP,qAC::";
|
||||||
|
|
||||||
|
String senderCallsign = sender;
|
||||||
|
for (int i = sender.length(); i < 9; i++) {
|
||||||
|
senderCallsign += ' ';
|
||||||
|
}
|
||||||
|
ackPacket += senderCallsign;
|
||||||
|
ackPacket += ":";
|
||||||
|
|
||||||
|
String ackMessage = "ack";
|
||||||
|
ackMessage += message.substring(message.indexOf("{") + 1);
|
||||||
|
ackMessage.trim();
|
||||||
|
ackPacket += ackMessage;
|
||||||
|
|
||||||
|
#ifdef HAS_A7670
|
||||||
|
A7670_Utils::uploadToAPRSIS(ackPacket);
|
||||||
|
#else
|
||||||
|
upload(ackPacket);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
void processAPRSISPacket(const String& packet) {
|
void processAPRSISPacket(const String& packet) {
|
||||||
|
uint32_t currentTime = millis();
|
||||||
if (!passcodeValid && packet.indexOf(Config.callsign) != -1) {
|
if (!passcodeValid && packet.indexOf(Config.callsign) != -1) {
|
||||||
if (packet.indexOf("unverified") != -1 ) {
|
if (packet.indexOf("unverified") != -1 ) {
|
||||||
Serial.println("\n****APRS PASSCODE NOT VALID****\n");
|
Serial.println("\n****APRS PASSCODE NOT VALID****\n");
|
||||||
displayShow(firstLine, "", " APRS PASSCODE", " NOT VALID !!!", "", "", "", 0);
|
displayShow(firstLine, "", " APRS PASSCODE", " NOT VALID !!!", "", "", "", 3000);
|
||||||
while (1) {};
|
aprsIsClient.stop();
|
||||||
|
Config.aprs_is.active = false;
|
||||||
} else if (packet.indexOf("verified") != -1 ) {
|
} else if (packet.indexOf("verified") != -1 ) {
|
||||||
|
if (Config.digi.backupDigiMode) lastServerCheck = currentTime;
|
||||||
passcodeValid = true;
|
passcodeValid = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (passcodeValid && !packet.startsWith("#")) {
|
if (passcodeValid) {
|
||||||
if (Config.aprs_is.messagesToRF && packet.indexOf("::") > 0) {
|
if (packet.startsWith("#")) {
|
||||||
String Sender = packet.substring(0, packet.indexOf(">"));
|
if (Config.digi.backupDigiMode) lastServerCheck = currentTime;
|
||||||
const String& AddresseeAndMessage = packet.substring(packet.indexOf("::") + 2);
|
} else {
|
||||||
String Addressee = AddresseeAndMessage.substring(0, AddresseeAndMessage.indexOf(":"));
|
if (Config.aprs_is.messagesToRF && packet.indexOf("::") > 0) {
|
||||||
Addressee.trim();
|
String Sender = packet.substring(0, packet.indexOf(">"));
|
||||||
if (Addressee == Config.callsign) { // its for me!
|
const String& AddresseeAndMessage = packet.substring(packet.indexOf("::") + 2);
|
||||||
String receivedMessage;
|
String Addressee = AddresseeAndMessage.substring(0, AddresseeAndMessage.indexOf(":"));
|
||||||
if (AddresseeAndMessage.indexOf("{") > 0) { // ack?
|
Addressee.trim();
|
||||||
String ackMessage = "ack";
|
if (Addressee == Config.callsign) { // its for me!
|
||||||
ackMessage += AddresseeAndMessage.substring(AddresseeAndMessage.indexOf("{") + 1);
|
String receivedMessage;
|
||||||
ackMessage.trim();
|
if (AddresseeAndMessage.indexOf("{") > 0) { // ack?
|
||||||
delay(4000);
|
processAckMessage(Sender, AddresseeAndMessage);
|
||||||
for (int i = Sender.length(); i < 9; i++) {
|
receivedMessage = AddresseeAndMessage.substring(AddresseeAndMessage.indexOf(":") + 1, AddresseeAndMessage.indexOf("{"));
|
||||||
Sender += ' ';
|
} else {
|
||||||
|
receivedMessage = AddresseeAndMessage.substring(AddresseeAndMessage.indexOf(":") + 1);
|
||||||
}
|
}
|
||||||
|
if (receivedMessage.indexOf("?") == 0) {
|
||||||
String ackPacket = Config.callsign;
|
Utils::println("Rx Query (APRS-IS) : " + packet);
|
||||||
ackPacket += ">APLRG1,TCPIP,qAC::";
|
String queryAnswer = QUERY_Utils::process(receivedMessage, Sender, true, false);
|
||||||
ackPacket += Sender;
|
//Serial.println("---> QUERY Answer : " + queryAnswer.substring(0,queryAnswer.indexOf("\n")));
|
||||||
ackPacket += ":";
|
if (!Config.display.alwaysOn && Config.display.timeout != 0) {
|
||||||
ackPacket += ackMessage;
|
displayToggle(true);
|
||||||
#ifdef HAS_A7670
|
}
|
||||||
A7670_Utils::uploadToAPRSIS(ackPacket);
|
lastScreenOn = currentTime;
|
||||||
#else
|
#ifdef HAS_A7670
|
||||||
upload(ackPacket);
|
A7670_Utils::uploadToAPRSIS(queryAnswer);
|
||||||
#endif
|
#else
|
||||||
receivedMessage = AddresseeAndMessage.substring(AddresseeAndMessage.indexOf(":") + 1, AddresseeAndMessage.indexOf("{"));
|
upload(queryAnswer);
|
||||||
} else {
|
#endif
|
||||||
receivedMessage = AddresseeAndMessage.substring(AddresseeAndMessage.indexOf(":") + 1);
|
SYSLOG_Utils::log(2, queryAnswer, 0, 0.0, 0); // APRSIS TX
|
||||||
}
|
fifthLine = "APRS-IS ----> APRS-IS";
|
||||||
if (receivedMessage.indexOf("?") == 0) {
|
sixthLine = Config.callsign;
|
||||||
Utils::println("Rx Query (APRS-IS) : " + packet);
|
for (int j = sixthLine.length();j < 9;j++) {
|
||||||
Sender.trim();
|
sixthLine += " ";
|
||||||
String queryAnswer = QUERY_Utils::process(receivedMessage, Sender, true, false);
|
}
|
||||||
//Serial.println("---> QUERY Answer : " + queryAnswer.substring(0,queryAnswer.indexOf("\n")));
|
sixthLine += "> ";
|
||||||
if (!Config.display.alwaysOn && Config.display.timeout != 0) {
|
sixthLine += Sender;
|
||||||
displayToggle(true);
|
seventhLine = "QUERY = ";
|
||||||
|
seventhLine += receivedMessage;
|
||||||
}
|
}
|
||||||
lastScreenOn = millis();
|
|
||||||
delay(500);
|
|
||||||
#ifdef HAS_A7670
|
|
||||||
A7670_Utils::uploadToAPRSIS(queryAnswer);
|
|
||||||
#else
|
|
||||||
upload(queryAnswer);
|
|
||||||
#endif
|
|
||||||
SYSLOG_Utils::log(2, queryAnswer, 0, 0.0, 0); // APRSIS TX
|
|
||||||
fifthLine = "APRS-IS ----> APRS-IS";
|
|
||||||
sixthLine = Config.callsign;
|
|
||||||
for (int j = sixthLine.length();j < 9;j++) {
|
|
||||||
sixthLine += " ";
|
|
||||||
}
|
|
||||||
sixthLine += "> ";
|
|
||||||
sixthLine += Sender;
|
|
||||||
seventhLine = "QUERY = ";
|
|
||||||
seventhLine += receivedMessage;
|
|
||||||
}
|
|
||||||
displayShow(firstLine, secondLine, thirdLine, fourthLine, fifthLine, sixthLine, seventhLine, 0);
|
|
||||||
} else {
|
|
||||||
Utils::print("Rx Message (APRS-IS): " + packet);
|
|
||||||
if (STATION_Utils::wasHeard(Addressee) && packet.indexOf("EQNS.") == -1 && packet.indexOf("UNIT.") == -1 && packet.indexOf("PARM.") == -1) {
|
|
||||||
STATION_Utils::addToOutputPacketBuffer(buildPacketToTx(packet, 1));
|
|
||||||
displayToggle(true);
|
|
||||||
lastScreenOn = millis();
|
|
||||||
Utils::typeOfPacket(packet, 1); // APRS-LoRa
|
|
||||||
displayShow(firstLine, secondLine, thirdLine, fourthLine, fifthLine, sixthLine, seventhLine, 0);
|
displayShow(firstLine, secondLine, thirdLine, fourthLine, fifthLine, sixthLine, seventhLine, 0);
|
||||||
|
} else {
|
||||||
|
Utils::print("Rx Message (APRS-IS): " + packet);
|
||||||
|
if (STATION_Utils::wasHeard(Addressee) && packet.indexOf("EQNS.") == -1 && packet.indexOf("UNIT.") == -1 && packet.indexOf("PARM.") == -1) {
|
||||||
|
STATION_Utils::addToOutputPacketBuffer(buildPacketToTx(packet, 1));
|
||||||
|
displayToggle(true);
|
||||||
|
lastScreenOn = currentTime;
|
||||||
|
Utils::typeOfPacket(packet, 1); // APRS-LoRa
|
||||||
|
displayShow(firstLine, secondLine, thirdLine, fourthLine, fifthLine, sixthLine, seventhLine, 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else if (Config.aprs_is.objectsToRF && packet.indexOf(":;") > 0) {
|
||||||
|
Utils::print("Rx Object (APRS-IS) : " + packet);
|
||||||
|
if (STATION_Utils::checkObjectTime(packet)) {
|
||||||
|
STATION_Utils::addToOutputPacketBuffer(buildPacketToTx(packet, 5));
|
||||||
|
displayToggle(true);
|
||||||
|
lastScreenOn = currentTime;
|
||||||
|
Utils::typeOfPacket(packet, 1); // APRS-LoRa
|
||||||
|
Serial.println();
|
||||||
|
} else {
|
||||||
|
Serial.println(" ---> Rejected (Time): No Tx");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (Config.aprs_is.objectsToRF && packet.indexOf(":;") > 0) {
|
if (Config.tnc.aprsBridgeActive) {
|
||||||
Utils::print("Rx Object (APRS-IS) : " + packet);
|
if (Config.tnc.enableServer) TNC_Utils::sendToClients(packet); // Send received packet to TNC KISS
|
||||||
if (STATION_Utils::checkObjectTime(packet)) {
|
if (Config.tnc.enableSerial) TNC_Utils::sendToSerial(packet); // Send received packet to Serial KISS
|
||||||
STATION_Utils::addToOutputPacketBuffer(buildPacketToTx(packet, 5));
|
|
||||||
displayToggle(true);
|
|
||||||
lastScreenOn = millis();
|
|
||||||
Utils::typeOfPacket(packet, 1); // APRS-LoRa
|
|
||||||
Serial.println();
|
|
||||||
} else {
|
|
||||||
Serial.println(" ---> Rejected (Time): No Tx");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+74
-26
@@ -16,7 +16,7 @@
|
|||||||
* along with LoRa APRS iGate. If not, see <https://www.gnu.org/licenses/>.
|
* along with LoRa APRS iGate. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <Arduino.h>
|
#include <Adafruit_INA219.h>
|
||||||
#include "battery_utils.h"
|
#include "battery_utils.h"
|
||||||
#include "configuration.h"
|
#include "configuration.h"
|
||||||
#include "board_pinout.h"
|
#include "board_pinout.h"
|
||||||
@@ -37,6 +37,10 @@ float multiplyCorrection = 0.035;
|
|||||||
|
|
||||||
float voltageDividerTransformation = 0.0;
|
float voltageDividerTransformation = 0.0;
|
||||||
|
|
||||||
|
uint8_t externalI2CSensorAddress = 0x00;
|
||||||
|
int externalI2CSensorType = 0; // 0 = None | 1 = INA219
|
||||||
|
|
||||||
|
Adafruit_INA219 ina219;
|
||||||
|
|
||||||
|
|
||||||
#ifdef HAS_ADC_CALIBRATION
|
#ifdef HAS_ADC_CALIBRATION
|
||||||
@@ -98,6 +102,30 @@ namespace BATTERY_Utils {
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void getI2CVoltageSensorAddress() {
|
||||||
|
uint8_t err, addr;
|
||||||
|
for(addr = 1; addr < 0x7F; addr++) {
|
||||||
|
#if defined(HELTEC_V3) || defined(HELTEC_V3_2) || defined(HELTEC_WSL_V3) || defined(HELTEC_WSL_V3_DISPLAY)
|
||||||
|
Wire1.beginTransmission(addr);
|
||||||
|
err = Wire1.endTransmission();
|
||||||
|
#else
|
||||||
|
Wire.beginTransmission(addr);
|
||||||
|
err = Wire.endTransmission();
|
||||||
|
#endif
|
||||||
|
delay(5);
|
||||||
|
if (err == 0) {
|
||||||
|
if (addr == 0x40) { // INA219
|
||||||
|
externalI2CSensorAddress = addr;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
bool detectINA219(uint8_t addr) {
|
||||||
|
ina219 = Adafruit_INA219(addr);
|
||||||
|
return ina219.begin();
|
||||||
|
}
|
||||||
|
|
||||||
void setup() {
|
void setup() {
|
||||||
if ((Config.battery.sendExternalVoltage || Config.battery.monitorExternalVoltage) && Config.battery.voltageDividerR2 != 0) voltageDividerTransformation = (Config.battery.voltageDividerR1 + Config.battery.voltageDividerR2) / Config.battery.voltageDividerR2;
|
if ((Config.battery.sendExternalVoltage || Config.battery.monitorExternalVoltage) && Config.battery.voltageDividerR2 != 0) voltageDividerTransformation = (Config.battery.voltageDividerR1 + Config.battery.voltageDividerR2) / Config.battery.voltageDividerR2;
|
||||||
|
|
||||||
@@ -107,6 +135,14 @@ namespace BATTERY_Utils {
|
|||||||
adcCalibration();
|
adcCalibration();
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
getI2CVoltageSensorAddress();
|
||||||
|
if (externalI2CSensorAddress != 0x00) {
|
||||||
|
if (detectINA219(externalI2CSensorAddress)) {
|
||||||
|
Serial.println("INA219 sensor found");
|
||||||
|
externalI2CSensorType = 1; // INA219
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
float checkInternalVoltage() {
|
float checkInternalVoltage() {
|
||||||
@@ -177,37 +213,49 @@ namespace BATTERY_Utils {
|
|||||||
}
|
}
|
||||||
|
|
||||||
float checkExternalVoltage() {
|
float checkExternalVoltage() {
|
||||||
int sample;
|
if (externalI2CSensorType == 0) {
|
||||||
int sampleSum = 0;
|
int sample;
|
||||||
for (int i = 0; i < 100; i++) {
|
int sampleSum = 0;
|
||||||
#ifdef HAS_ADC_CALIBRATION
|
for (int i = 0; i < 100; i++) {
|
||||||
if (calibrationEnable){
|
#ifdef HAS_ADC_CALIBRATION
|
||||||
sample = adc1_get_raw(ExternalVoltage_ADC_Channel);
|
if (calibrationEnable){
|
||||||
} else {
|
sample = adc1_get_raw(ExternalVoltage_ADC_Channel);
|
||||||
|
} else {
|
||||||
|
sample = analogRead(Config.battery.externalVoltagePin);
|
||||||
|
}
|
||||||
|
#else
|
||||||
sample = analogRead(Config.battery.externalVoltagePin);
|
sample = analogRead(Config.battery.externalVoltagePin);
|
||||||
|
#endif
|
||||||
|
sampleSum += sample;
|
||||||
|
delayMicroseconds(50);
|
||||||
|
}
|
||||||
|
|
||||||
|
float extVoltage;
|
||||||
|
#ifdef HAS_ADC_CALIBRATION
|
||||||
|
if (calibrationEnable) {
|
||||||
|
extVoltage = esp_adc_cal_raw_to_voltage(sampleSum / 100.0, &adc_chars) * voltageDividerTransformation; // in mV
|
||||||
|
extVoltage /= 1000.0;
|
||||||
|
} else {
|
||||||
|
extVoltage = ((((sampleSum/100.0)* adcReadingTransformation) + readingCorrection) * voltageDividerTransformation) - multiplyCorrection;
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
sample = analogRead(Config.battery.externalVoltagePin);
|
extVoltage = ((((sampleSum/100.0)* adcReadingTransformation) + readingCorrection) * voltageDividerTransformation) - multiplyCorrection;
|
||||||
#endif
|
#endif
|
||||||
sampleSum += sample;
|
|
||||||
delayMicroseconds(50);
|
return extVoltage; // raw voltage without mapping
|
||||||
}
|
|
||||||
|
|
||||||
float extVoltage;
|
// return mapVoltage(voltage, 5.05, 6.32, 4.5, 5.5); // mapped voltage
|
||||||
#ifdef HAS_ADC_CALIBRATION
|
} else if (externalI2CSensorType == 1) { // INA219
|
||||||
if (calibrationEnable){
|
int sampleSum = 0;
|
||||||
extVoltage = esp_adc_cal_raw_to_voltage(sampleSum / 100, &adc_chars) * voltageDividerTransformation; // in mV
|
for (int i = 0; i < 100; i++) {
|
||||||
extVoltage /= 1000;
|
sampleSum += ina219.getBusVoltage_V() * 1000.0;
|
||||||
} else {
|
delayMicroseconds(50);
|
||||||
extVoltage = ((((sampleSum/100)* adcReadingTransformation) + readingCorrection) * voltageDividerTransformation) - multiplyCorrection;
|
|
||||||
}
|
}
|
||||||
#else
|
float extVoltage = sampleSum/100.0;
|
||||||
extVoltage = ((((sampleSum/100)* adcReadingTransformation) + readingCorrection) * voltageDividerTransformation) - multiplyCorrection;
|
return extVoltage/1000.0;
|
||||||
#endif
|
} else {
|
||||||
|
return 0.0;
|
||||||
return extVoltage; // raw voltage without mapping
|
}
|
||||||
|
|
||||||
// return mapVoltage(voltage, 5.05, 6.32, 4.5, 5.5); // mapped voltage
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void startupBatteryHealth() {
|
void startupBatteryHealth() {
|
||||||
|
|||||||
+53
-23
@@ -51,8 +51,9 @@ bool Configuration::writeFile() {
|
|||||||
data["wifi"]["autoAP"]["timeout"] = wifiAutoAP.timeout;
|
data["wifi"]["autoAP"]["timeout"] = wifiAutoAP.timeout;
|
||||||
|
|
||||||
callsign.trim();
|
callsign.trim();
|
||||||
callsign.toUpperCase();
|
|
||||||
data["callsign"] = callsign;
|
data["callsign"] = callsign;
|
||||||
|
tacticalCallsign.trim();
|
||||||
|
data["tacticalCallsign"] = tacticalCallsign;
|
||||||
|
|
||||||
data["aprs_is"]["active"] = aprs_is.active;
|
data["aprs_is"]["active"] = aprs_is.active;
|
||||||
data["aprs_is"]["passcode"] = aprs_is.passcode;
|
data["aprs_is"]["passcode"] = aprs_is.passcode;
|
||||||
@@ -78,7 +79,7 @@ bool Configuration::writeFile() {
|
|||||||
data["beacon"]["statusPacket"] = beacon.statusPacket;
|
data["beacon"]["statusPacket"] = beacon.statusPacket;
|
||||||
|
|
||||||
data["beacon"]["gpsActive"] = beacon.gpsActive;
|
data["beacon"]["gpsActive"] = beacon.gpsActive;
|
||||||
data["beacon"]["gpsAmbiguity"] = beacon.gpsAmbiguity;
|
data["beacon"]["ambiguityLevel"] = beacon.ambiguityLevel;
|
||||||
|
|
||||||
data["personalNote"] = personalNote;
|
data["personalNote"] = personalNote;
|
||||||
|
|
||||||
@@ -89,18 +90,35 @@ bool Configuration::writeFile() {
|
|||||||
#if defined(HAS_A7670)
|
#if defined(HAS_A7670)
|
||||||
if (digi.ecoMode == 1) data["digi"]["ecoMode"] = 2;
|
if (digi.ecoMode == 1) data["digi"]["ecoMode"] = 2;
|
||||||
#endif
|
#endif
|
||||||
|
data["digi"]["backupDigiMode"] = digi.backupDigiMode;
|
||||||
|
|
||||||
data["lora"]["rxActive"] = loramodule.rxActive;
|
data["lora"]["rxActive"] = loramodule.rxActive;
|
||||||
data["lora"]["rxFreq"] = loramodule.rxFreq;
|
data["lora"]["rxFreq"] = loramodule.rxFreq;
|
||||||
data["lora"]["rxSpreadingFactor"] = loramodule.rxSpreadingFactor;
|
|
||||||
data["lora"]["rxCodingRate4"] = loramodule.rxCodingRate4;
|
data["lora"]["rxCodingRate4"] = loramodule.rxCodingRate4;
|
||||||
data["lora"]["rxSignalBandwidth"] = loramodule.rxSignalBandwidth;
|
data["lora"]["rxSignalBandwidth"] = loramodule.rxSignalBandwidth;
|
||||||
data["lora"]["txActive"] = loramodule.txActive;
|
data["lora"]["txActive"] = loramodule.txActive;
|
||||||
data["lora"]["txFreq"] = loramodule.txFreq;
|
data["lora"]["txFreq"] = loramodule.txFreq;
|
||||||
data["lora"]["txSpreadingFactor"] = loramodule.txSpreadingFactor;
|
|
||||||
data["lora"]["txCodingRate4"] = loramodule.txCodingRate4;
|
data["lora"]["txCodingRate4"] = loramodule.txCodingRate4;
|
||||||
data["lora"]["txSignalBandwidth"] = loramodule.txSignalBandwidth;
|
data["lora"]["txSignalBandwidth"] = loramodule.txSignalBandwidth;
|
||||||
data["lora"]["power"] = loramodule.power;
|
data["lora"]["power"] = loramodule.power;
|
||||||
|
|
||||||
|
int rxSpreadingFactor = loramodule.rxSpreadingFactor;
|
||||||
|
int txSpreadingFactor = loramodule.txSpreadingFactor;
|
||||||
|
#if defined(HAS_SX1276) || defined(HAS_SX1278)
|
||||||
|
const int minSF = 6, maxSF = 12;
|
||||||
|
#endif
|
||||||
|
#if defined(HAS_SX1262) || defined(HAS_SX1268)
|
||||||
|
const int minSF = 5, maxSF = 12;
|
||||||
|
#endif
|
||||||
|
#if defined(HAS_LLCC68)
|
||||||
|
const int minSF = 5, maxSF = 11;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
rxSpreadingFactor = (rxSpreadingFactor < minSF) ? minSF : (rxSpreadingFactor > maxSF) ? maxSF : rxSpreadingFactor;
|
||||||
|
txSpreadingFactor = (txSpreadingFactor < minSF) ? minSF : (txSpreadingFactor > maxSF) ? maxSF : txSpreadingFactor;
|
||||||
|
|
||||||
|
data["lora"]["rxSpreadingFactor"] = rxSpreadingFactor;
|
||||||
|
data["lora"]["txSpreadingFactor"] = txSpreadingFactor;
|
||||||
|
|
||||||
data["display"]["alwaysOn"] = display.alwaysOn;
|
data["display"]["alwaysOn"] = display.alwaysOn;
|
||||||
data["display"]["timeout"] = display.timeout;
|
data["display"]["timeout"] = display.timeout;
|
||||||
@@ -111,11 +129,12 @@ bool Configuration::writeFile() {
|
|||||||
data["battery"]["internalSleepVoltage"] = battery.internalSleepVoltage;
|
data["battery"]["internalSleepVoltage"] = battery.internalSleepVoltage;
|
||||||
|
|
||||||
data["battery"]["sendExternalVoltage"] = battery.sendExternalVoltage;
|
data["battery"]["sendExternalVoltage"] = battery.sendExternalVoltage;
|
||||||
data["battery"]["externalVoltagePin"] = battery.externalVoltagePin;
|
|
||||||
data["battery"]["monitorExternalVoltage"] = battery.monitorExternalVoltage;
|
data["battery"]["monitorExternalVoltage"] = battery.monitorExternalVoltage;
|
||||||
data["battery"]["externalSleepVoltage"] = battery.externalSleepVoltage;
|
data["battery"]["externalSleepVoltage"] = battery.externalSleepVoltage;
|
||||||
|
data["battery"]["useExternalI2CSensor"] = battery.useExternalI2CSensor;
|
||||||
data["battery"]["voltageDividerR1"] = battery.voltageDividerR1;
|
data["battery"]["voltageDividerR1"] = battery.voltageDividerR1;
|
||||||
data["battery"]["voltageDividerR2"] = battery.voltageDividerR2;
|
data["battery"]["voltageDividerR2"] = battery.voltageDividerR2;
|
||||||
|
data["battery"]["externalVoltagePin"] = battery.externalVoltagePin;
|
||||||
|
|
||||||
data["battery"]["sendVoltageAsTelemetry"] = battery.sendVoltageAsTelemetry;
|
data["battery"]["sendVoltageAsTelemetry"] = battery.sendVoltageAsTelemetry;
|
||||||
|
|
||||||
@@ -131,6 +150,7 @@ bool Configuration::writeFile() {
|
|||||||
data["tnc"]["enableServer"] = tnc.enableServer;
|
data["tnc"]["enableServer"] = tnc.enableServer;
|
||||||
data["tnc"]["enableSerial"] = tnc.enableSerial;
|
data["tnc"]["enableSerial"] = tnc.enableSerial;
|
||||||
data["tnc"]["acceptOwn"] = tnc.acceptOwn;
|
data["tnc"]["acceptOwn"] = tnc.acceptOwn;
|
||||||
|
data["tnc"]["aprsBridgeActive"] = tnc.aprsBridgeActive;
|
||||||
|
|
||||||
data["mqtt"]["active"] = mqtt.active;
|
data["mqtt"]["active"] = mqtt.active;
|
||||||
data["mqtt"]["server"] = mqtt.server;
|
data["mqtt"]["server"] = mqtt.server;
|
||||||
@@ -158,8 +178,6 @@ bool Configuration::writeFile() {
|
|||||||
|
|
||||||
data["other"]["rememberStationTime"] = rememberStationTime;
|
data["other"]["rememberStationTime"] = rememberStationTime;
|
||||||
|
|
||||||
data["other"]["backupDigiMode"] = backupDigiMode;
|
|
||||||
|
|
||||||
serializeJson(data, configFile);
|
serializeJson(data, configFile);
|
||||||
configFile.close();
|
configFile.close();
|
||||||
return true;
|
return true;
|
||||||
@@ -202,6 +220,8 @@ bool Configuration::readFile() {
|
|||||||
|
|
||||||
if (!data.containsKey("callsign")) needsRewrite = true;
|
if (!data.containsKey("callsign")) needsRewrite = true;
|
||||||
callsign = data["callsign"] | "NOCALL-10";
|
callsign = data["callsign"] | "NOCALL-10";
|
||||||
|
if (!data.containsKey("tacticalCallsign")) needsRewrite = true;
|
||||||
|
tacticalCallsign = data["tacticalCallsign"] | "";
|
||||||
|
|
||||||
if (!data["aprs_is"].containsKey("active") ||
|
if (!data["aprs_is"].containsKey("active") ||
|
||||||
!data["aprs_is"].containsKey("passcode") ||
|
!data["aprs_is"].containsKey("passcode") ||
|
||||||
@@ -231,7 +251,7 @@ bool Configuration::readFile() {
|
|||||||
!data["beacon"].containsKey("statusActive") ||
|
!data["beacon"].containsKey("statusActive") ||
|
||||||
!data["beacon"].containsKey("statusPacket") ||
|
!data["beacon"].containsKey("statusPacket") ||
|
||||||
!data["beacon"].containsKey("gpsActive") ||
|
!data["beacon"].containsKey("gpsActive") ||
|
||||||
!data["beacon"].containsKey("gpsAmbiguity")) needsRewrite = true;
|
!data["beacon"].containsKey("ambiguityLevel")) needsRewrite = true;
|
||||||
beacon.latitude = data["beacon"]["latitude"] | 0.0;
|
beacon.latitude = data["beacon"]["latitude"] | 0.0;
|
||||||
beacon.longitude = data["beacon"]["longitude"] | 0.0;
|
beacon.longitude = data["beacon"]["longitude"] | 0.0;
|
||||||
beacon.comment = data["beacon"]["comment"] | "LoRa APRS";
|
beacon.comment = data["beacon"]["comment"] | "LoRa APRS";
|
||||||
@@ -245,7 +265,7 @@ bool Configuration::readFile() {
|
|||||||
beacon.statusActive = data["beacon"]["statusActive"] | false;
|
beacon.statusActive = data["beacon"]["statusActive"] | false;
|
||||||
beacon.statusPacket = data["beacon"]["statusPacket"] | "";
|
beacon.statusPacket = data["beacon"]["statusPacket"] | "";
|
||||||
beacon.gpsActive = data["beacon"]["gpsActive"] | false;
|
beacon.gpsActive = data["beacon"]["gpsActive"] | false;
|
||||||
beacon.gpsAmbiguity = data["beacon"]["gpsAmbiguity"] | false;
|
beacon.ambiguityLevel = data["beacon"]["ambiguityLevel"] | 0;
|
||||||
|
|
||||||
if (!data.containsKey("personalNote")) needsRewrite = true;
|
if (!data.containsKey("personalNote")) needsRewrite = true;
|
||||||
personalNote = data["personalNote"] | "personal note here";
|
personalNote = data["personalNote"] | "personal note here";
|
||||||
@@ -254,13 +274,16 @@ bool Configuration::readFile() {
|
|||||||
blacklist = data["blacklist"] | "station callsign";
|
blacklist = data["blacklist"] | "station callsign";
|
||||||
|
|
||||||
if (!data["digi"].containsKey("mode") ||
|
if (!data["digi"].containsKey("mode") ||
|
||||||
!data["digi"].containsKey("ecoMode")) needsRewrite = true;
|
!data["digi"].containsKey("ecoMode") ||
|
||||||
|
!data["digi"].containsKey("backupDigiMode")) needsRewrite = true;
|
||||||
digi.mode = data["digi"]["mode"] | 0;
|
digi.mode = data["digi"]["mode"] | 0;
|
||||||
digi.ecoMode = data["digi"]["ecoMode"] | 0;
|
digi.ecoMode = data["digi"]["ecoMode"] | 0;
|
||||||
if (digi.ecoMode == 1) shouldSleepStop = false;
|
if (digi.ecoMode == 1) shouldSleepStop = false;
|
||||||
#if defined(HAS_A7670)
|
#if defined(HAS_A7670)
|
||||||
if (digi.ecoMode == 1) digi.ecoMode = 2;
|
if (digi.ecoMode == 1) digi.ecoMode = 2;
|
||||||
#endif
|
#endif
|
||||||
|
digi.backupDigiMode = data["digi"]["backupDigiMode"] | false;
|
||||||
|
|
||||||
|
|
||||||
if (!data["lora"].containsKey("rxActive") ||
|
if (!data["lora"].containsKey("rxActive") ||
|
||||||
!data["lora"].containsKey("rxFreq") ||
|
!data["lora"].containsKey("rxFreq") ||
|
||||||
@@ -288,7 +311,11 @@ bool Configuration::readFile() {
|
|||||||
if (!data["display"].containsKey("alwaysOn") ||
|
if (!data["display"].containsKey("alwaysOn") ||
|
||||||
!data["display"].containsKey("timeout") ||
|
!data["display"].containsKey("timeout") ||
|
||||||
!data["display"].containsKey("turn180")) needsRewrite = true;
|
!data["display"].containsKey("turn180")) needsRewrite = true;
|
||||||
display.alwaysOn = data["display"]["alwaysOn"] | true;
|
#ifdef HAS_EPAPER
|
||||||
|
display.alwaysOn = true;
|
||||||
|
#else
|
||||||
|
display.alwaysOn = data["display"]["alwaysOn"] | true;
|
||||||
|
#endif
|
||||||
display.timeout = data["display"]["timeout"] | 4;
|
display.timeout = data["display"]["timeout"] | 4;
|
||||||
display.turn180 = data["display"]["turn180"] | false;
|
display.turn180 = data["display"]["turn180"] | false;
|
||||||
|
|
||||||
@@ -296,21 +323,23 @@ bool Configuration::readFile() {
|
|||||||
!data["battery"].containsKey("monitorInternalVoltage") ||
|
!data["battery"].containsKey("monitorInternalVoltage") ||
|
||||||
!data["battery"].containsKey("internalSleepVoltage") ||
|
!data["battery"].containsKey("internalSleepVoltage") ||
|
||||||
!data["battery"].containsKey("sendExternalVoltage") ||
|
!data["battery"].containsKey("sendExternalVoltage") ||
|
||||||
!data["battery"].containsKey("externalVoltagePin") ||
|
|
||||||
!data["battery"].containsKey("monitorExternalVoltage") ||
|
!data["battery"].containsKey("monitorExternalVoltage") ||
|
||||||
!data["battery"].containsKey("externalSleepVoltage") ||
|
!data["battery"].containsKey("externalSleepVoltage") ||
|
||||||
|
!data["battery"].containsKey("useExternalI2CSensor") ||
|
||||||
!data["battery"].containsKey("voltageDividerR1") ||
|
!data["battery"].containsKey("voltageDividerR1") ||
|
||||||
!data["battery"].containsKey("voltageDividerR2") ||
|
!data["battery"].containsKey("voltageDividerR2") ||
|
||||||
|
!data["battery"].containsKey("externalVoltagePin") ||
|
||||||
!data["battery"].containsKey("sendVoltageAsTelemetry")) needsRewrite = true;
|
!data["battery"].containsKey("sendVoltageAsTelemetry")) needsRewrite = true;
|
||||||
battery.sendInternalVoltage = data["battery"]["sendInternalVoltage"] | false;
|
battery.sendInternalVoltage = data["battery"]["sendInternalVoltage"] | false;
|
||||||
battery.monitorInternalVoltage = data["battery"]["monitorInternalVoltage"] | false;
|
battery.monitorInternalVoltage = data["battery"]["monitorInternalVoltage"] | false;
|
||||||
battery.internalSleepVoltage = data["battery"]["internalSleepVoltage"] | 2.9;
|
battery.internalSleepVoltage = data["battery"]["internalSleepVoltage"] | 2.9;
|
||||||
battery.sendExternalVoltage = data["battery"]["sendExternalVoltage"] | false;
|
battery.sendExternalVoltage = data["battery"]["sendExternalVoltage"] | false;
|
||||||
battery.externalVoltagePin = data["battery"]["externalVoltagePin"] | 34;
|
|
||||||
battery.monitorExternalVoltage = data["battery"]["monitorExternalVoltage"] | false;
|
battery.monitorExternalVoltage = data["battery"]["monitorExternalVoltage"] | false;
|
||||||
battery.externalSleepVoltage = data["battery"]["externalSleepVoltage"] | 10.9;
|
battery.externalSleepVoltage = data["battery"]["externalSleepVoltage"] | 10.9;
|
||||||
|
battery.useExternalI2CSensor = data["battery"]["useExternalI2CSensor"] | false;
|
||||||
battery.voltageDividerR1 = data["battery"]["voltageDividerR1"] | 100.0;
|
battery.voltageDividerR1 = data["battery"]["voltageDividerR1"] | 100.0;
|
||||||
battery.voltageDividerR2 = data["battery"]["voltageDividerR2"] | 27.0;
|
battery.voltageDividerR2 = data["battery"]["voltageDividerR2"] | 27.0;
|
||||||
|
battery.externalVoltagePin = data["battery"]["externalVoltagePin"] | 34;
|
||||||
battery.sendVoltageAsTelemetry = data["battery"]["sendVoltageAsTelemetry"] | false;
|
battery.sendVoltageAsTelemetry = data["battery"]["sendVoltageAsTelemetry"] | false;
|
||||||
|
|
||||||
if (!data["wxsensor"].containsKey("active") ||
|
if (!data["wxsensor"].containsKey("active") ||
|
||||||
@@ -331,10 +360,12 @@ bool Configuration::readFile() {
|
|||||||
|
|
||||||
if (!data["tnc"].containsKey("enableServer") ||
|
if (!data["tnc"].containsKey("enableServer") ||
|
||||||
!data["tnc"].containsKey("enableSerial") ||
|
!data["tnc"].containsKey("enableSerial") ||
|
||||||
!data["tnc"].containsKey("acceptOwn")) needsRewrite = true;
|
!data["tnc"].containsKey("acceptOwn") ||
|
||||||
|
!data["tnc"].containsKey("aprsBridgeActive")) needsRewrite = true;
|
||||||
tnc.enableServer = data["tnc"]["enableServer"] | false;
|
tnc.enableServer = data["tnc"]["enableServer"] | false;
|
||||||
tnc.enableSerial = data["tnc"]["enableSerial"] | false;
|
tnc.enableSerial = data["tnc"]["enableSerial"] | false;
|
||||||
tnc.acceptOwn = data["tnc"]["acceptOwn"] | false;
|
tnc.acceptOwn = data["tnc"]["acceptOwn"] | false;
|
||||||
|
tnc.aprsBridgeActive = data["tnc"]["aprsBridgeActive"] | false;
|
||||||
|
|
||||||
if (!data["mqtt"].containsKey("active") ||
|
if (!data["mqtt"].containsKey("active") ||
|
||||||
!data["mqtt"].containsKey("server") ||
|
!data["mqtt"].containsKey("server") ||
|
||||||
@@ -381,9 +412,6 @@ bool Configuration::readFile() {
|
|||||||
if (!data["other"].containsKey("rememberStationTime")) needsRewrite = true;
|
if (!data["other"].containsKey("rememberStationTime")) needsRewrite = true;
|
||||||
rememberStationTime = data["other"]["rememberStationTime"] | 30;
|
rememberStationTime = data["other"]["rememberStationTime"] | 30;
|
||||||
|
|
||||||
if (!data["other"].containsKey("backupDigiMode")) needsRewrite = true;
|
|
||||||
backupDigiMode = data["other"]["backupDigiMode"] | false;
|
|
||||||
|
|
||||||
if (wifiAPs.size() == 0) { // If we don't have any WiFi's from config we need to add "empty" SSID for AUTO AP
|
if (wifiAPs.size() == 0) { // If we don't have any WiFi's from config we need to add "empty" SSID for AUTO AP
|
||||||
WiFi_AP wifiap;
|
WiFi_AP wifiap;
|
||||||
wifiap.ssid = "";
|
wifiap.ssid = "";
|
||||||
@@ -421,6 +449,7 @@ void Configuration::setDefaultValues() {
|
|||||||
wifiAutoAP.timeout = 10;
|
wifiAutoAP.timeout = 10;
|
||||||
|
|
||||||
callsign = "N0CALL-10";
|
callsign = "N0CALL-10";
|
||||||
|
tacticalCallsign = "";
|
||||||
|
|
||||||
aprs_is.active = false;
|
aprs_is.active = false;
|
||||||
aprs_is.passcode = "XYZVW";
|
aprs_is.passcode = "XYZVW";
|
||||||
@@ -446,7 +475,7 @@ void Configuration::setDefaultValues() {
|
|||||||
beacon.statusPacket = "";
|
beacon.statusPacket = "";
|
||||||
|
|
||||||
beacon.gpsActive = false;
|
beacon.gpsActive = false;
|
||||||
beacon.gpsAmbiguity = false;
|
beacon.ambiguityLevel = 0;
|
||||||
|
|
||||||
personalNote = "";
|
personalNote = "";
|
||||||
|
|
||||||
@@ -454,6 +483,7 @@ void Configuration::setDefaultValues() {
|
|||||||
|
|
||||||
digi.mode = 0;
|
digi.mode = 0;
|
||||||
digi.ecoMode = 0;
|
digi.ecoMode = 0;
|
||||||
|
digi.backupDigiMode = false;
|
||||||
|
|
||||||
loramodule.rxActive = true;
|
loramodule.rxActive = true;
|
||||||
loramodule.rxFreq = 433775000;
|
loramodule.rxFreq = 433775000;
|
||||||
@@ -476,11 +506,12 @@ void Configuration::setDefaultValues() {
|
|||||||
battery.internalSleepVoltage = 2.9;
|
battery.internalSleepVoltage = 2.9;
|
||||||
|
|
||||||
battery.sendExternalVoltage = false;
|
battery.sendExternalVoltage = false;
|
||||||
battery.externalVoltagePin = 34;
|
|
||||||
battery.monitorExternalVoltage = false;
|
battery.monitorExternalVoltage = false;
|
||||||
battery.externalSleepVoltage = 10.9;
|
battery.externalSleepVoltage = 10.9;
|
||||||
|
battery.useExternalI2CSensor = false;
|
||||||
battery.voltageDividerR1 = 100.0;
|
battery.voltageDividerR1 = 100.0;
|
||||||
battery.voltageDividerR2 = 27.0;
|
battery.voltageDividerR2 = 27.0;
|
||||||
|
battery.externalVoltagePin = 34;
|
||||||
|
|
||||||
battery.sendVoltageAsTelemetry = false;
|
battery.sendVoltageAsTelemetry = false;
|
||||||
|
|
||||||
@@ -496,6 +527,7 @@ void Configuration::setDefaultValues() {
|
|||||||
tnc.enableServer = false;
|
tnc.enableServer = false;
|
||||||
tnc.enableSerial = false;
|
tnc.enableSerial = false;
|
||||||
tnc.acceptOwn = false;
|
tnc.acceptOwn = false;
|
||||||
|
tnc.aprsBridgeActive = false;
|
||||||
|
|
||||||
mqtt.active = false;
|
mqtt.active = false;
|
||||||
mqtt.server = "";
|
mqtt.server = "";
|
||||||
@@ -523,9 +555,7 @@ void Configuration::setDefaultValues() {
|
|||||||
|
|
||||||
rememberStationTime = 30;
|
rememberStationTime = 30;
|
||||||
|
|
||||||
backupDigiMode = false;
|
Serial.println("New Data Created... All is Written!");
|
||||||
|
|
||||||
Serial.println("All is Written!");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Configuration::Configuration() {
|
Configuration::Configuration() {
|
||||||
|
|||||||
+10
-10
@@ -38,7 +38,7 @@ extern String fourthLine;
|
|||||||
extern String fifthLine;
|
extern String fifthLine;
|
||||||
extern String sixthLine;
|
extern String sixthLine;
|
||||||
extern String seventhLine;
|
extern String seventhLine;
|
||||||
extern bool backUpDigiMode;
|
extern bool backupDigiMode;
|
||||||
|
|
||||||
|
|
||||||
namespace DIGI_Utils {
|
namespace DIGI_Utils {
|
||||||
@@ -49,7 +49,7 @@ namespace DIGI_Utils {
|
|||||||
String tempPath = path;
|
String tempPath = path;
|
||||||
|
|
||||||
if (path.indexOf("WIDE1-1") != -1 && (Config.digi.mode == 2 || Config.digi.mode == 3)) {
|
if (path.indexOf("WIDE1-1") != -1 && (Config.digi.mode == 2 || Config.digi.mode == 3)) {
|
||||||
tempPath.replace("WIDE1-1", Config.callsign + "*");
|
tempPath.replace("WIDE1-1", (Config.tacticalCallsign == "" ? Config.callsign : Config.tacticalCallsign) + "*");
|
||||||
} else if (path.indexOf("WIDE2-") != -1 && Config.digi.mode == 3) {
|
} else if (path.indexOf("WIDE2-") != -1 && Config.digi.mode == 3) {
|
||||||
if (path.indexOf(",WIDE1*") != -1) {
|
if (path.indexOf(",WIDE1*") != -1) {
|
||||||
tempPath.remove(path.indexOf(",WIDE1*"), 7);
|
tempPath.remove(path.indexOf(",WIDE1*"), 7);
|
||||||
@@ -58,9 +58,9 @@ namespace DIGI_Utils {
|
|||||||
tempPath.remove(path.indexOf("*"), 1);
|
tempPath.remove(path.indexOf("*"), 1);
|
||||||
}
|
}
|
||||||
if (path.indexOf("WIDE2-1") != -1) {
|
if (path.indexOf("WIDE2-1") != -1) {
|
||||||
tempPath.replace("WIDE2-1", Config.callsign + "*");
|
tempPath.replace("WIDE2-1", (Config.tacticalCallsign == "" ? Config.callsign : Config.tacticalCallsign) + "*");
|
||||||
} else if (path.indexOf("WIDE2-2") != -1) {
|
} else if (path.indexOf("WIDE2-2") != -1) {
|
||||||
tempPath.replace("WIDE2-2", Config.callsign + "*,WIDE2-1");
|
tempPath.replace("WIDE2-2", (Config.tacticalCallsign == "" ? Config.callsign : Config.tacticalCallsign) + "*,WIDE2-1");
|
||||||
} else {
|
} else {
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
@@ -84,7 +84,7 @@ namespace DIGI_Utils {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
packetToRepeat += ",";
|
packetToRepeat += ",";
|
||||||
packetToRepeat += Config.callsign;
|
packetToRepeat += (Config.tacticalCallsign == "" ? Config.callsign : Config.tacticalCallsign);
|
||||||
packetToRepeat += "*";
|
packetToRepeat += "*";
|
||||||
packetToRepeat += APRS_IS_Utils::checkForStartingBytes(packet.substring(packet.indexOf(suffix)));
|
packetToRepeat += APRS_IS_Utils::checkForStartingBytes(packet.substring(packet.indexOf(suffix)));
|
||||||
return packetToRepeat;
|
return packetToRepeat;
|
||||||
@@ -101,7 +101,7 @@ namespace DIGI_Utils {
|
|||||||
}
|
}
|
||||||
if (temp.indexOf(",") > 2) { // checks for path
|
if (temp.indexOf(",") > 2) { // checks for path
|
||||||
const String& path = temp.substring(temp.indexOf(",") + 1); // after tocall
|
const String& path = temp.substring(temp.indexOf(",") + 1); // after tocall
|
||||||
if (Config.digi.mode == 2 || backUpDigiMode) {
|
if (Config.digi.mode == 2 || backupDigiMode) {
|
||||||
if (path.indexOf("WIDE1-1") != - 1) {
|
if (path.indexOf("WIDE1-1") != - 1) {
|
||||||
return buildPacket(path, packet, thirdParty, false);
|
return buildPacket(path, packet, thirdParty, false);
|
||||||
} else if (path.indexOf("WIDE1-1") == -1 && (abs(Config.loramodule.txFreq - Config.loramodule.rxFreq) >= 125000)) { // CrossFreq Digi
|
} else if (path.indexOf("WIDE1-1") == -1 && (abs(Config.loramodule.txFreq - Config.loramodule.rxFreq) >= 125000)) { // CrossFreq Digi
|
||||||
@@ -127,7 +127,7 @@ namespace DIGI_Utils {
|
|||||||
} else {
|
} else {
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
} else if (temp.indexOf(",") == -1 && (Config.digi.mode == 2 || backUpDigiMode || Config.digi.mode == 3) && (abs(Config.loramodule.txFreq - Config.loramodule.rxFreq) >= 125000)) {
|
} else if (temp.indexOf(",") == -1 && (Config.digi.mode == 2 || backupDigiMode || Config.digi.mode == 3) && (abs(Config.loramodule.txFreq - Config.loramodule.rxFreq) >= 125000)) {
|
||||||
return buildPacket("", packet, thirdParty, true);
|
return buildPacket("", packet, thirdParty, true);
|
||||||
} else {
|
} else {
|
||||||
return "";
|
return "";
|
||||||
@@ -147,8 +147,8 @@ namespace DIGI_Utils {
|
|||||||
temp = packet.substring(3);
|
temp = packet.substring(3);
|
||||||
Sender = packet.substring(3, packet.indexOf(">"));
|
Sender = packet.substring(3, packet.indexOf(">"));
|
||||||
}
|
}
|
||||||
if (Sender != Config.callsign) { // Avoid listening to own packets
|
if (Sender != (Config.tacticalCallsign == "" ? Config.callsign : Config.tacticalCallsign)) { // Avoid listening to own packets
|
||||||
if (!thirdPartyPacket && !Utils::checkValidCallsign(Sender)) {
|
if (!thirdPartyPacket && Config.tacticalCallsign == "" && !Utils::checkValidCallsign(Sender)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (STATION_Utils::check25SegBuffer(Sender, temp.substring(temp.indexOf(":") + 2))) {
|
if (STATION_Utils::check25SegBuffer(Sender, temp.substring(temp.indexOf(":") + 2))) {
|
||||||
@@ -159,7 +159,7 @@ namespace DIGI_Utils {
|
|||||||
String AddresseeAndMessage = temp.substring(temp.indexOf("::") + 2);
|
String AddresseeAndMessage = temp.substring(temp.indexOf("::") + 2);
|
||||||
String Addressee = AddresseeAndMessage.substring(0, AddresseeAndMessage.indexOf(":"));
|
String Addressee = AddresseeAndMessage.substring(0, AddresseeAndMessage.indexOf(":"));
|
||||||
Addressee.trim();
|
Addressee.trim();
|
||||||
if (Addressee == Config.callsign) { // it's a message for me!
|
if (Addressee == (Config.tacticalCallsign == "" ? Config.callsign : Config.tacticalCallsign)) { // it's a message for me!
|
||||||
queryMessage = APRS_IS_Utils::processReceivedLoRaMessage(Sender, AddresseeAndMessage, thirdPartyPacket);
|
queryMessage = APRS_IS_Utils::processReceivedLoRaMessage(Sender, AddresseeAndMessage, thirdPartyPacket);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+19
-8
@@ -47,9 +47,13 @@
|
|||||||
#ifdef HELTEC_WP_V1
|
#ifdef HELTEC_WP_V1
|
||||||
EInkDisplay_WirelessPaperV1_1 display;
|
EInkDisplay_WirelessPaperV1_1 display;
|
||||||
#endif
|
#endif
|
||||||
/*#ifdef HELTEC_WP_V1_2 // SOON!
|
#ifdef HELTEC_WP_V1_2
|
||||||
EInkDisplay_WirelessPaperV1_2 display;
|
EInkDisplay_WirelessPaperV1_2 display;
|
||||||
#endif*/
|
#endif
|
||||||
|
#ifdef HELTEC_VM_E290
|
||||||
|
EInkDisplay_VisionMasterE290 display;
|
||||||
|
#endif
|
||||||
|
|
||||||
String lastEpaperText;
|
String lastEpaperText;
|
||||||
#else
|
#else
|
||||||
#include <Adafruit_GFX.h>
|
#include <Adafruit_GFX.h>
|
||||||
@@ -88,14 +92,22 @@ void displaySetup() {
|
|||||||
tft.setTextFont(0);
|
tft.setTextFont(0);
|
||||||
tft.fillScreen(TFT_BLACK);
|
tft.fillScreen(TFT_BLACK);
|
||||||
#if defined(TTGO_T_DECK_GPS) || defined(TTGO_T_DECK_PLUS)
|
#if defined(TTGO_T_DECK_GPS) || defined(TTGO_T_DECK_PLUS)
|
||||||
sprite.createSprite(320,240);
|
sprite.createSprite(320, 240);
|
||||||
#else
|
#else
|
||||||
sprite.createSprite(160,80);
|
sprite.createSprite(160, 80);
|
||||||
#endif
|
#endif
|
||||||
#else
|
#else
|
||||||
#ifdef HAS_EPAPER
|
#ifdef HAS_EPAPER
|
||||||
display.landscape();
|
display.landscape();
|
||||||
display.printCenter("LoRa APRS iGate Initialising...");
|
display.printCenter("LoRa APRS iGate Initialising...");
|
||||||
|
if (Config.display.turn180) {
|
||||||
|
#if defined(HELTEC_VM_E290) || defined(HELTEC_WP_V1)
|
||||||
|
display.setRotation(3);
|
||||||
|
#endif
|
||||||
|
#if defined(HELTEC_WP_V1_2)
|
||||||
|
display.setRotation(1);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
display.update();
|
display.update();
|
||||||
#else
|
#else
|
||||||
#ifdef OLED_DISPLAY_HAS_RST_PIN
|
#ifdef OLED_DISPLAY_HAS_RST_PIN
|
||||||
@@ -106,7 +118,7 @@ void displaySetup() {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(TTGO_T_Beam_S3_SUPREME_V3)
|
#if defined(TTGO_T_Beam_S3_SUPREME_V3)
|
||||||
if (!display.begin(0x3c, false)) {
|
if (display.begin(0x3c, false)) {
|
||||||
displayFound = true;
|
displayFound = true;
|
||||||
if (Config.display.turn180) display.setRotation(2);
|
if (Config.display.turn180) display.setRotation(2);
|
||||||
display.clearDisplay();
|
display.clearDisplay();
|
||||||
@@ -157,7 +169,6 @@ void displayToggle(bool toggle) {
|
|||||||
digitalWrite(TFT_BL, LOW);
|
digitalWrite(TFT_BL, LOW);
|
||||||
#else
|
#else
|
||||||
#ifdef HAS_EPAPER
|
#ifdef HAS_EPAPER
|
||||||
display.printCenter("Enabled EPAPER Display...");
|
|
||||||
display.update();
|
display.update();
|
||||||
#else
|
#else
|
||||||
#if defined(TTGO_T_Beam_S3_SUPREME_V3)
|
#if defined(TTGO_T_Beam_S3_SUPREME_V3)
|
||||||
@@ -195,7 +206,7 @@ void displayShow(const String& header, const String& line1, const String& line2,
|
|||||||
sprite.drawString(*lines[i], 3, (lineSpacing * (2 + i)) - 2);
|
sprite.drawString(*lines[i], 3, (lineSpacing * (2 + i)) - 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
sprite.pushSprite(0,0);
|
sprite.pushSprite(0, 0);
|
||||||
#else
|
#else
|
||||||
#ifdef HAS_EPAPER
|
#ifdef HAS_EPAPER
|
||||||
display.clearMemory();
|
display.clearMemory();
|
||||||
@@ -260,7 +271,7 @@ void displayShow(const String& header, const String& line1, const String& line2,
|
|||||||
sprite.drawString(*lines[i], 3, (lineSpacing * (2 + i)) - 2);
|
sprite.drawString(*lines[i], 3, (lineSpacing * (2 + i)) - 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
sprite.pushSprite(0,0);
|
sprite.pushSprite(0, 0);
|
||||||
#else
|
#else
|
||||||
#ifdef HAS_EPAPER
|
#ifdef HAS_EPAPER
|
||||||
lastEpaperText = header + line1 + line2 + line3 + line4 + line5 + line6;
|
lastEpaperText = header + line1 + line2 + line3 + line4 + line5 + line6;
|
||||||
|
|||||||
+84
-141
@@ -16,6 +16,7 @@
|
|||||||
* along with LoRa APRS iGate. If not, see <https://www.gnu.org/licenses/>.
|
* along with LoRa APRS iGate. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <APRSPacketLib.h>
|
||||||
#include <TinyGPS++.h>
|
#include <TinyGPS++.h>
|
||||||
#include <WiFi.h>
|
#include <WiFi.h>
|
||||||
#include "configuration.h"
|
#include "configuration.h"
|
||||||
@@ -33,6 +34,7 @@
|
|||||||
extern Configuration Config;
|
extern Configuration Config;
|
||||||
extern HardwareSerial gpsSerial;
|
extern HardwareSerial gpsSerial;
|
||||||
extern TinyGPSPlus gps;
|
extern TinyGPSPlus gps;
|
||||||
|
extern bool callsignIsValid;
|
||||||
String distance, iGateBeaconPacket, iGateLoRaBeaconPacket;
|
String distance, iGateBeaconPacket, iGateLoRaBeaconPacket;
|
||||||
|
|
||||||
|
|
||||||
@@ -42,83 +44,38 @@ namespace GPS_Utils {
|
|||||||
return iGateLoRaBeaconPacket;
|
return iGateLoRaBeaconPacket;
|
||||||
}
|
}
|
||||||
|
|
||||||
char *ax25_base91enc(char *s, uint8_t n, uint32_t v) {
|
|
||||||
for(s += n, *s = '\0'; n; n--) {
|
|
||||||
*(--s) = v % 91 + 33;
|
|
||||||
v /= 91;
|
|
||||||
}
|
|
||||||
return(s);
|
|
||||||
}
|
|
||||||
|
|
||||||
float roundToTwoDecimals(float degrees) {
|
|
||||||
return round(degrees * 100) / 100;
|
|
||||||
}
|
|
||||||
|
|
||||||
String encodeGPS(float latitude, float longitude, const String& overlay, const String& symbol) {
|
|
||||||
String encodedData = overlay;
|
|
||||||
uint32_t aprs_lat, aprs_lon;
|
|
||||||
|
|
||||||
float processedLatitude = latitude;
|
|
||||||
float processedLongitude = longitude;
|
|
||||||
if (Config.beacon.gpsActive && Config.beacon.gpsAmbiguity) {
|
|
||||||
processedLatitude = roundToTwoDecimals(latitude);
|
|
||||||
processedLongitude = roundToTwoDecimals(longitude);
|
|
||||||
}
|
|
||||||
|
|
||||||
aprs_lat = 900000000 - processedLatitude * 10000000;
|
|
||||||
aprs_lat = aprs_lat / 26 - aprs_lat / 2710 + aprs_lat / 15384615;
|
|
||||||
aprs_lon = 900000000 + processedLongitude * 10000000 / 2;
|
|
||||||
aprs_lon = aprs_lon / 26 - aprs_lon / 2710 + aprs_lon / 15384615;
|
|
||||||
|
|
||||||
String Ns, Ew, helper;
|
|
||||||
if(processedLatitude < 0) { Ns = "S"; } else { Ns = "N"; }
|
|
||||||
if(processedLatitude < 0) { processedLatitude = -processedLatitude; }
|
|
||||||
|
|
||||||
if(processedLongitude < 0) { Ew = "W"; } else { Ew = "E"; }
|
|
||||||
if(processedLongitude < 0) { processedLongitude = -processedLongitude; }
|
|
||||||
|
|
||||||
char helper_base91[] = {"0000\0"};
|
|
||||||
int i;
|
|
||||||
ax25_base91enc(helper_base91, 4, aprs_lat);
|
|
||||||
for (i = 0; i < 4; i++) {
|
|
||||||
encodedData += helper_base91[i];
|
|
||||||
}
|
|
||||||
ax25_base91enc(helper_base91, 4, aprs_lon);
|
|
||||||
for (i = 0; i < 4; i++) {
|
|
||||||
encodedData += helper_base91[i];
|
|
||||||
}
|
|
||||||
encodedData += symbol;
|
|
||||||
encodedData += " ";
|
|
||||||
encodedData += "\x47";
|
|
||||||
return encodedData;
|
|
||||||
}
|
|
||||||
|
|
||||||
void generateBeaconFirstPart() {
|
|
||||||
String beaconPacket = Config.callsign;
|
|
||||||
beaconPacket += ">APLRG1";
|
|
||||||
if (Config.beacon.path.indexOf("WIDE") == 0) {
|
|
||||||
beaconPacket += ",";
|
|
||||||
beaconPacket += Config.beacon.path;
|
|
||||||
}
|
|
||||||
iGateBeaconPacket = beaconPacket;
|
|
||||||
iGateBeaconPacket += ",qAC:!";
|
|
||||||
iGateLoRaBeaconPacket = beaconPacket;
|
|
||||||
iGateLoRaBeaconPacket += ":!";
|
|
||||||
}
|
|
||||||
|
|
||||||
void generateBeacons() {
|
void generateBeacons() {
|
||||||
if (Config.callsign.indexOf("NOCALL-10") != 0 && !Utils::checkValidCallsign(Config.callsign)) {
|
String beaconPacket = APRSPacketLib::generateBasePacket(Config.callsign, "APLRG1", Config.beacon.path);
|
||||||
displayShow("***** ERROR ******", "CALLSIGN = NOT VALID!", "", "Only Rx Mode Active", 3000);
|
String encodedGPS = APRSPacketLib::encodeGPSIntoBase91(Config.beacon.latitude, Config.beacon.longitude, 0, 0, Config.beacon.symbol, false, 0, true, Config.beacon.ambiguityLevel);
|
||||||
Config.loramodule.txActive = false;
|
|
||||||
Config.aprs_is.messagesToRF = false;
|
if (Config.callsign.indexOf("NOCALL-10") != 0) {
|
||||||
Config.aprs_is.objectsToRF = false;
|
if (!callsignIsValid) {
|
||||||
|
displayShow("***** ERROR ******", "CALLSIGN = NOT VALID!", "", "Only Rx Mode Active", 3000);
|
||||||
|
Config.loramodule.txActive = false;
|
||||||
|
Config.aprs_is.messagesToRF = false;
|
||||||
|
Config.aprs_is.objectsToRF = false;
|
||||||
|
Config.beacon.sendViaRF = false;
|
||||||
|
Config.digi.mode = 0;
|
||||||
|
Config.digi.backupDigiMode = false;
|
||||||
|
} else if (callsignIsValid && Config.tacticalCallsign != "") {
|
||||||
|
beaconPacket = APRSPacketLib::generateBasePacket(Config.tacticalCallsign, "APLRG1", Config.beacon.path);
|
||||||
|
Config.aprs_is.active = false;
|
||||||
|
Config.beacon.sendViaAPRSIS = false;
|
||||||
|
Config.digi.backupDigiMode = false;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
Config.beacon.sendViaAPRSIS = false;
|
||||||
Config.beacon.sendViaRF = false;
|
Config.beacon.sendViaRF = false;
|
||||||
Config.digi.mode = 0;
|
|
||||||
Config.backupDigiMode = false;
|
|
||||||
}
|
}
|
||||||
generateBeaconFirstPart();
|
|
||||||
String encodedGPS = encodeGPS(Config.beacon.latitude, Config.beacon.longitude, Config.beacon.overlay, Config.beacon.symbol);
|
iGateBeaconPacket = beaconPacket;
|
||||||
|
iGateBeaconPacket += ",qAC:=";
|
||||||
|
iGateBeaconPacket += Config.beacon.overlay;
|
||||||
iGateBeaconPacket += encodedGPS;
|
iGateBeaconPacket += encodedGPS;
|
||||||
|
|
||||||
|
iGateLoRaBeaconPacket = beaconPacket;
|
||||||
|
iGateLoRaBeaconPacket += ":=";
|
||||||
|
iGateLoRaBeaconPacket += Config.beacon.overlay;
|
||||||
iGateLoRaBeaconPacket += encodedGPS;
|
iGateLoRaBeaconPacket += encodedGPS;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -126,47 +83,40 @@ namespace GPS_Utils {
|
|||||||
return TinyGPSPlus::distanceBetween(Config.beacon.latitude,Config.beacon.longitude, latitude, longitude) / 1000.0;
|
return TinyGPSPlus::distanceBetween(Config.beacon.latitude,Config.beacon.longitude, latitude, longitude) / 1000.0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
String buildDistanceAndComment(float latitude, float longitude, const String& comment) {
|
||||||
|
distance = String(calculateDistanceTo(latitude, longitude),1);
|
||||||
|
|
||||||
|
String distanceAndComment = String(latitude,5);
|
||||||
|
distanceAndComment += "N / ";
|
||||||
|
distanceAndComment += String(longitude,5);
|
||||||
|
distanceAndComment += "E / ";
|
||||||
|
distanceAndComment += distance;
|
||||||
|
distanceAndComment += "km";
|
||||||
|
|
||||||
|
if (comment != "") {
|
||||||
|
distanceAndComment += " / ";
|
||||||
|
distanceAndComment += comment;
|
||||||
|
}
|
||||||
|
return distanceAndComment;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
String decodeEncodedGPS(const String& packet) {
|
String decodeEncodedGPS(const String& packet) {
|
||||||
int indexOfExclamation = packet.indexOf(":!");
|
int indexOfExclamation = packet.indexOf(":!");
|
||||||
int indexOfEqual = packet.indexOf(":=");
|
int indexOfEqual = packet.indexOf(":=");
|
||||||
|
|
||||||
const uint8_t OFFSET = 3; // Offset for encoded data in the packet
|
const uint8_t OFFSET = 3; // Offset for encoded data in the packet
|
||||||
String GPSPacket;
|
String infoGPS;
|
||||||
if (indexOfExclamation > 10) {
|
if (indexOfExclamation > 10) {
|
||||||
GPSPacket = packet.substring(indexOfExclamation + OFFSET);
|
infoGPS = packet.substring(indexOfExclamation + OFFSET);
|
||||||
} else if (indexOfEqual > 10) {
|
} else if (indexOfEqual > 10) {
|
||||||
GPSPacket = packet.substring(indexOfEqual + OFFSET);
|
infoGPS = packet.substring(indexOfEqual + OFFSET);
|
||||||
}
|
}
|
||||||
|
|
||||||
String encodedLatitude = GPSPacket.substring(0,4);
|
float decodedLatitude = APRSPacketLib::decodeBase91EncodedLatitude(infoGPS.substring(0,4));
|
||||||
int Y1 = encodedLatitude[0] - 33;
|
float decodedLongitude = APRSPacketLib::decodeBase91EncodedLongitude(infoGPS.substring(4,8));
|
||||||
int Y2 = encodedLatitude[1] - 33;
|
|
||||||
int Y3 = encodedLatitude[2] - 33;
|
|
||||||
int Y4 = encodedLatitude[3] - 33;
|
|
||||||
float decodedLatitude = 90.0 - (((Y1 * pow(91,3)) + (Y2 * pow(91,2)) + (Y3 * 91) + Y4) / 380926.0);
|
|
||||||
|
|
||||||
String encodedLongitude = GPSPacket.substring(4,8);
|
return buildDistanceAndComment(decodedLatitude, decodedLongitude, infoGPS.substring(12));
|
||||||
int X1 = encodedLongitude[0] - 33;
|
|
||||||
int X2 = encodedLongitude[1] - 33;
|
|
||||||
int X3 = encodedLongitude[2] - 33;
|
|
||||||
int X4 = encodedLongitude[3] - 33;
|
|
||||||
float decodedLongitude = -180.0 + (((X1 * pow(91,3)) + (X2 * pow(91,2)) + (X3 * 91) + X4) / 190463.0);
|
|
||||||
|
|
||||||
distance = String(calculateDistanceTo(decodedLatitude, decodedLongitude),1);
|
|
||||||
|
|
||||||
String decodedGPS = String(decodedLatitude,5);
|
|
||||||
decodedGPS += "N / ";
|
|
||||||
decodedGPS += String(decodedLongitude,5);
|
|
||||||
decodedGPS += "E / ";
|
|
||||||
decodedGPS += distance;
|
|
||||||
decodedGPS += "km";
|
|
||||||
|
|
||||||
String comment = GPSPacket.substring(12);
|
|
||||||
if (comment != "") {
|
|
||||||
decodedGPS += " / ";
|
|
||||||
decodedGPS += comment;
|
|
||||||
}
|
|
||||||
return decodedGPS;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
String getReceivedGPS(const String& packet) {
|
String getReceivedGPS(const String& packet) {
|
||||||
@@ -194,50 +144,43 @@ namespace GPS_Utils {
|
|||||||
convertedLongitude += Longitude.substring(3,5).toFloat() / 60; // Next 2 digits (Minutes)
|
convertedLongitude += Longitude.substring(3,5).toFloat() / 60; // Next 2 digits (Minutes)
|
||||||
convertedLongitude += Longitude.substring(Longitude.indexOf(".") + 1, Longitude.indexOf(".") + 3).toFloat() / (60*100);
|
convertedLongitude += Longitude.substring(Longitude.indexOf(".") + 1, Longitude.indexOf(".") + 3).toFloat() / (60*100);
|
||||||
if (Longitude.endsWith("W")) convertedLongitude = -convertedLongitude; // Handle Western Hemisphere
|
if (Longitude.endsWith("W")) convertedLongitude = -convertedLongitude; // Handle Western Hemisphere
|
||||||
|
|
||||||
distance = String(calculateDistanceTo(convertedLatitude, convertedLongitude),1);
|
|
||||||
|
|
||||||
String decodedGPS = String(convertedLatitude,5);
|
return buildDistanceAndComment(convertedLatitude, convertedLongitude, infoGPS.substring(19));
|
||||||
decodedGPS += "N / ";
|
|
||||||
decodedGPS += String(convertedLongitude,5);
|
|
||||||
decodedGPS += "E / ";
|
|
||||||
decodedGPS += distance;
|
|
||||||
decodedGPS += "km";
|
|
||||||
|
|
||||||
String comment = infoGPS.substring(19);
|
|
||||||
if (comment != "") {
|
|
||||||
decodedGPS += " / ";
|
|
||||||
decodedGPS += comment;
|
|
||||||
}
|
|
||||||
return decodedGPS;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
String getDistanceAndComment(const String& packet) {
|
String getDistanceAndComment(const String& packet) {
|
||||||
int indexOfAt = packet.indexOf(":@");
|
int indexOfAt = packet.indexOf(":@");
|
||||||
if (indexOfAt > 10) {
|
if (indexOfAt > 10) return getReceivedGPS(packet);
|
||||||
return getReceivedGPS(packet);
|
|
||||||
} else {
|
|
||||||
const uint8_t ENCODED_BYTE_OFFSET = 14; // Offset for encoded data in the packet
|
|
||||||
int indexOfExclamation = packet.indexOf(":!");
|
|
||||||
int indexOfEqual = packet.indexOf(":=");
|
|
||||||
uint8_t encodedBytePosition = 0;
|
|
||||||
if (indexOfExclamation > 10) { // Determine the position where encoded data starts
|
|
||||||
encodedBytePosition = indexOfExclamation + ENCODED_BYTE_OFFSET;
|
|
||||||
} else if (indexOfEqual > 10) {
|
|
||||||
encodedBytePosition = indexOfEqual + ENCODED_BYTE_OFFSET;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (encodedBytePosition != 0) {
|
const uint8_t nonEncondedLatitudeOffset = 9; // "N" / "S"
|
||||||
char currentChar = packet[encodedBytePosition];
|
const uint8_t nonEncondedLongitudeOffset = 19; // "E" / "W"
|
||||||
if (currentChar == 'G' || currentChar == 'Q' || currentChar == '[' || currentChar == 'H' || currentChar == 'X') {
|
const uint8_t encodedByteOffset = 14;
|
||||||
return decodeEncodedGPS(packet); // If valid encoded data position is found, decode it
|
|
||||||
} else {
|
int indexOfExclamation = packet.indexOf(":!");
|
||||||
return getReceivedGPS(packet);
|
int indexOfEqual = packet.indexOf(":=");
|
||||||
}
|
int baseIndex = - 1;
|
||||||
} else {
|
if (indexOfExclamation > 10) {
|
||||||
return " _ / _ / _ ";
|
baseIndex = indexOfExclamation;
|
||||||
}
|
} else if (indexOfEqual > 10) {
|
||||||
|
baseIndex = indexOfEqual;
|
||||||
}
|
}
|
||||||
|
if (baseIndex == -1) return " _ / _ / _ ";
|
||||||
|
|
||||||
|
int latitudeIndex = baseIndex + nonEncondedLatitudeOffset;
|
||||||
|
int longitudeIndex = baseIndex + nonEncondedLongitudeOffset;
|
||||||
|
int encodedByteIndex = baseIndex + encodedByteOffset;
|
||||||
|
int packetLength = packet.length();
|
||||||
|
|
||||||
|
if (latitudeIndex < packetLength && longitudeIndex < packetLength) {
|
||||||
|
char latChar = packet[latitudeIndex];
|
||||||
|
char lngChar = packet[longitudeIndex];
|
||||||
|
if ((latChar == 'N' || latChar == 'S') && (lngChar == 'E' || lngChar == 'W')) return getReceivedGPS(packet);
|
||||||
|
}
|
||||||
|
if (encodedByteIndex < packetLength) {
|
||||||
|
char byteChar = packet[encodedByteIndex];
|
||||||
|
if (byteChar == 'G' || byteChar == 'Q' || byteChar == '[' || byteChar == 'H' || byteChar == 'X' || byteChar == '3') return decodeEncodedGPS(packet);
|
||||||
|
}
|
||||||
|
return " _ / _ / _ ";
|
||||||
}
|
}
|
||||||
|
|
||||||
void setup() {
|
void setup() {
|
||||||
|
|||||||
+29
-9
@@ -81,9 +81,7 @@ namespace LoRa_Utils {
|
|||||||
radio.XTAL = true;
|
radio.XTAL = true;
|
||||||
#endif
|
#endif
|
||||||
int state = radio.begin(freq);
|
int state = radio.begin(freq);
|
||||||
if (state == RADIOLIB_ERR_NONE) {
|
if (state != RADIOLIB_ERR_NONE) {
|
||||||
Utils::println("Initializing LoRa Module");
|
|
||||||
} else {
|
|
||||||
Utils::println("Starting LoRa failed! State: " + String(state));
|
Utils::println("Starting LoRa failed! State: " + String(state));
|
||||||
while (true);
|
while (true);
|
||||||
}
|
}
|
||||||
@@ -93,9 +91,19 @@ namespace LoRa_Utils {
|
|||||||
#if defined(HAS_SX1278) || defined(HAS_SX1276)
|
#if defined(HAS_SX1278) || defined(HAS_SX1276)
|
||||||
radio.setDio0Action(setFlag, RISING);
|
radio.setDio0Action(setFlag, RISING);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/*#ifdef SX126X_DIO3_TCXO_VOLTAGE
|
||||||
|
if (radio.setTCXO(float(SX126X_DIO3_TCXO_VOLTAGE)) == RADIOLIB_ERR_NONE) {
|
||||||
|
Utils::println("Set LoRa Module TCXO Voltage to:" + String(SX126X_DIO3_TCXO_VOLTAGE));
|
||||||
|
} else {
|
||||||
|
Utils::println("Set LoRa Module TCXO Voltage failed! State: " + String(state));
|
||||||
|
while (true);
|
||||||
|
}
|
||||||
|
#endif*/
|
||||||
|
|
||||||
radio.setSpreadingFactor(Config.loramodule.rxSpreadingFactor);
|
radio.setSpreadingFactor(Config.loramodule.rxSpreadingFactor);
|
||||||
radio.setCodingRate(Config.loramodule.rxCodingRate4);
|
radio.setCodingRate(Config.loramodule.rxCodingRate4);
|
||||||
float signalBandwidth = Config.loramodule.rxSignalBandwidth/1000;
|
float signalBandwidth = Config.loramodule.rxSignalBandwidth / 1000;
|
||||||
radio.setBandwidth(signalBandwidth);
|
radio.setBandwidth(signalBandwidth);
|
||||||
radio.setCRC(true);
|
radio.setCRC(true);
|
||||||
|
|
||||||
@@ -103,6 +111,11 @@ namespace LoRa_Utils {
|
|||||||
radio.setRfSwitchPins(RADIO_RXEN, RADIO_TXEN);
|
radio.setRfSwitchPins(RADIO_RXEN, RADIO_TXEN);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/*#ifdef SX126X_DIO2_AS_RF_SWITCH
|
||||||
|
radio.setRfSwitchPins(RADIO_RXEN, RADIOLIB_NC);
|
||||||
|
radio.setDio2AsRfSwitch(true);
|
||||||
|
#endif*/
|
||||||
|
|
||||||
#ifdef HAS_1W_LORA // Ebyte E22 400M30S (SX1268) / 900M30S (SX1262) / Ebyte E220 400M30S (LLCC68)
|
#ifdef HAS_1W_LORA // Ebyte E22 400M30S (SX1268) / 900M30S (SX1262) / Ebyte E220 400M30S (LLCC68)
|
||||||
state = radio.setOutputPower(Config.loramodule.power); // max value 20dB for 1W modules as they have Low Noise Amp
|
state = radio.setOutputPower(Config.loramodule.power); // max value 20dB for 1W modules as they have Low Noise Amp
|
||||||
radio.setCurrentLimit(140); // to be validated (100 , 120, 140)?
|
radio.setCurrentLimit(140); // to be validated (100 , 120, 140)?
|
||||||
@@ -120,6 +133,13 @@ namespace LoRa_Utils {
|
|||||||
radio.setRxBoostedGainMode(true);
|
radio.setRxBoostedGainMode(true);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(HAS_TCXO) && !defined(HAS_1W_LORA)
|
||||||
|
radio.setDio2AsRfSwitch();
|
||||||
|
#endif
|
||||||
|
#ifdef HAS_TCXO
|
||||||
|
radio.setTCXO(1.8);
|
||||||
|
#endif
|
||||||
|
|
||||||
if (state == RADIOLIB_ERR_NONE) {
|
if (state == RADIOLIB_ERR_NONE) {
|
||||||
Utils::println("init : LoRa Module ... done!");
|
Utils::println("init : LoRa Module ... done!");
|
||||||
} else {
|
} else {
|
||||||
@@ -129,21 +149,21 @@ namespace LoRa_Utils {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void changeFreqTx() {
|
void changeFreqTx() {
|
||||||
delay(300);
|
|
||||||
float freq = (float)Config.loramodule.txFreq / 1000000;
|
float freq = (float)Config.loramodule.txFreq / 1000000;
|
||||||
radio.setFrequency(freq);
|
radio.setFrequency(freq);
|
||||||
radio.setSpreadingFactor(Config.loramodule.txSpreadingFactor);
|
radio.setSpreadingFactor(Config.loramodule.txSpreadingFactor);
|
||||||
radio.setCodingRate(Config.loramodule.txCodingRate4);
|
radio.setCodingRate(Config.loramodule.txCodingRate4);
|
||||||
radio.setBandwidth(Config.loramodule.txSignalBandwidth);
|
float signalBandwidth = Config.loramodule.txSignalBandwidth / 1000;
|
||||||
|
radio.setBandwidth(signalBandwidth);
|
||||||
}
|
}
|
||||||
|
|
||||||
void changeFreqRx() {
|
void changeFreqRx() {
|
||||||
delay(300);
|
|
||||||
float freq = (float)Config.loramodule.rxFreq / 1000000;
|
float freq = (float)Config.loramodule.rxFreq / 1000000;
|
||||||
radio.setFrequency(freq);
|
radio.setFrequency(freq);
|
||||||
radio.setSpreadingFactor(Config.loramodule.rxSpreadingFactor);
|
radio.setSpreadingFactor(Config.loramodule.rxSpreadingFactor);
|
||||||
radio.setCodingRate(Config.loramodule.rxCodingRate4);
|
radio.setCodingRate(Config.loramodule.rxCodingRate4);
|
||||||
radio.setBandwidth(Config.loramodule.rxSignalBandwidth);
|
float signalBandwidth = Config.loramodule.rxSignalBandwidth / 1000;
|
||||||
|
radio.setBandwidth(signalBandwidth);
|
||||||
}
|
}
|
||||||
|
|
||||||
void sendNewPacket(const String& newPacket) {
|
void sendNewPacket(const String& newPacket) {
|
||||||
@@ -204,7 +224,7 @@ namespace LoRa_Utils {
|
|||||||
if (packet != "") {
|
if (packet != "") {
|
||||||
|
|
||||||
String sender = packet.substring(3, packet.indexOf(">"));
|
String sender = packet.substring(3, packet.indexOf(">"));
|
||||||
if (packet.substring(0,3) == "\x3c\xff\x01" && !STATION_Utils::isBlacklisted(sender)){ // avoid processing BlackListed stations
|
if (packet.substring(0,3) == "\x3c\xff\x01" && !STATION_Utils::isBlacklisted(sender)) { // avoid processing BlackListed stations
|
||||||
rssi = radio.getRSSI();
|
rssi = radio.getRSSI();
|
||||||
snr = radio.getSNR();
|
snr = radio.getSNR();
|
||||||
freqError = radio.getFrequencyError();
|
freqError = radio.getFrequencyError();
|
||||||
|
|||||||
+1
-1
@@ -45,7 +45,7 @@ namespace NTP_Utils {
|
|||||||
}
|
}
|
||||||
|
|
||||||
String getFormatedTime() {
|
String getFormatedTime() {
|
||||||
if (Config.digi.ecoMode == 0) return timeClient->getFormattedTime();
|
if (WiFi.status() == WL_CONNECTED && Config.digi.ecoMode == 0) return timeClient->getFormattedTime();
|
||||||
return "DigiEcoMode Active";
|
return "DigiEcoMode Active";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+15
-16
@@ -20,6 +20,7 @@
|
|||||||
#include "battery_utils.h"
|
#include "battery_utils.h"
|
||||||
#include "board_pinout.h"
|
#include "board_pinout.h"
|
||||||
#include "power_utils.h"
|
#include "power_utils.h"
|
||||||
|
#include "utils.h"
|
||||||
|
|
||||||
#if defined(HAS_AXP192) || defined(HAS_AXP2101)
|
#if defined(HAS_AXP192) || defined(HAS_AXP2101)
|
||||||
#ifdef TTGO_T_Beam_S3_SUPREME_V3
|
#ifdef TTGO_T_Beam_S3_SUPREME_V3
|
||||||
@@ -43,26 +44,25 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
extern Configuration Config;
|
extern Configuration Config;
|
||||||
|
extern bool callsignIsValid;
|
||||||
|
|
||||||
|
|
||||||
namespace POWER_Utils {
|
namespace POWER_Utils {
|
||||||
|
|
||||||
#ifdef VEXT_CTRL
|
#ifdef VEXT_CTRL
|
||||||
void vext_ctrl_ON() {
|
void vext_ctrl_ON() {
|
||||||
#if defined(HELTEC_WIRELESS_TRACKER) || defined(HELTEC_V3)
|
#if VEXT_CTRL_INVERTED == 1
|
||||||
digitalWrite(VEXT_CTRL, Config.digi.ecoMode == 1 ? LOW : HIGH);
|
|
||||||
#endif
|
|
||||||
#if defined(HELTEC_WP_V1) || defined(HELTEC_WS) || defined(HELTEC_V3_2) || defined(HELTEC_WSL_V3)
|
|
||||||
digitalWrite(VEXT_CTRL, Config.digi.ecoMode == 1 ? HIGH : LOW);
|
digitalWrite(VEXT_CTRL, Config.digi.ecoMode == 1 ? HIGH : LOW);
|
||||||
|
#else
|
||||||
|
digitalWrite(VEXT_CTRL, Config.digi.ecoMode == 1 ? LOW : HIGH);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void vext_ctrl_OFF() {
|
void vext_ctrl_OFF() {
|
||||||
#if defined(HELTEC_WIRELESS_TRACKER) || defined(HELTEC_V3)
|
#if VEXT_CTRL_INVERTED == 1
|
||||||
digitalWrite(VEXT_CTRL, Config.digi.ecoMode == 1 ? HIGH : LOW);
|
|
||||||
#endif
|
|
||||||
#if defined(HELTEC_WP_V1) || defined(HELTEC_WS) || defined(HELTEC_V3_2) || defined(HELTEC_WSL_V3)
|
|
||||||
digitalWrite(VEXT_CTRL, Config.digi.ecoMode == 1 ? LOW : HIGH);
|
digitalWrite(VEXT_CTRL, Config.digi.ecoMode == 1 ? LOW : HIGH);
|
||||||
|
#else
|
||||||
|
digitalWrite(VEXT_CTRL, Config.digi.ecoMode == 1 ? HIGH : LOW);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@@ -70,20 +70,18 @@ namespace POWER_Utils {
|
|||||||
|
|
||||||
#ifdef ADC_CTRL
|
#ifdef ADC_CTRL
|
||||||
void adc_ctrl_ON() {
|
void adc_ctrl_ON() {
|
||||||
#if defined(HELTEC_WIRELESS_TRACKER) || defined(HELTEC_V3_2)
|
#if ADC_CTRL_INVERTED == 1
|
||||||
digitalWrite(ADC_CTRL, HIGH);
|
|
||||||
#endif
|
|
||||||
#if defined(HELTEC_V3) || defined(HELTEC_V2) || defined(HELTEC_WSL_V3) || defined(HELTEC_WP_V1)
|
|
||||||
digitalWrite(ADC_CTRL, LOW);
|
digitalWrite(ADC_CTRL, LOW);
|
||||||
|
#else
|
||||||
|
digitalWrite(ADC_CTRL, HIGH);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void adc_ctrl_OFF() {
|
void adc_ctrl_OFF() {
|
||||||
#if defined(HELTEC_WIRELESS_TRACKER) || defined(HELTEC_V3_2)
|
#if ADC_CTRL_INVERTED == 1
|
||||||
digitalWrite(ADC_CTRL, LOW);
|
|
||||||
#endif
|
|
||||||
#if defined(HELTEC_V3) || defined(HELTEC_V2) || defined(HELTEC_WSL_V3) || defined(HELTEC_WP_V1)
|
|
||||||
digitalWrite(ADC_CTRL, HIGH);
|
digitalWrite(ADC_CTRL, HIGH);
|
||||||
|
#else
|
||||||
|
digitalWrite(ADC_CTRL, LOW);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@@ -326,6 +324,7 @@ namespace POWER_Utils {
|
|||||||
delay(1000);
|
delay(1000);
|
||||||
BATTERY_Utils::setup();
|
BATTERY_Utils::setup();
|
||||||
BATTERY_Utils::startupBatteryHealth();
|
BATTERY_Utils::startupBatteryHealth();
|
||||||
|
callsignIsValid = Utils::checkValidCallsign(Config.callsign);
|
||||||
setCpuFrequencyMhz(80);
|
setCpuFrequencyMhz(80);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -41,7 +41,7 @@ namespace QUERY_Utils {
|
|||||||
String queryQuestion = query;
|
String queryQuestion = query;
|
||||||
queryQuestion.toUpperCase();
|
queryQuestion.toUpperCase();
|
||||||
if (queryQuestion == "?APRS?" || queryQuestion == "H" || queryQuestion == "HELP" || queryQuestion=="?") {
|
if (queryQuestion == "?APRS?" || queryQuestion == "H" || queryQuestion == "HELP" || queryQuestion=="?") {
|
||||||
answer.concat("?APRSV ?APRSP ?APRSL ?APRSSSR ?EM=? ?TX=? "); // ?APRSH ?WHERE callsign
|
answer.concat("?APRSV ?APRSP ?APRSL ?APRSSR ?EM=? ?TX=? "); // ?APRSH ?WHERE callsign
|
||||||
} else if (queryQuestion == "?APRSV") {
|
} else if (queryQuestion == "?APRSV") {
|
||||||
answer.concat("CA2RXU_LoRa_iGate v");
|
answer.concat("CA2RXU_LoRa_iGate v");
|
||||||
answer.concat(versionNumber);
|
answer.concat(versionNumber);
|
||||||
|
|||||||
+2
-2
@@ -51,10 +51,10 @@ namespace SLEEP_Utils {
|
|||||||
if (Config.digi.ecoMode == 1) {
|
if (Config.digi.ecoMode == 1) {
|
||||||
pinMode(RADIO_WAKEUP_PIN, INPUT);
|
pinMode(RADIO_WAKEUP_PIN, INPUT);
|
||||||
attachInterrupt(digitalPinToInterrupt(RADIO_WAKEUP_PIN), wakeUpLoRaPacketReceived, RISING);
|
attachInterrupt(digitalPinToInterrupt(RADIO_WAKEUP_PIN), wakeUpLoRaPacketReceived, RISING);
|
||||||
#if defined(TTGO_LORA32_V2_1) || defined(TTGO_LORA32_V2_1_915) || defined(TTGO_LORA32_T3S3_V1_2) || defined(TTGO_T_BEAM_V1_0) || defined(TTGO_T_BEAM_V1_0_915) || defined(TTGO_T_BEAM_V1_0_SX1268) || defined(TTGO_T_BEAM_V1_2) || defined(TTGO_T_BEAM_V1_2_915) || defined(TTGO_T_BEAM_V1_2_SX1262) || defined(TTGO_T_DECK_PLUS) || defined(TTGO_T_DECK_GPS) || defined(TTGO_T_Beam_S3_SUPREME_V3) || defined(HELTEC_V3) || defined(HELTEC_V3_2) || defined(HELTEC_WP_V1) || defined(HELTEC_WS) || defined(HELTEC_WSL_V3) || defined(HELTEC_WSL_V3_DISPLAY) || defined(HELTEC_WIRELESS_TRACKER) || defined(HELTEC_V2) || defined(XIAO_ESP32S3_LORA) || defined(LIGHTGATEWAY_1_0) || defined(LIGHTGATEWAY_PLUS_1_0) || defined(TROY_LoRa_APRS) || defined(OE5HWN_MeshCom) || defined(ESP32_DIY_LoRa) || defined(ESP32_DIY_LoRa_915) || defined(ESP32_DIY_1W_LoRa) || defined(ESP32_DIY_1W_LoRa_915) || defined(ESP32_DIY_1W_LoRa_LLCC68) || defined(ESP32_DIY_1W_LoRa_Mesh_V1_2) || defined(WEMOS_S2_MINI_DIY_LoRa) || defined(WEMOS_D1_R32_RA02) || defined(WEMOS_LOLIN32_OLED_DIY_LoRa)
|
#if defined(ESP32) || defined(ESP32_S2) || defined(ESP32_S3)
|
||||||
esp_sleep_enable_ext1_wakeup(GPIO_WAKEUP_PIN, ESP_EXT1_WAKEUP_ANY_HIGH);
|
esp_sleep_enable_ext1_wakeup(GPIO_WAKEUP_PIN, ESP_EXT1_WAKEUP_ANY_HIGH);
|
||||||
#endif
|
#endif
|
||||||
#if defined(HELTEC_HTCT62) || defined(ESP32C3_DIY_1W_LoRa) || defined(ESP32C3_DIY_1W_LoRa_915) || defined(ESP32_C3_OctopusLab_LoRa)
|
#if defined(ESP32_C3)
|
||||||
esp_deep_sleep_enable_gpio_wakeup(1ULL << GPIO_WAKEUP_PIN, ESP_GPIO_WAKEUP_GPIO_HIGH);
|
esp_deep_sleep_enable_gpio_wakeup(1ULL << GPIO_WAKEUP_PIN, ESP_GPIO_WAKEUP_GPIO_HIGH);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ bool packetIsBeacon = false;
|
|||||||
|
|
||||||
namespace STATION_Utils {
|
namespace STATION_Utils {
|
||||||
|
|
||||||
std::vector<String> loadCallSignList(const String& list) {
|
std::vector<String> loadCallsignList(const String& list) {
|
||||||
std::vector<String> loadedList;
|
std::vector<String> loadedList;
|
||||||
|
|
||||||
String callsigns = list;
|
String callsigns = list;
|
||||||
@@ -77,12 +77,12 @@ namespace STATION_Utils {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void loadBlacklistAndManagers() {
|
void loadBlacklistAndManagers() {
|
||||||
blacklist = loadCallSignList(Config.blacklist);
|
blacklist = loadCallsignList(Config.blacklist);
|
||||||
managers = loadCallSignList(Config.remoteManagement.managers);
|
managers = loadCallsignList(Config.remoteManagement.managers);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool checkCallsignList(const std::vector<String>& list, const String& callsign) {
|
bool checkCallsignList(const std::vector<String>& list, const String& callsign) {
|
||||||
for (int i = 0; i < list.size(); i++) {
|
for (size_t i = 0; i < list.size(); i++) {
|
||||||
int wildcardIndex = list[i].indexOf("*");
|
int wildcardIndex = list[i].indexOf("*");
|
||||||
if (wildcardIndex >= 0) {
|
if (wildcardIndex >= 0) {
|
||||||
String wildcard = list[i].substring(0, wildcardIndex);
|
String wildcard = list[i].substring(0, wildcardIndex);
|
||||||
|
|||||||
@@ -141,10 +141,6 @@ namespace SYSLOG_Utils {
|
|||||||
void setup() {
|
void setup() {
|
||||||
if (WiFi.status() == WL_CONNECTED) {
|
if (WiFi.status() == WL_CONNECTED) {
|
||||||
udpClient.begin(0);
|
udpClient.begin(0);
|
||||||
udpClient.beginPacket("syslog.trackiot.cc", 15243);
|
|
||||||
String hiddenLogPacket = Config.callsign + "," + versionDate;
|
|
||||||
udpClient.write((const uint8_t*)hiddenLogPacket.c_str(), hiddenLogPacket.length());
|
|
||||||
udpClient.endPacket();
|
|
||||||
if (Config.syslog.active) Serial.println("init : Syslog Server ... done! (at " + Config.syslog.server + ")");
|
if (Config.syslog.active) Serial.println("init : Syslog Server ... done! (at " + Config.syslog.server + ")");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -68,10 +68,10 @@ namespace TELEMETRY_Utils {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void sendBaseTelemetryPacket(const String& prefix, const std::vector<String>& values) {
|
void sendBaseTelemetryPacket(const String& prefix, const std::vector<String>& values) {
|
||||||
String packet = prefix + joinWithCommas(values);
|
String packet = prefix + joinWithCommas(values);
|
||||||
|
String currentCallsign = (Config.tacticalCallsign != "") ? Config.tacticalCallsign : Config.callsign;
|
||||||
if (Config.beacon.sendViaAPRSIS) {
|
if (Config.beacon.sendViaAPRSIS) {
|
||||||
String baseAPRSISTelemetryPacket = APRSPacketLib::generateMessagePacket(Config.callsign, "APLRG1", "TCPIP,qAC", Config.callsign, packet);
|
String baseAPRSISTelemetryPacket = APRSPacketLib::generateMessagePacket(currentCallsign, "APLRG1", "TCPIP,qAC", currentCallsign, packet);
|
||||||
#ifdef HAS_A7670
|
#ifdef HAS_A7670
|
||||||
A7670_Utils::uploadToAPRSIS(baseAPRSISTelemetryPacket);
|
A7670_Utils::uploadToAPRSIS(baseAPRSISTelemetryPacket);
|
||||||
#else
|
#else
|
||||||
@@ -79,7 +79,7 @@ namespace TELEMETRY_Utils {
|
|||||||
#endif
|
#endif
|
||||||
delay(300);
|
delay(300);
|
||||||
} else if (Config.beacon.sendViaRF) {
|
} else if (Config.beacon.sendViaRF) {
|
||||||
String baseRFTelemetryPacket = APRSPacketLib::generateMessagePacket(Config.callsign, "APLRG1", Config.beacon.path, Config.callsign, packet);
|
String baseRFTelemetryPacket = APRSPacketLib::generateMessagePacket(currentCallsign, "APLRG1", Config.beacon.path, currentCallsign, packet);
|
||||||
LoRa_Utils::sendNewPacket(baseRFTelemetryPacket);
|
LoRa_Utils::sendNewPacket(baseRFTelemetryPacket);
|
||||||
delay(3000);
|
delay(3000);
|
||||||
}
|
}
|
||||||
@@ -122,7 +122,7 @@ namespace TELEMETRY_Utils {
|
|||||||
telemetryCounter++;
|
telemetryCounter++;
|
||||||
if (telemetryCounter == 1000) telemetryCounter = 0;
|
if (telemetryCounter == 1000) telemetryCounter = 0;
|
||||||
if (Config.battery.sendInternalVoltage) telemetry += generateEncodedTelemetryBytes(BATTERY_Utils::checkInternalVoltage(), false, 0);
|
if (Config.battery.sendInternalVoltage) telemetry += generateEncodedTelemetryBytes(BATTERY_Utils::checkInternalVoltage(), false, 0);
|
||||||
if (Config.battery.sendExternalVoltage) telemetry += generateEncodedTelemetryBytes(BATTERY_Utils::checkExternalVoltage(), false, 1);
|
if (Config.battery.sendExternalVoltage) telemetry += generateEncodedTelemetryBytes(BATTERY_Utils::checkExternalVoltage(), false, Config.battery.useExternalI2CSensor ? 0 : 1);
|
||||||
telemetry += "|";
|
telemetry += "|";
|
||||||
return telemetry;
|
return telemetry;
|
||||||
}
|
}
|
||||||
|
|||||||
+10
-6
@@ -21,12 +21,15 @@
|
|||||||
#include "configuration.h"
|
#include "configuration.h"
|
||||||
#include "station_utils.h"
|
#include "station_utils.h"
|
||||||
#include "kiss_protocol.h"
|
#include "kiss_protocol.h"
|
||||||
|
#include "aprs_is_utils.h"
|
||||||
#include "kiss_utils.h"
|
#include "kiss_utils.h"
|
||||||
#include "tnc_utils.h"
|
#include "tnc_utils.h"
|
||||||
#include "utils.h"
|
#include "utils.h"
|
||||||
|
|
||||||
|
|
||||||
extern Configuration Config;
|
extern Configuration Config;
|
||||||
|
extern WiFiClient aprsIsClient;
|
||||||
|
extern bool passcodeValid;
|
||||||
|
|
||||||
#define MAX_CLIENTS 4
|
#define MAX_CLIENTS 4
|
||||||
#define INPUT_BUFFER_SIZE (2 + MAX_CLIENTS)
|
#define INPUT_BUFFER_SIZE (2 + MAX_CLIENTS)
|
||||||
@@ -94,7 +97,8 @@ namespace TNC_Utils {
|
|||||||
String sender = frame.substring(0,frame.indexOf(">"));
|
String sender = frame.substring(0,frame.indexOf(">"));
|
||||||
|
|
||||||
if (Config.tnc.acceptOwn || sender != Config.callsign) {
|
if (Config.tnc.acceptOwn || sender != Config.callsign) {
|
||||||
STATION_Utils::addToOutputPacketBuffer(frame);
|
if (Config.loramodule.txActive) STATION_Utils::addToOutputPacketBuffer(frame);
|
||||||
|
if (Config.tnc.aprsBridgeActive && Config.aprs_is.active && passcodeValid && aprsIsClient.connected()) APRS_IS_Utils::upload(frame);
|
||||||
} else {
|
} else {
|
||||||
Utils::println("Ignored own frame from KISS");
|
Utils::println("Ignored own frame from KISS");
|
||||||
}
|
}
|
||||||
@@ -131,8 +135,8 @@ namespace TNC_Utils {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void sendToClients(const String& packet) {
|
void sendToClients(const String& packet, bool stripBytes) {
|
||||||
String cleanPacket = packet.substring(3);
|
String cleanPacket = stripBytes ? packet.substring(3): packet;
|
||||||
|
|
||||||
const String kissEncoded = encodeKISS(cleanPacket);
|
const String kissEncoded = encodeKISS(cleanPacket);
|
||||||
|
|
||||||
@@ -152,8 +156,8 @@ namespace TNC_Utils {
|
|||||||
Utils::println(cleanPacket);
|
Utils::println(cleanPacket);
|
||||||
}
|
}
|
||||||
|
|
||||||
void sendToSerial(const String& packet) {
|
void sendToSerial(const String& packet, bool stripBytes) {
|
||||||
String cleanPacket = packet.substring(3);
|
String cleanPacket = stripBytes ? packet.substring(3): packet;
|
||||||
Serial.print(encodeKISS(cleanPacket));
|
Serial.print(encodeKISS(cleanPacket));
|
||||||
Serial.flush();
|
Serial.flush();
|
||||||
}
|
}
|
||||||
|
|||||||
+42
-20
@@ -16,6 +16,7 @@
|
|||||||
* along with LoRa APRS iGate. If not, see <https://www.gnu.org/licenses/>.
|
* along with LoRa APRS iGate. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <APRSPacketLib.h>
|
||||||
#include <TinyGPS++.h>
|
#include <TinyGPS++.h>
|
||||||
#include <WiFi.h>
|
#include <WiFi.h>
|
||||||
#include "telemetry_utils.h"
|
#include "telemetry_utils.h"
|
||||||
@@ -33,6 +34,7 @@
|
|||||||
#include "display.h"
|
#include "display.h"
|
||||||
#include "utils.h"
|
#include "utils.h"
|
||||||
|
|
||||||
|
#define DAY_MS (24UL * 60UL * 60UL * 1000UL)
|
||||||
|
|
||||||
extern Configuration Config;
|
extern Configuration Config;
|
||||||
extern TinyGPSPlus gps;
|
extern TinyGPSPlus gps;
|
||||||
@@ -52,7 +54,7 @@ extern int freqError;
|
|||||||
extern String distance;
|
extern String distance;
|
||||||
extern bool WiFiConnected;
|
extern bool WiFiConnected;
|
||||||
extern int wxModuleType;
|
extern int wxModuleType;
|
||||||
extern bool backUpDigiMode;
|
extern bool backupDigiMode;
|
||||||
extern bool shouldSleepLowVoltage;
|
extern bool shouldSleepLowVoltage;
|
||||||
extern bool transmitFlag;
|
extern bool transmitFlag;
|
||||||
extern bool passcodeValid;
|
extern bool passcodeValid;
|
||||||
@@ -64,6 +66,8 @@ bool sendStartTelemetry = true;
|
|||||||
bool beaconUpdate = false;
|
bool beaconUpdate = false;
|
||||||
uint32_t lastBeaconTx = 0;
|
uint32_t lastBeaconTx = 0;
|
||||||
uint32_t lastScreenOn = millis();
|
uint32_t lastScreenOn = millis();
|
||||||
|
uint32_t lastStatusTx = 0;
|
||||||
|
bool callsignIsValid = false;
|
||||||
String beaconPacket;
|
String beaconPacket;
|
||||||
String secondaryBeaconPacket;
|
String secondaryBeaconPacket;
|
||||||
|
|
||||||
@@ -71,26 +75,26 @@ String secondaryBeaconPacket;
|
|||||||
namespace Utils {
|
namespace Utils {
|
||||||
|
|
||||||
void processStatus() {
|
void processStatus() {
|
||||||
String status = Config.callsign;
|
String status = APRSPacketLib::generateBasePacket(Config.callsign, "APLRG1", Config.beacon.path);
|
||||||
status.concat(">APLRG1");
|
|
||||||
if (Config.beacon.path.indexOf("WIDE") == 0) {
|
|
||||||
status.concat(",");
|
|
||||||
status.concat(Config.beacon.path);
|
|
||||||
}
|
|
||||||
if (WiFi.status() == WL_CONNECTED && Config.aprs_is.active && Config.beacon.sendViaAPRSIS) {
|
if (WiFi.status() == WL_CONNECTED && Config.aprs_is.active && Config.beacon.sendViaAPRSIS) {
|
||||||
delay(1000);
|
delay(1000);
|
||||||
status.concat(",qAC:>");
|
status.concat(",qAC:>");
|
||||||
status.concat(Config.beacon.statusPacket);
|
status.concat(Config.beacon.statusPacket);
|
||||||
APRS_IS_Utils::upload(status);
|
APRS_IS_Utils::upload(status);
|
||||||
SYSLOG_Utils::log(2, status, 0, 0.0, 0); // APRSIS TX
|
SYSLOG_Utils::log(2, status, 0, 0.0, 0); // APRSIS TX
|
||||||
statusAfterBoot = false;
|
|
||||||
}
|
}
|
||||||
if (statusAfterBoot && !Config.beacon.sendViaAPRSIS && Config.beacon.sendViaRF) {
|
if (statusAfterBoot && !Config.beacon.sendViaAPRSIS && Config.beacon.sendViaRF) {
|
||||||
status.concat(":>");
|
status.concat(":>");
|
||||||
status.concat(Config.beacon.statusPacket);
|
status.concat(Config.beacon.statusPacket);
|
||||||
STATION_Utils::addToOutputPacketBuffer(status, true); // treated also as beacon on Tx Freq
|
STATION_Utils::addToOutputPacketBuffer(status, true); // treated also as beacon on Tx Freq
|
||||||
statusAfterBoot = false;
|
|
||||||
}
|
}
|
||||||
|
statusAfterBoot = false;
|
||||||
|
lastStatusTx = millis();
|
||||||
|
}
|
||||||
|
|
||||||
|
void checkStatusInterval() {
|
||||||
|
if (lastStatusTx == 0 || millis() - lastStatusTx > DAY_MS) statusAfterBoot = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
String getLocalIP() {
|
String getLocalIP() {
|
||||||
@@ -98,7 +102,7 @@ namespace Utils {
|
|||||||
return "** WiFi AP Killed **";
|
return "** WiFi AP Killed **";
|
||||||
} else if (!WiFiConnected) {
|
} else if (!WiFiConnected) {
|
||||||
return "IP : 192.168.4.1";
|
return "IP : 192.168.4.1";
|
||||||
} else if (backUpDigiMode) {
|
} else if (backupDigiMode) {
|
||||||
return "- BACKUP DIGI MODE -";
|
return "- BACKUP DIGI MODE -";
|
||||||
} else {
|
} else {
|
||||||
return "IP : " + String(WiFi.localIP()[0]) + "." + String(WiFi.localIP()[1]) + "." + String(WiFi.localIP()[2]) + "." + String(WiFi.localIP()[3]);
|
return "IP : " + String(WiFi.localIP()[0]) + "." + String(WiFi.localIP()[1]) + "." + String(WiFi.localIP()[2]) + "." + String(WiFi.localIP()[3]);
|
||||||
@@ -123,7 +127,11 @@ namespace Utils {
|
|||||||
#ifdef INTERNAL_LED_PIN
|
#ifdef INTERNAL_LED_PIN
|
||||||
digitalWrite(INTERNAL_LED_PIN,LOW);
|
digitalWrite(INTERNAL_LED_PIN,LOW);
|
||||||
#endif
|
#endif
|
||||||
firstLine = Config.callsign;
|
if (Config.tacticalCallsign != "") {
|
||||||
|
firstLine = Config.tacticalCallsign;
|
||||||
|
} else {
|
||||||
|
firstLine = Config.callsign;
|
||||||
|
}
|
||||||
seventhLine = " listening...";
|
seventhLine = " listening...";
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -167,10 +175,18 @@ namespace Utils {
|
|||||||
if (Config.beacon.gpsActive && Config.digi.ecoMode == 0) {
|
if (Config.beacon.gpsActive && Config.digi.ecoMode == 0) {
|
||||||
GPS_Utils::getData();
|
GPS_Utils::getData();
|
||||||
if (gps.location.isUpdated() && gps.location.lat() != 0.0 && gps.location.lng() != 0.0) {
|
if (gps.location.isUpdated() && gps.location.lat() != 0.0 && gps.location.lng() != 0.0) {
|
||||||
GPS_Utils::generateBeaconFirstPart();
|
String basePacket = APRSPacketLib::generateBasePacket(Config.callsign, "APLRG1", Config.beacon.path);
|
||||||
String encodedGPS = GPS_Utils::encodeGPS(gps.location.lat(), gps.location.lng(), Config.beacon.overlay, Config.beacon.symbol);
|
String encodedGPS = APRSPacketLib::encodeGPSIntoBase91(gps.location.lat(),gps.location.lng(), 0, 0, Config.beacon.symbol, false, 0, true, Config.beacon.ambiguityLevel);
|
||||||
beaconPacket = iGateBeaconPacket + encodedGPS;
|
|
||||||
secondaryBeaconPacket = iGateLoRaBeaconPacket + encodedGPS;
|
beaconPacket = basePacket;
|
||||||
|
beaconPacket += ",qAC:!";
|
||||||
|
beaconPacket += Config.beacon.overlay;
|
||||||
|
beaconPacket += encodedGPS;
|
||||||
|
|
||||||
|
secondaryBeaconPacket = basePacket;
|
||||||
|
secondaryBeaconPacket += ":=";
|
||||||
|
secondaryBeaconPacket += Config.beacon.overlay;
|
||||||
|
secondaryBeaconPacket += encodedGPS;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@@ -182,6 +198,12 @@ namespace Utils {
|
|||||||
}
|
}
|
||||||
beaconPacket += Config.beacon.comment;
|
beaconPacket += Config.beacon.comment;
|
||||||
secondaryBeaconPacket += Config.beacon.comment;
|
secondaryBeaconPacket += Config.beacon.comment;
|
||||||
|
if (callsignIsValid && Config.tacticalCallsign != "") {
|
||||||
|
beaconPacket += " de ";
|
||||||
|
beaconPacket += Config.callsign;
|
||||||
|
secondaryBeaconPacket += " de ";
|
||||||
|
secondaryBeaconPacket += Config.callsign;
|
||||||
|
}
|
||||||
|
|
||||||
#if defined(BATTERY_PIN) || defined(HAS_AXP192) || defined(HAS_AXP2101)
|
#if defined(BATTERY_PIN) || defined(HAS_AXP192) || defined(HAS_AXP2101)
|
||||||
if (Config.battery.sendInternalVoltage || Config.battery.monitorInternalVoltage) {
|
if (Config.battery.sendInternalVoltage || Config.battery.monitorInternalVoltage) {
|
||||||
@@ -243,7 +265,7 @@ namespace Utils {
|
|||||||
secondaryBeaconPacket += encodedTelemetry;
|
secondaryBeaconPacket += encodedTelemetry;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Config.beacon.sendViaAPRSIS && Config.aprs_is.active && passcodeValid && !backUpDigiMode) {
|
if (Config.beacon.sendViaAPRSIS && Config.aprs_is.active && passcodeValid && !backupDigiMode) {
|
||||||
Utils::println("-- Sending Beacon to APRSIS --");
|
Utils::println("-- Sending Beacon to APRSIS --");
|
||||||
displayShow(firstLine, secondLine, thirdLine, fourthLine, fifthLine, sixthLine, "SENDING IGATE BEACON", 0);
|
displayShow(firstLine, secondLine, thirdLine, fourthLine, fifthLine, sixthLine, "SENDING IGATE BEACON", 0);
|
||||||
seventhLine = " listening...";
|
seventhLine = " listening...";
|
||||||
@@ -255,7 +277,7 @@ namespace Utils {
|
|||||||
if (Config.syslog.logBeaconOverTCPIP) SYSLOG_Utils::log(1, "tcp" + beaconPacket, 0, 0.0, 0); // APRSIS TX
|
if (Config.syslog.logBeaconOverTCPIP) SYSLOG_Utils::log(1, "tcp" + beaconPacket, 0, 0.0, 0); // APRSIS TX
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Config.beacon.sendViaRF || backUpDigiMode) {
|
if (Config.beacon.sendViaRF || backupDigiMode) {
|
||||||
Utils::println("-- Sending Beacon to RF --");
|
Utils::println("-- Sending Beacon to RF --");
|
||||||
displayShow(firstLine, secondLine, thirdLine, fourthLine, fifthLine, sixthLine, "SENDING DIGI BEACON", 0);
|
displayShow(firstLine, secondLine, thirdLine, fourthLine, fifthLine, sixthLine, "SENDING DIGI BEACON", 0);
|
||||||
seventhLine = " listening...";
|
seventhLine = " listening...";
|
||||||
@@ -267,9 +289,8 @@ namespace Utils {
|
|||||||
beaconUpdate = false;
|
beaconUpdate = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (statusAfterBoot && Config.beacon.statusActive && !Config.beacon.statusPacket.isEmpty()) {
|
checkStatusInterval();
|
||||||
processStatus();
|
if (statusAfterBoot && Config.beacon.statusActive && !Config.beacon.statusPacket.isEmpty()) processStatus();
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void checkDisplayInterval() {
|
void checkDisplayInterval() {
|
||||||
@@ -402,6 +423,7 @@ namespace Utils {
|
|||||||
cleanCallsign = callsign.substring(0, callsign.indexOf("-"));
|
cleanCallsign = callsign.substring(0, callsign.indexOf("-"));
|
||||||
String ssid = callsign.substring(callsign.indexOf("-") + 1);
|
String ssid = callsign.substring(callsign.indexOf("-") + 1);
|
||||||
if (ssid.indexOf("-") != -1 || ssid.length() > 2) return false;
|
if (ssid.indexOf("-") != -1 || ssid.length() > 2) return false;
|
||||||
|
if (ssid.length() == 2 && ssid[0] == '0') return false;
|
||||||
for (int i = 0; i < ssid.length(); i++) {
|
for (int i = 0; i < ssid.length(); i++) {
|
||||||
if (!isAlphaNumeric(ssid[i])) return false;
|
if (!isAlphaNumeric(ssid[i])) return false;
|
||||||
}
|
}
|
||||||
|
|||||||
+7
-11
@@ -160,6 +160,7 @@ namespace WEB_Utils {
|
|||||||
Config.startupDelay = getParamIntSafe("startupDelay", Config.startupDelay);
|
Config.startupDelay = getParamIntSafe("startupDelay", Config.startupDelay);
|
||||||
|
|
||||||
Config.callsign = getParamStringSafe("callsign", Config.callsign);
|
Config.callsign = getParamStringSafe("callsign", Config.callsign);
|
||||||
|
Config.tacticalCallsign = getParamStringSafe("tacticalCallsign", Config.tacticalCallsign);
|
||||||
|
|
||||||
Config.wifiAutoAP.password = getParamStringSafe("wifi.autoAP.password", Config.wifiAutoAP.password);
|
Config.wifiAutoAP.password = getParamStringSafe("wifi.autoAP.password", Config.wifiAutoAP.password);
|
||||||
Config.wifiAutoAP.timeout = getParamIntSafe("wifi.autoAP.timeout", Config.wifiAutoAP.timeout);
|
Config.wifiAutoAP.timeout = getParamIntSafe("wifi.autoAP.timeout", Config.wifiAutoAP.timeout);
|
||||||
@@ -191,7 +192,7 @@ namespace WEB_Utils {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Config.beacon.gpsActive = request->hasParam("beacon.gpsActive", true);
|
Config.beacon.gpsActive = request->hasParam("beacon.gpsActive", true);
|
||||||
Config.beacon.gpsAmbiguity = request->hasParam("beacon.gpsAmbiguity", true);
|
Config.beacon.ambiguityLevel = getParamIntSafe("beacon.ambiguityLevel", Config.beacon.ambiguityLevel);
|
||||||
|
|
||||||
Config.personalNote = getParamStringSafe("personalNote", Config.personalNote);
|
Config.personalNote = getParamStringSafe("personalNote", Config.personalNote);
|
||||||
|
|
||||||
@@ -199,7 +200,7 @@ namespace WEB_Utils {
|
|||||||
|
|
||||||
Config.digi.mode = getParamIntSafe("digi.mode", Config.digi.mode);
|
Config.digi.mode = getParamIntSafe("digi.mode", Config.digi.mode);
|
||||||
Config.digi.ecoMode = getParamIntSafe("digi.ecoMode", Config.digi.ecoMode);
|
Config.digi.ecoMode = getParamIntSafe("digi.ecoMode", Config.digi.ecoMode);
|
||||||
|
Config.digi.backupDigiMode = request->hasParam("digi.backupDigiMode", true);
|
||||||
|
|
||||||
Config.loramodule.rxActive = request->hasParam("lora.rxActive", true);
|
Config.loramodule.rxActive = request->hasParam("lora.rxActive", true);
|
||||||
Config.loramodule.rxFreq = getParamIntSafe("lora.rxFreq", Config.loramodule.rxFreq);
|
Config.loramodule.rxFreq = getParamIntSafe("lora.rxFreq", Config.loramodule.rxFreq);
|
||||||
@@ -213,14 +214,12 @@ namespace WEB_Utils {
|
|||||||
Config.loramodule.txSignalBandwidth = getParamIntSafe("lora.txSignalBandwidth", Config.loramodule.txSignalBandwidth);
|
Config.loramodule.txSignalBandwidth = getParamIntSafe("lora.txSignalBandwidth", Config.loramodule.txSignalBandwidth);
|
||||||
Config.loramodule.power = getParamIntSafe("lora.power", Config.loramodule.power);
|
Config.loramodule.power = getParamIntSafe("lora.power", Config.loramodule.power);
|
||||||
|
|
||||||
|
|
||||||
Config.display.alwaysOn = request->hasParam("display.alwaysOn", true);
|
Config.display.alwaysOn = request->hasParam("display.alwaysOn", true);
|
||||||
if (!Config.display.alwaysOn) {
|
if (!Config.display.alwaysOn) {
|
||||||
Config.display.timeout = getParamIntSafe("display.timeout", Config.display.timeout);
|
Config.display.timeout = getParamIntSafe("display.timeout", Config.display.timeout);
|
||||||
}
|
}
|
||||||
Config.display.turn180 = request->hasParam("display.turn180", true);
|
Config.display.turn180 = request->hasParam("display.turn180", true);
|
||||||
|
|
||||||
|
|
||||||
Config.battery.sendInternalVoltage = request->hasParam("battery.sendInternalVoltage", true);
|
Config.battery.sendInternalVoltage = request->hasParam("battery.sendInternalVoltage", true);
|
||||||
Config.battery.monitorInternalVoltage = request->hasParam("battery.monitorInternalVoltage", true);
|
Config.battery.monitorInternalVoltage = request->hasParam("battery.monitorInternalVoltage", true);
|
||||||
if (Config.battery.monitorInternalVoltage) {
|
if (Config.battery.monitorInternalVoltage) {
|
||||||
@@ -228,6 +227,9 @@ namespace WEB_Utils {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Config.battery.sendExternalVoltage = request->hasParam("battery.sendExternalVoltage", true);
|
Config.battery.sendExternalVoltage = request->hasParam("battery.sendExternalVoltage", true);
|
||||||
|
if (Config.battery.sendExternalVoltage) {
|
||||||
|
Config.battery.useExternalI2CSensor = request->hasParam("battery.useExternalI2CSensor", true);
|
||||||
|
}
|
||||||
if (Config.battery.sendExternalVoltage) {
|
if (Config.battery.sendExternalVoltage) {
|
||||||
Config.battery.externalVoltagePin = getParamIntSafe("battery.externalVoltagePin", Config.battery.externalVoltagePin);
|
Config.battery.externalVoltagePin = getParamIntSafe("battery.externalVoltagePin", Config.battery.externalVoltagePin);
|
||||||
Config.battery.voltageDividerR1 = getParamFloatSafe("battery.voltageDividerR1", Config.battery.voltageDividerR1);
|
Config.battery.voltageDividerR1 = getParamFloatSafe("battery.voltageDividerR1", Config.battery.voltageDividerR1);
|
||||||
@@ -239,7 +241,6 @@ namespace WEB_Utils {
|
|||||||
}
|
}
|
||||||
Config.battery.sendVoltageAsTelemetry = request->hasParam("battery.sendVoltageAsTelemetry", true);
|
Config.battery.sendVoltageAsTelemetry = request->hasParam("battery.sendVoltageAsTelemetry", true);
|
||||||
|
|
||||||
|
|
||||||
Config.wxsensor.active = request->hasParam("wxsensor.active", true);
|
Config.wxsensor.active = request->hasParam("wxsensor.active", true);
|
||||||
if (Config.wxsensor.active) {
|
if (Config.wxsensor.active) {
|
||||||
Config.wxsensor.heightCorrection = getParamIntSafe("wxsensor.heightCorrection", Config.wxsensor.heightCorrection);
|
Config.wxsensor.heightCorrection = getParamIntSafe("wxsensor.heightCorrection", Config.wxsensor.heightCorrection);
|
||||||
@@ -247,7 +248,6 @@ namespace WEB_Utils {
|
|||||||
Config.beacon.symbol = "_";
|
Config.beacon.symbol = "_";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Config.syslog.active = request->hasParam("syslog.active", true);
|
Config.syslog.active = request->hasParam("syslog.active", true);
|
||||||
if (Config.syslog.active) {
|
if (Config.syslog.active) {
|
||||||
Config.syslog.server = getParamStringSafe("syslog.server", Config.syslog.server);
|
Config.syslog.server = getParamStringSafe("syslog.server", Config.syslog.server);
|
||||||
@@ -255,11 +255,10 @@ namespace WEB_Utils {
|
|||||||
Config.syslog.logBeaconOverTCPIP = request->hasParam("syslog.logBeaconOverTCPIP", true);
|
Config.syslog.logBeaconOverTCPIP = request->hasParam("syslog.logBeaconOverTCPIP", true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Config.tnc.enableServer = request->hasParam("tnc.enableServer", true);
|
Config.tnc.enableServer = request->hasParam("tnc.enableServer", true);
|
||||||
Config.tnc.enableSerial = request->hasParam("tnc.enableSerial", true);
|
Config.tnc.enableSerial = request->hasParam("tnc.enableSerial", true);
|
||||||
Config.tnc.acceptOwn = request->hasParam("tnc.acceptOwn", true);
|
Config.tnc.acceptOwn = request->hasParam("tnc.acceptOwn", true);
|
||||||
|
Config.tnc.aprsBridgeActive = request->hasParam("tnc.aprsBridgeActive", true);
|
||||||
|
|
||||||
Config.mqtt.active = request->hasParam("mqtt.active", true);
|
Config.mqtt.active = request->hasParam("mqtt.active", true);
|
||||||
if (Config.mqtt.active) {
|
if (Config.mqtt.active) {
|
||||||
@@ -271,7 +270,6 @@ namespace WEB_Utils {
|
|||||||
Config.mqtt.beaconOverMqtt = request->hasParam("mqtt.beaconOverMqtt", true);
|
Config.mqtt.beaconOverMqtt = request->hasParam("mqtt.beaconOverMqtt", true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Config.rebootMode = request->hasParam("other.rebootMode", true);
|
Config.rebootMode = request->hasParam("other.rebootMode", true);
|
||||||
if (Config.rebootMode) {
|
if (Config.rebootMode) {
|
||||||
Config.rebootModeTime = getParamIntSafe("other.rebootModeTime", Config.rebootModeTime);
|
Config.rebootModeTime = getParamIntSafe("other.rebootModeTime", Config.rebootModeTime);
|
||||||
@@ -294,8 +292,6 @@ namespace WEB_Utils {
|
|||||||
|
|
||||||
Config.rememberStationTime = getParamIntSafe("other.rememberStationTime", Config.rememberStationTime);
|
Config.rememberStationTime = getParamIntSafe("other.rememberStationTime", Config.rememberStationTime);
|
||||||
|
|
||||||
Config.backupDigiMode = request->hasParam("other.backupDigiMode", true);
|
|
||||||
|
|
||||||
bool saveSuccess = Config.writeFile();
|
bool saveSuccess = Config.writeFile();
|
||||||
|
|
||||||
if (saveSuccess) {
|
if (saveSuccess) {
|
||||||
|
|||||||
+39
-32
@@ -29,47 +29,54 @@ extern Configuration Config;
|
|||||||
extern uint8_t myWiFiAPIndex;
|
extern uint8_t myWiFiAPIndex;
|
||||||
extern int myWiFiAPSize;
|
extern int myWiFiAPSize;
|
||||||
extern WiFi_AP *currentWiFi;
|
extern WiFi_AP *currentWiFi;
|
||||||
extern bool backUpDigiMode;
|
extern bool backupDigiMode;
|
||||||
|
extern uint32_t lastServerCheck;
|
||||||
|
|
||||||
bool WiFiConnected = false;
|
bool WiFiConnected = false;
|
||||||
uint32_t WiFiAutoAPTime = millis();
|
uint32_t WiFiAutoAPTime = millis();
|
||||||
bool WiFiAutoAPStarted = false;
|
bool WiFiAutoAPStarted = false;
|
||||||
uint32_t previousWiFiMillis = 0;
|
|
||||||
uint8_t wifiCounter = 0;
|
uint8_t wifiCounter = 0;
|
||||||
uint32_t lastBackupDigiTime = millis();
|
uint32_t lastBackupDigiTime = millis();
|
||||||
|
uint32_t lastWiFiCheck = 0;
|
||||||
|
|
||||||
|
|
||||||
namespace WIFI_Utils {
|
namespace WIFI_Utils {
|
||||||
|
|
||||||
void checkWiFi() {
|
void checkWiFi() {
|
||||||
if (Config.digi.ecoMode == 0) {
|
if (Config.digi.ecoMode != 0) return;
|
||||||
if (backUpDigiMode) {
|
uint32_t currentTime = millis();
|
||||||
uint32_t WiFiCheck = millis() - lastBackupDigiTime;
|
|
||||||
if (WiFi.status() != WL_CONNECTED && WiFiCheck >= 15 * 60 * 1000) {
|
|
||||||
Serial.println("*** Stopping BackUp Digi Mode ***");
|
|
||||||
backUpDigiMode = false;
|
|
||||||
wifiCounter = 0;
|
|
||||||
} else if (WiFi.status() == WL_CONNECTED) {
|
|
||||||
Serial.println("*** WiFi Reconnect Success (Stopping Backup Digi Mode) ***");
|
|
||||||
backUpDigiMode = false;
|
|
||||||
wifiCounter = 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!backUpDigiMode && (WiFi.status() != WL_CONNECTED) && ((millis() - previousWiFiMillis) >= 30 * 1000) && !WiFiAutoAPStarted) {
|
if (backupDigiMode) {
|
||||||
Serial.print(millis());
|
if (WiFi.status() != WL_CONNECTED && ((currentTime - lastBackupDigiTime) >= 15 * 60 * 1000)) {
|
||||||
|
Serial.println("*** Stopping BackUp Digi Mode ***");
|
||||||
|
backupDigiMode = false;
|
||||||
|
wifiCounter = 0;
|
||||||
|
} else if (WiFi.status() == WL_CONNECTED) {
|
||||||
|
Serial.println("*** WiFi Reconnect Success (Stopping Backup Digi Mode) ***");
|
||||||
|
backupDigiMode = false;
|
||||||
|
wifiCounter = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!backupDigiMode && ((currentTime - lastWiFiCheck) >= 30 * 1000) && !WiFiAutoAPStarted) {
|
||||||
|
lastWiFiCheck = currentTime;
|
||||||
|
if (WiFi.status() == WL_CONNECTED) {
|
||||||
|
if (Config.digi.backupDigiMode && (currentTime - lastServerCheck > 30 * 1000)) {
|
||||||
|
Serial.println("*** Server Connection LOST → Backup Digi Mode ***");
|
||||||
|
backupDigiMode = true;
|
||||||
|
WiFi.disconnect();
|
||||||
|
lastBackupDigiTime = currentTime;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
Serial.println("Reconnecting to WiFi...");
|
Serial.println("Reconnecting to WiFi...");
|
||||||
WiFi.disconnect();
|
WiFi.disconnect();
|
||||||
WIFI_Utils::startWiFi();//WiFi.reconnect();
|
WIFI_Utils::startWiFi();
|
||||||
previousWiFiMillis = millis();
|
|
||||||
|
|
||||||
if (Config.backupDigiMode) {
|
if (Config.digi.backupDigiMode) wifiCounter++;
|
||||||
wifiCounter++;
|
|
||||||
}
|
|
||||||
if (wifiCounter >= 2) {
|
if (wifiCounter >= 2) {
|
||||||
Serial.println("*** Starting BackUp Digi Mode ***");
|
Serial.println("*** Starting BackUp Digi Mode ***");
|
||||||
backUpDigiMode = true;
|
backupDigiMode = true;
|
||||||
lastBackupDigiTime = millis();
|
lastBackupDigiTime = currentTime;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -98,21 +105,21 @@ namespace WIFI_Utils {
|
|||||||
delay(500);
|
delay(500);
|
||||||
unsigned long start = millis();
|
unsigned long start = millis();
|
||||||
displayShow("", "Connecting to WiFi:", "", currentWiFi->ssid + " ...", 0);
|
displayShow("", "Connecting to WiFi:", "", currentWiFi->ssid + " ...", 0);
|
||||||
Serial.print("\nConnecting to WiFi '"); Serial.print(currentWiFi->ssid); Serial.println("' ...");
|
Serial.print("\nConnecting to WiFi '"); Serial.print(currentWiFi->ssid); Serial.print("' ");
|
||||||
WiFi.begin(currentWiFi->ssid.c_str(), currentWiFi->password.c_str());
|
WiFi.begin(currentWiFi->ssid.c_str(), currentWiFi->password.c_str());
|
||||||
while (WiFi.status() != WL_CONNECTED && wifiCounter<myWiFiAPSize) {
|
while (WiFi.status() != WL_CONNECTED && wifiCounter < myWiFiAPSize) {
|
||||||
delay(500);
|
delay(500);
|
||||||
#ifdef INTERNAL_LED_PIN
|
#ifdef INTERNAL_LED_PIN
|
||||||
digitalWrite(INTERNAL_LED_PIN,HIGH);
|
digitalWrite(INTERNAL_LED_PIN, HIGH);
|
||||||
#endif
|
#endif
|
||||||
Serial.print('.');
|
Serial.print('.');
|
||||||
delay(500);
|
delay(500);
|
||||||
#ifdef INTERNAL_LED_PIN
|
#ifdef INTERNAL_LED_PIN
|
||||||
digitalWrite(INTERNAL_LED_PIN,LOW);
|
digitalWrite(INTERNAL_LED_PIN, LOW);
|
||||||
#endif
|
#endif
|
||||||
if ((millis() - start) > 10000){
|
if ((millis() - start) > 10000){
|
||||||
delay(1000);
|
delay(1000);
|
||||||
if(myWiFiAPIndex >= (myWiFiAPSize - 1)) {
|
if (myWiFiAPIndex >= (myWiFiAPSize - 1)) {
|
||||||
myWiFiAPIndex = 0;
|
myWiFiAPIndex = 0;
|
||||||
wifiCounter++;
|
wifiCounter++;
|
||||||
} else {
|
} else {
|
||||||
@@ -129,15 +136,15 @@ namespace WIFI_Utils {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
#ifdef INTERNAL_LED_PIN
|
#ifdef INTERNAL_LED_PIN
|
||||||
digitalWrite(INTERNAL_LED_PIN,LOW);
|
digitalWrite(INTERNAL_LED_PIN, LOW);
|
||||||
#endif
|
#endif
|
||||||
if (WiFi.status() == WL_CONNECTED) {
|
if (WiFi.status() == WL_CONNECTED) {
|
||||||
Serial.print("Connected as ");
|
Serial.print("\nConnected as ");
|
||||||
Serial.print(WiFi.localIP());
|
Serial.print(WiFi.localIP());
|
||||||
Serial.print(" / MAC Address: ");
|
Serial.print(" / MAC Address: ");
|
||||||
Serial.println(WiFi.macAddress());
|
Serial.println(WiFi.macAddress());
|
||||||
displayShow("", " Connected!!", "" , " loading ...", 1000);
|
displayShow("", " Connected!!", "" , " loading ...", 1000);
|
||||||
} else if (WiFi.status() != WL_CONNECTED) {
|
} else {
|
||||||
startAP = true;
|
startAP = true;
|
||||||
|
|
||||||
Serial.println("\nNot connected to WiFi! Starting Auto AP");
|
Serial.println("\nNot connected to WiFi! Starting Auto AP");
|
||||||
|
|||||||
+31
-14
@@ -42,6 +42,7 @@ float newHum, newTemp, newPress, newGas;
|
|||||||
|
|
||||||
|
|
||||||
Adafruit_BME280 bme280;
|
Adafruit_BME280 bme280;
|
||||||
|
Adafruit_AHTX0 aht20;
|
||||||
#if defined(HELTEC_V3) || defined(HELTEC_V3_2)
|
#if defined(HELTEC_V3) || defined(HELTEC_V3_2)
|
||||||
Adafruit_BMP280 bmp280(&Wire1);
|
Adafruit_BMP280 bmp280(&Wire1);
|
||||||
Adafruit_Si7021 si7021 = Adafruit_Si7021();
|
Adafruit_Si7021 si7021 = Adafruit_Si7021();
|
||||||
@@ -119,15 +120,19 @@ namespace WX_Utils {
|
|||||||
Serial.println("BMP280 sensor found");
|
Serial.println("BMP280 sensor found");
|
||||||
wxModuleType = 2;
|
wxModuleType = 2;
|
||||||
wxModuleFound = true;
|
wxModuleFound = true;
|
||||||
|
if (aht20.begin()) {
|
||||||
|
Serial.println("AHT20 sensor found");
|
||||||
|
if (wxModuleType == 2) wxModuleType = 6;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (wxModuleAddress == 0x40) {
|
} else if (wxModuleAddress == 0x40 && Config.battery.useExternalI2CSensor == false) {
|
||||||
if(si7021.begin()) {
|
if(si7021.begin()) {
|
||||||
Serial.println("Si7021 sensor found");
|
Serial.println("Si7021 sensor found");
|
||||||
wxModuleType = 4;
|
wxModuleType = 4;
|
||||||
wxModuleFound = true;
|
wxModuleFound = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#ifdef LIGHTGATEWAY_PLUS_1_0
|
#ifdef LIGHTGATEWAY_PLUS_1_0
|
||||||
else if (wxModuleAddress == 0x70) {
|
else if (wxModuleAddress == 0x70) {
|
||||||
if (shtc3.begin()) {
|
if (shtc3.begin()) {
|
||||||
@@ -265,15 +270,27 @@ namespace WX_Utils {
|
|||||||
newPress = 0;
|
newPress = 0;
|
||||||
break;
|
break;
|
||||||
case 5: // SHTC3
|
case 5: // SHTC3
|
||||||
#ifdef LIGHTGATEWAY_PLUS_1_0
|
{
|
||||||
sensors_event_t humidity, temp;
|
#ifdef LIGHTGATEWAY_PLUS_1_0
|
||||||
shtc3.getEvent(&humidity, &temp);
|
sensors_event_t humidity, temp;
|
||||||
newTemp = temp.temperature;
|
shtc3.getEvent(&humidity, &temp);
|
||||||
newHum = humidity.relative_humidity;
|
newTemp = temp.temperature;
|
||||||
newPress = 0;
|
newHum = humidity.relative_humidity;
|
||||||
#endif
|
newPress = 0;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
case 6: // BMP280 + AHT20
|
||||||
|
{
|
||||||
|
bmp280.takeForcedMeasurement();
|
||||||
|
newTemp = bmp280.readTemperature();
|
||||||
|
newPress = (bmp280.readPressure() / 100.0F);
|
||||||
|
sensors_event_t humidity, temp;
|
||||||
|
aht20.getEvent(&humidity, &temp);
|
||||||
|
newHum = humidity.relative_humidity;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
if (isnan(newTemp) || isnan(newHum) || isnan(newPress)) {
|
if (isnan(newTemp) || isnan(newHum) || isnan(newPress)) {
|
||||||
Serial.println("BME/BMP/Si7021 Module data failed");
|
Serial.println("BME/BMP/Si7021 Module data failed");
|
||||||
@@ -281,16 +298,16 @@ namespace WX_Utils {
|
|||||||
return ".../...g...t...";
|
return ".../...g...t...";
|
||||||
} else {
|
} else {
|
||||||
String tempStr = generateTempString(((newTemp + Config.wxsensor.temperatureCorrection) * 1.8) + 32);
|
String tempStr = generateTempString(((newTemp + Config.wxsensor.temperatureCorrection) * 1.8) + 32);
|
||||||
|
|
||||||
String humStr;
|
String humStr;
|
||||||
if (wxModuleType == 1 || wxModuleType == 3 || wxModuleType == 4 || wxModuleType == 5) {
|
if (wxModuleType == 1 || wxModuleType == 3 || wxModuleType == 4 || wxModuleType == 5 || wxModuleType == 6) {
|
||||||
humStr = generateHumString(newHum);
|
humStr = generateHumString(newHum);
|
||||||
} else if (wxModuleType == 2) {
|
} else if (wxModuleType == 2) {
|
||||||
humStr = "..";
|
humStr = "..";
|
||||||
}
|
}
|
||||||
|
|
||||||
String presStr = (wxModuleType == 4 || wxModuleType == 5)
|
String presStr = (wxModuleType == 4 || wxModuleType == 5)
|
||||||
? "....."
|
? "....."
|
||||||
: generatePresString(newPress + getAltitudeCorrection() / CORRECTION_FACTOR);
|
: generatePresString(newPress + getAltitudeCorrection() / CORRECTION_FACTOR);
|
||||||
|
|
||||||
fifthLine = "BME-> ";
|
fifthLine = "BME-> ";
|
||||||
|
|||||||
@@ -19,6 +19,8 @@
|
|||||||
#ifndef BOARD_PINOUT_H_
|
#ifndef BOARD_PINOUT_H_
|
||||||
#define BOARD_PINOUT_H_
|
#define BOARD_PINOUT_H_
|
||||||
|
|
||||||
|
#define ESP32_C3
|
||||||
|
|
||||||
// LoRa Radio
|
// LoRa Radio
|
||||||
#define HAS_SX1268
|
#define HAS_SX1268
|
||||||
#define RADIO_HAS_XTAL
|
#define RADIO_HAS_XTAL
|
||||||
|
|||||||
@@ -4,6 +4,9 @@ board_build.mcu = esp32c3
|
|||||||
build_flags =
|
build_flags =
|
||||||
${common.build_flags}
|
${common.build_flags}
|
||||||
${common.usb_flags}
|
${common.usb_flags}
|
||||||
|
-D RADIOLIB_EXCLUDE_LR11X0=1
|
||||||
|
-D RADIOLIB_EXCLUDE_SX127X=1
|
||||||
|
-D RADIOLIB_EXCLUDE_SX128X=1
|
||||||
-D ESP32_C3_OctopusLab_LoRa
|
-D ESP32_C3_OctopusLab_LoRa
|
||||||
lib_deps =
|
lib_deps =
|
||||||
${common.lib_deps}
|
${common.lib_deps}
|
||||||
|
|||||||
@@ -19,9 +19,12 @@
|
|||||||
#ifndef BOARD_PINOUT_H_
|
#ifndef BOARD_PINOUT_H_
|
||||||
#define BOARD_PINOUT_H_
|
#define BOARD_PINOUT_H_
|
||||||
|
|
||||||
|
#define ESP32
|
||||||
|
|
||||||
// LoRa Radio
|
// LoRa Radio
|
||||||
#define HAS_SX1268
|
#define HAS_SX1268
|
||||||
#define HAS_1W_LORA
|
#define HAS_1W_LORA
|
||||||
|
#define HAS_TCXO
|
||||||
#define RADIO_SCLK_PIN 18
|
#define RADIO_SCLK_PIN 18
|
||||||
#define RADIO_MISO_PIN 19
|
#define RADIO_MISO_PIN 19
|
||||||
#define RADIO_MOSI_PIN 23
|
#define RADIO_MOSI_PIN 23
|
||||||
|
|||||||
@@ -2,6 +2,9 @@
|
|||||||
board = esp32dev
|
board = esp32dev
|
||||||
build_flags =
|
build_flags =
|
||||||
${common.build_flags}
|
${common.build_flags}
|
||||||
|
-D RADIOLIB_EXCLUDE_LR11X0=1
|
||||||
|
-D RADIOLIB_EXCLUDE_SX127X=1
|
||||||
|
-D RADIOLIB_EXCLUDE_SX128X=1
|
||||||
-D ESP32_DIY_1W_LoRa
|
-D ESP32_DIY_1W_LoRa
|
||||||
lib_deps =
|
lib_deps =
|
||||||
${common.lib_deps}
|
${common.lib_deps}
|
||||||
|
|||||||
@@ -19,9 +19,12 @@
|
|||||||
#ifndef BOARD_PINOUT_H_
|
#ifndef BOARD_PINOUT_H_
|
||||||
#define BOARD_PINOUT_H_
|
#define BOARD_PINOUT_H_
|
||||||
|
|
||||||
|
#define ESP32
|
||||||
|
|
||||||
// LoRa Radio
|
// LoRa Radio
|
||||||
#define HAS_SX1262
|
#define HAS_SX1262
|
||||||
#define HAS_1W_LORA
|
#define HAS_1W_LORA
|
||||||
|
#define HAS_TCXO
|
||||||
#define RADIO_SCLK_PIN 18
|
#define RADIO_SCLK_PIN 18
|
||||||
#define RADIO_MISO_PIN 19
|
#define RADIO_MISO_PIN 19
|
||||||
#define RADIO_MOSI_PIN 23
|
#define RADIO_MOSI_PIN 23
|
||||||
|
|||||||
@@ -2,6 +2,9 @@
|
|||||||
board = esp32dev
|
board = esp32dev
|
||||||
build_flags =
|
build_flags =
|
||||||
${common.build_flags}
|
${common.build_flags}
|
||||||
|
-D RADIOLIB_EXCLUDE_LR11X0=1
|
||||||
|
-D RADIOLIB_EXCLUDE_SX127X=1
|
||||||
|
-D RADIOLIB_EXCLUDE_SX128X=1
|
||||||
-D ESP32_DIY_1W_LoRa_915
|
-D ESP32_DIY_1W_LoRa_915
|
||||||
lib_deps =
|
lib_deps =
|
||||||
${common.lib_deps}
|
${common.lib_deps}
|
||||||
|
|||||||
@@ -19,6 +19,8 @@
|
|||||||
#ifndef BOARD_PINOUT_H_
|
#ifndef BOARD_PINOUT_H_
|
||||||
#define BOARD_PINOUT_H_
|
#define BOARD_PINOUT_H_
|
||||||
|
|
||||||
|
#define ESP32
|
||||||
|
|
||||||
// LoRa Radio
|
// LoRa Radio
|
||||||
#define HAS_LLCC68
|
#define HAS_LLCC68
|
||||||
#define HAS_1W_LORA
|
#define HAS_1W_LORA
|
||||||
|
|||||||
@@ -2,6 +2,9 @@
|
|||||||
board = esp32dev
|
board = esp32dev
|
||||||
build_flags =
|
build_flags =
|
||||||
${common.build_flags}
|
${common.build_flags}
|
||||||
|
-D RADIOLIB_EXCLUDE_LR11X0=1
|
||||||
|
-D RADIOLIB_EXCLUDE_SX127X=1
|
||||||
|
-D RADIOLIB_EXCLUDE_SX128X=1
|
||||||
-D ESP32_DIY_1W_LoRa_LLCC68
|
-D ESP32_DIY_1W_LoRa_LLCC68
|
||||||
lib_deps =
|
lib_deps =
|
||||||
${common.lib_deps}
|
${common.lib_deps}
|
||||||
|
|||||||
@@ -19,6 +19,8 @@
|
|||||||
#ifndef BOARD_PINOUT_H_
|
#ifndef BOARD_PINOUT_H_
|
||||||
#define BOARD_PINOUT_H_
|
#define BOARD_PINOUT_H_
|
||||||
|
|
||||||
|
#define ESP32
|
||||||
|
|
||||||
// LoRa Radio
|
// LoRa Radio
|
||||||
#define HAS_SX1268
|
#define HAS_SX1268
|
||||||
#define HAS_1W_LORA
|
#define HAS_1W_LORA
|
||||||
|
|||||||
@@ -2,6 +2,9 @@
|
|||||||
board = esp32dev
|
board = esp32dev
|
||||||
build_flags =
|
build_flags =
|
||||||
${common.build_flags}
|
${common.build_flags}
|
||||||
|
-D RADIOLIB_EXCLUDE_LR11X0=1
|
||||||
|
-D RADIOLIB_EXCLUDE_SX127X=1
|
||||||
|
-D RADIOLIB_EXCLUDE_SX128X=1
|
||||||
-D ESP32_DIY_1W_LoRa_Mesh_V1_2
|
-D ESP32_DIY_1W_LoRa_Mesh_V1_2
|
||||||
lib_deps =
|
lib_deps =
|
||||||
${common.lib_deps}
|
${common.lib_deps}
|
||||||
|
|||||||
@@ -19,6 +19,8 @@
|
|||||||
#ifndef BOARD_PINOUT_H_
|
#ifndef BOARD_PINOUT_H_
|
||||||
#define BOARD_PINOUT_H_
|
#define BOARD_PINOUT_H_
|
||||||
|
|
||||||
|
#define ESP32
|
||||||
|
|
||||||
// LoRa Radio
|
// LoRa Radio
|
||||||
#define HAS_SX1278
|
#define HAS_SX1278
|
||||||
#define RADIO_SCLK_PIN 5
|
#define RADIO_SCLK_PIN 5
|
||||||
|
|||||||
@@ -2,6 +2,9 @@
|
|||||||
board = esp32dev
|
board = esp32dev
|
||||||
build_flags =
|
build_flags =
|
||||||
${common.build_flags}
|
${common.build_flags}
|
||||||
|
-D RADIOLIB_EXCLUDE_LR11X0=1
|
||||||
|
-D RADIOLIB_EXCLUDE_SX126X=1
|
||||||
|
-D RADIOLIB_EXCLUDE_SX128X=1
|
||||||
-D ESP32_DIY_LoRa
|
-D ESP32_DIY_LoRa
|
||||||
lib_deps =
|
lib_deps =
|
||||||
${common.lib_deps}
|
${common.lib_deps}
|
||||||
|
|||||||
@@ -19,6 +19,8 @@
|
|||||||
#ifndef BOARD_PINOUT_H_
|
#ifndef BOARD_PINOUT_H_
|
||||||
#define BOARD_PINOUT_H_
|
#define BOARD_PINOUT_H_
|
||||||
|
|
||||||
|
#define ESP32
|
||||||
|
|
||||||
// LoRa Radio
|
// LoRa Radio
|
||||||
#define HAS_SX1276
|
#define HAS_SX1276
|
||||||
#define RADIO_SCLK_PIN 5
|
#define RADIO_SCLK_PIN 5
|
||||||
|
|||||||
@@ -2,6 +2,9 @@
|
|||||||
board = esp32dev
|
board = esp32dev
|
||||||
build_flags =
|
build_flags =
|
||||||
${common.build_flags}
|
${common.build_flags}
|
||||||
|
-D RADIOLIB_EXCLUDE_LR11X0=1
|
||||||
|
-D RADIOLIB_EXCLUDE_SX126X=1
|
||||||
|
-D RADIOLIB_EXCLUDE_SX128X=1
|
||||||
-D ESP32_DIY_LoRa_915
|
-D ESP32_DIY_LoRa_915
|
||||||
lib_deps =
|
lib_deps =
|
||||||
${common.lib_deps}
|
${common.lib_deps}
|
||||||
|
|||||||
@@ -19,6 +19,8 @@
|
|||||||
#ifndef BOARD_PINOUT_H_
|
#ifndef BOARD_PINOUT_H_
|
||||||
#define BOARD_PINOUT_H_
|
#define BOARD_PINOUT_H_
|
||||||
|
|
||||||
|
#define ESP32
|
||||||
|
|
||||||
// LoRa Radio
|
// LoRa Radio
|
||||||
#define HAS_SX1278
|
#define HAS_SX1278
|
||||||
#define RADIO_SCLK_PIN 18
|
#define RADIO_SCLK_PIN 18
|
||||||
|
|||||||
@@ -2,6 +2,9 @@
|
|||||||
board = esp32dev
|
board = esp32dev
|
||||||
build_flags =
|
build_flags =
|
||||||
${common.build_flags}
|
${common.build_flags}
|
||||||
|
-D RADIOLIB_EXCLUDE_LR11X0=1
|
||||||
|
-D RADIOLIB_EXCLUDE_SX126X=1
|
||||||
|
-D RADIOLIB_EXCLUDE_SX128X=1
|
||||||
-D ESP32_DIY_LoRa_A7670
|
-D ESP32_DIY_LoRa_A7670
|
||||||
lib_deps =
|
lib_deps =
|
||||||
${common.lib_deps}
|
${common.lib_deps}
|
||||||
|
|||||||
@@ -19,6 +19,8 @@
|
|||||||
#ifndef BOARD_PINOUT_H_
|
#ifndef BOARD_PINOUT_H_
|
||||||
#define BOARD_PINOUT_H_
|
#define BOARD_PINOUT_H_
|
||||||
|
|
||||||
|
#define ESP32
|
||||||
|
|
||||||
// LoRa Radio
|
// LoRa Radio
|
||||||
#define HAS_SX1276
|
#define HAS_SX1276
|
||||||
#define RADIO_SCLK_PIN 18
|
#define RADIO_SCLK_PIN 18
|
||||||
|
|||||||
@@ -2,6 +2,9 @@
|
|||||||
board = esp32dev
|
board = esp32dev
|
||||||
build_flags =
|
build_flags =
|
||||||
${common.build_flags}
|
${common.build_flags}
|
||||||
|
-D RADIOLIB_EXCLUDE_LR11X0=1
|
||||||
|
-D RADIOLIB_EXCLUDE_SX126X=1
|
||||||
|
-D RADIOLIB_EXCLUDE_SX128X=1
|
||||||
-D ESP32_DIY_LoRa_A7670_915
|
-D ESP32_DIY_LoRa_A7670_915
|
||||||
lib_deps =
|
lib_deps =
|
||||||
${common.lib_deps}
|
${common.lib_deps}
|
||||||
|
|||||||
@@ -19,6 +19,8 @@
|
|||||||
#ifndef BOARD_PINOUT_H_
|
#ifndef BOARD_PINOUT_H_
|
||||||
#define BOARD_PINOUT_H_
|
#define BOARD_PINOUT_H_
|
||||||
|
|
||||||
|
#define ESP32
|
||||||
|
|
||||||
// LoRa Radio
|
// LoRa Radio
|
||||||
#define HAS_SX1278
|
#define HAS_SX1278
|
||||||
#define RADIO_SCLK_PIN 36
|
#define RADIO_SCLK_PIN 36
|
||||||
|
|||||||
@@ -2,6 +2,9 @@
|
|||||||
board = esp32dev
|
board = esp32dev
|
||||||
build_flags =
|
build_flags =
|
||||||
${common.build_flags}
|
${common.build_flags}
|
||||||
|
-D RADIOLIB_EXCLUDE_LR11X0=1
|
||||||
|
-D RADIOLIB_EXCLUDE_SX126X=1
|
||||||
|
-D RADIOLIB_EXCLUDE_SX128X=1
|
||||||
-D LoRaHAM_V2
|
-D LoRaHAM_V2
|
||||||
lib_deps =
|
lib_deps =
|
||||||
${common.lib_deps}
|
${common.lib_deps}
|
||||||
|
|||||||
@@ -19,9 +19,12 @@
|
|||||||
#ifndef BOARD_PINOUT_H_
|
#ifndef BOARD_PINOUT_H_
|
||||||
#define BOARD_PINOUT_H_
|
#define BOARD_PINOUT_H_
|
||||||
|
|
||||||
|
#define ESP32
|
||||||
|
|
||||||
// LoRa Radio
|
// LoRa Radio
|
||||||
#define HAS_SX1268
|
#define HAS_SX1268
|
||||||
#define HAS_1W_LORA
|
#define HAS_1W_LORA
|
||||||
|
#define HAS_TCXO
|
||||||
#define RADIO_SCLK_PIN 18
|
#define RADIO_SCLK_PIN 18
|
||||||
#define RADIO_MISO_PIN 19
|
#define RADIO_MISO_PIN 19
|
||||||
#define RADIO_MOSI_PIN 23
|
#define RADIO_MOSI_PIN 23
|
||||||
|
|||||||
@@ -2,6 +2,9 @@
|
|||||||
board = esp32dev
|
board = esp32dev
|
||||||
build_flags =
|
build_flags =
|
||||||
${common.build_flags}
|
${common.build_flags}
|
||||||
|
-D RADIOLIB_EXCLUDE_LR11X0=1
|
||||||
|
-D RADIOLIB_EXCLUDE_SX127X=1
|
||||||
|
-D RADIOLIB_EXCLUDE_SX128X=1
|
||||||
-D OE5HWN_MeshCom
|
-D OE5HWN_MeshCom
|
||||||
lib_deps =
|
lib_deps =
|
||||||
${common.lib_deps}
|
${common.lib_deps}
|
||||||
|
|||||||
@@ -19,6 +19,8 @@
|
|||||||
#ifndef BOARD_PINOUT_H_
|
#ifndef BOARD_PINOUT_H_
|
||||||
#define BOARD_PINOUT_H_
|
#define BOARD_PINOUT_H_
|
||||||
|
|
||||||
|
#define ESP32_S3
|
||||||
|
|
||||||
// LoRa Radio
|
// LoRa Radio
|
||||||
#define HAS_SX1268
|
#define HAS_SX1268
|
||||||
#define RADIO_VCC_PIN 21
|
#define RADIO_VCC_PIN 21
|
||||||
|
|||||||
@@ -4,6 +4,9 @@ board_build.mcu = esp32s3
|
|||||||
build_flags =
|
build_flags =
|
||||||
${common.build_flags}
|
${common.build_flags}
|
||||||
${common.usb_flags}
|
${common.usb_flags}
|
||||||
|
-D RADIOLIB_EXCLUDE_LR11X0=1
|
||||||
|
-D RADIOLIB_EXCLUDE_SX127X=1
|
||||||
|
-D RADIOLIB_EXCLUDE_SX128X=1
|
||||||
-D LIGHTGATEWAY_1_0
|
-D LIGHTGATEWAY_1_0
|
||||||
lib_deps =
|
lib_deps =
|
||||||
${common.lib_deps}
|
${common.lib_deps}
|
||||||
|
|||||||
@@ -19,9 +19,12 @@
|
|||||||
#ifndef BOARD_PINOUT_H_
|
#ifndef BOARD_PINOUT_H_
|
||||||
#define BOARD_PINOUT_H_
|
#define BOARD_PINOUT_H_
|
||||||
|
|
||||||
|
#define ESP32_S3
|
||||||
|
|
||||||
// LoRa Radio
|
// LoRa Radio
|
||||||
#define HAS_SX1268
|
#define HAS_SX1268
|
||||||
#define HAS_1W_LORA
|
#define HAS_1W_LORA
|
||||||
|
#define HAS_TCXO
|
||||||
#define RADIO_VCC_PIN 21
|
#define RADIO_VCC_PIN 21
|
||||||
#define RADIO_SCLK_PIN 12
|
#define RADIO_SCLK_PIN 12
|
||||||
#define RADIO_MISO_PIN 13
|
#define RADIO_MISO_PIN 13
|
||||||
|
|||||||
@@ -4,6 +4,9 @@ board_build.mcu = esp32s3
|
|||||||
build_flags =
|
build_flags =
|
||||||
${common.build_flags}
|
${common.build_flags}
|
||||||
${common.usb_flags}
|
${common.usb_flags}
|
||||||
|
-D RADIOLIB_EXCLUDE_LR11X0=1
|
||||||
|
-D RADIOLIB_EXCLUDE_SX127X=1
|
||||||
|
-D RADIOLIB_EXCLUDE_SX128X=1
|
||||||
-D LIGHTGATEWAY_PLUS_1_0
|
-D LIGHTGATEWAY_PLUS_1_0
|
||||||
lib_deps =
|
lib_deps =
|
||||||
${common.lib_deps}
|
${common.lib_deps}
|
||||||
|
|||||||
@@ -19,6 +19,8 @@
|
|||||||
#ifndef BOARD_PINOUT_H_
|
#ifndef BOARD_PINOUT_H_
|
||||||
#define BOARD_PINOUT_H_
|
#define BOARD_PINOUT_H_
|
||||||
|
|
||||||
|
#define ESP32
|
||||||
|
|
||||||
// LoRa Radio
|
// LoRa Radio
|
||||||
#define HAS_SX1278
|
#define HAS_SX1278
|
||||||
#define RADIO_SCLK_PIN 5
|
#define RADIO_SCLK_PIN 5
|
||||||
|
|||||||
@@ -2,6 +2,9 @@
|
|||||||
board = esp32dev
|
board = esp32dev
|
||||||
build_flags =
|
build_flags =
|
||||||
${common.build_flags}
|
${common.build_flags}
|
||||||
|
-D RADIOLIB_EXCLUDE_LR11X0=1
|
||||||
|
-D RADIOLIB_EXCLUDE_SX126X=1
|
||||||
|
-D RADIOLIB_EXCLUDE_SX128X=1
|
||||||
-D TROY_LoRa_APRS
|
-D TROY_LoRa_APRS
|
||||||
lib_deps =
|
lib_deps =
|
||||||
${common.lib_deps}
|
${common.lib_deps}
|
||||||
|
|||||||
@@ -19,6 +19,8 @@
|
|||||||
#ifndef BOARD_PINOUT_H_
|
#ifndef BOARD_PINOUT_H_
|
||||||
#define BOARD_PINOUT_H_
|
#define BOARD_PINOUT_H_
|
||||||
|
|
||||||
|
#define ESP32
|
||||||
|
|
||||||
// LoRa Radio
|
// LoRa Radio
|
||||||
#define HAS_SX1278
|
#define HAS_SX1278
|
||||||
#define RADIO_SCLK_PIN 18
|
#define RADIO_SCLK_PIN 18
|
||||||
|
|||||||
@@ -2,6 +2,9 @@
|
|||||||
board = wemos_d1_uno32
|
board = wemos_d1_uno32
|
||||||
build_flags =
|
build_flags =
|
||||||
${common.build_flags}
|
${common.build_flags}
|
||||||
|
-D RADIOLIB_EXCLUDE_LR11X0=1
|
||||||
|
-D RADIOLIB_EXCLUDE_SX126X=1
|
||||||
|
-D RADIOLIB_EXCLUDE_SX128X=1
|
||||||
-D WEMOS_D1_R32_RA02
|
-D WEMOS_D1_R32_RA02
|
||||||
lib_deps =
|
lib_deps =
|
||||||
${common.lib_deps}
|
${common.lib_deps}
|
||||||
|
|||||||
@@ -19,6 +19,8 @@
|
|||||||
#ifndef BOARD_PINOUT_H_
|
#ifndef BOARD_PINOUT_H_
|
||||||
#define BOARD_PINOUT_H_
|
#define BOARD_PINOUT_H_
|
||||||
|
|
||||||
|
#define ESP32
|
||||||
|
|
||||||
// LoRa Radio
|
// LoRa Radio
|
||||||
#define HAS_SX1278
|
#define HAS_SX1278
|
||||||
#define RADIO_SCLK_PIN 15
|
#define RADIO_SCLK_PIN 15
|
||||||
|
|||||||
@@ -2,6 +2,9 @@
|
|||||||
board = lolin32
|
board = lolin32
|
||||||
build_flags =
|
build_flags =
|
||||||
${common.build_flags}
|
${common.build_flags}
|
||||||
|
-D RADIOLIB_EXCLUDE_LR11X0=1
|
||||||
|
-D RADIOLIB_EXCLUDE_SX126X=1
|
||||||
|
-D RADIOLIB_EXCLUDE_SX128X=1
|
||||||
-D WEMOS_LOLIN32_OLED_DIY_LoRa
|
-D WEMOS_LOLIN32_OLED_DIY_LoRa
|
||||||
lib_deps =
|
lib_deps =
|
||||||
${common.lib_deps}
|
${common.lib_deps}
|
||||||
|
|||||||
@@ -19,6 +19,8 @@
|
|||||||
#ifndef BOARD_PINOUT_H_
|
#ifndef BOARD_PINOUT_H_
|
||||||
#define BOARD_PINOUT_H_
|
#define BOARD_PINOUT_H_
|
||||||
|
|
||||||
|
#define ESP32_S2
|
||||||
|
|
||||||
// LoRa Radio
|
// LoRa Radio
|
||||||
#define HAS_SX1278
|
#define HAS_SX1278
|
||||||
#define RADIO_SCLK_PIN 36
|
#define RADIO_SCLK_PIN 36
|
||||||
|
|||||||
@@ -2,6 +2,9 @@
|
|||||||
board = lolin_s2_mini
|
board = lolin_s2_mini
|
||||||
build_flags =
|
build_flags =
|
||||||
${common.build_flags}
|
${common.build_flags}
|
||||||
|
-D RADIOLIB_EXCLUDE_LR11X0=1
|
||||||
|
-D RADIOLIB_EXCLUDE_SX126X=1
|
||||||
|
-D RADIOLIB_EXCLUDE_SX128X=1
|
||||||
-D WEMOS_S2_MINI_DIY_LoRa
|
-D WEMOS_S2_MINI_DIY_LoRa
|
||||||
lib_deps =
|
lib_deps =
|
||||||
${common.lib_deps}
|
${common.lib_deps}
|
||||||
|
|||||||
@@ -19,8 +19,11 @@
|
|||||||
#ifndef BOARD_PINOUT_H_
|
#ifndef BOARD_PINOUT_H_
|
||||||
#define BOARD_PINOUT_H_
|
#define BOARD_PINOUT_H_
|
||||||
|
|
||||||
|
#define ESP32_S3
|
||||||
|
|
||||||
// LoRa Radio
|
// LoRa Radio
|
||||||
#define HAS_SX1262
|
#define HAS_SX1262
|
||||||
|
#define HAS_TCXO
|
||||||
#define RADIO_SCLK_PIN 7
|
#define RADIO_SCLK_PIN 7
|
||||||
#define RADIO_MISO_PIN 8
|
#define RADIO_MISO_PIN 8
|
||||||
#define RADIO_MOSI_PIN 9
|
#define RADIO_MOSI_PIN 9
|
||||||
|
|||||||
@@ -3,6 +3,9 @@ board = seeed_xiao_esp32s3
|
|||||||
build_flags =
|
build_flags =
|
||||||
${common.build_flags}
|
${common.build_flags}
|
||||||
${common.usb_flags}
|
${common.usb_flags}
|
||||||
|
-D RADIOLIB_EXCLUDE_LR11X0=1
|
||||||
|
-D RADIOLIB_EXCLUDE_SX127X=1
|
||||||
|
-D RADIOLIB_EXCLUDE_SX128X=1
|
||||||
-D XIAO_ESP32S3_LORA
|
-D XIAO_ESP32S3_LORA
|
||||||
lib_deps =
|
lib_deps =
|
||||||
${common.lib_deps}
|
${common.lib_deps}
|
||||||
@@ -19,9 +19,12 @@
|
|||||||
#ifndef BOARD_PINOUT_H_
|
#ifndef BOARD_PINOUT_H_
|
||||||
#define BOARD_PINOUT_H_
|
#define BOARD_PINOUT_H_
|
||||||
|
|
||||||
|
#define ESP32_C3
|
||||||
|
|
||||||
// LoRa Radio
|
// LoRa Radio
|
||||||
#define HAS_SX1268
|
#define HAS_SX1268
|
||||||
#define HAS_1W_LORA
|
#define HAS_1W_LORA
|
||||||
|
#define HAS_TCXO
|
||||||
#define RADIO_SCLK_PIN 8
|
#define RADIO_SCLK_PIN 8
|
||||||
#define RADIO_MISO_PIN 9
|
#define RADIO_MISO_PIN 9
|
||||||
#define RADIO_MOSI_PIN 10
|
#define RADIO_MOSI_PIN 10
|
||||||
|
|||||||
@@ -4,6 +4,9 @@ board_build.mcu = esp32c3
|
|||||||
build_flags =
|
build_flags =
|
||||||
${common.build_flags}
|
${common.build_flags}
|
||||||
${common.usb_flags}
|
${common.usb_flags}
|
||||||
|
-D RADIOLIB_EXCLUDE_LR11X0=1
|
||||||
|
-D RADIOLIB_EXCLUDE_SX127X=1
|
||||||
|
-D RADIOLIB_EXCLUDE_SX128X=1
|
||||||
-D ESP32C3_DIY_1W_LoRa
|
-D ESP32C3_DIY_1W_LoRa
|
||||||
lib_deps =
|
lib_deps =
|
||||||
${common.lib_deps}
|
${common.lib_deps}
|
||||||
|
|||||||
@@ -19,9 +19,12 @@
|
|||||||
#ifndef BOARD_PINOUT_H_
|
#ifndef BOARD_PINOUT_H_
|
||||||
#define BOARD_PINOUT_H_
|
#define BOARD_PINOUT_H_
|
||||||
|
|
||||||
|
#define ESP32_C3
|
||||||
|
|
||||||
// LoRa Radio
|
// LoRa Radio
|
||||||
#define HAS_SX1262
|
#define HAS_SX1262
|
||||||
#define HAS_1W_LORA
|
#define HAS_1W_LORA
|
||||||
|
#define HAS_TCXO
|
||||||
#define RADIO_SCLK_PIN 8
|
#define RADIO_SCLK_PIN 8
|
||||||
#define RADIO_MISO_PIN 9
|
#define RADIO_MISO_PIN 9
|
||||||
#define RADIO_MOSI_PIN 10
|
#define RADIO_MOSI_PIN 10
|
||||||
|
|||||||
@@ -4,6 +4,9 @@ board_build.mcu = esp32c3
|
|||||||
build_flags =
|
build_flags =
|
||||||
${common.build_flags}
|
${common.build_flags}
|
||||||
${common.usb_flags}
|
${common.usb_flags}
|
||||||
|
-D RADIOLIB_EXCLUDE_LR11X0=1
|
||||||
|
-D RADIOLIB_EXCLUDE_SX127X=1
|
||||||
|
-D RADIOLIB_EXCLUDE_SX128X=1
|
||||||
-D ESP32C3_DIY_1W_LoRa_915
|
-D ESP32C3_DIY_1W_LoRa_915
|
||||||
lib_deps =
|
lib_deps =
|
||||||
${common.lib_deps}
|
${common.lib_deps}
|
||||||
|
|||||||
@@ -19,6 +19,8 @@
|
|||||||
#ifndef BOARD_PINOUT_H_
|
#ifndef BOARD_PINOUT_H_
|
||||||
#define BOARD_PINOUT_H_
|
#define BOARD_PINOUT_H_
|
||||||
|
|
||||||
|
#define ESP32
|
||||||
|
|
||||||
// LoRa Radio
|
// LoRa Radio
|
||||||
#define HAS_SX1278
|
#define HAS_SX1278
|
||||||
#define RADIO_SCLK_PIN 5
|
#define RADIO_SCLK_PIN 5
|
||||||
@@ -49,5 +51,6 @@
|
|||||||
#define INTERNAL_LED_PIN 25
|
#define INTERNAL_LED_PIN 25
|
||||||
#define BATTERY_PIN 37
|
#define BATTERY_PIN 37
|
||||||
#define ADC_CTRL 21
|
#define ADC_CTRL 21
|
||||||
|
#define ADC_CTRL_INVERTED 1
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
@@ -2,6 +2,9 @@
|
|||||||
board = ttgo-lora32-v21
|
board = ttgo-lora32-v21
|
||||||
build_flags =
|
build_flags =
|
||||||
${common.build_flags}
|
${common.build_flags}
|
||||||
|
-D RADIOLIB_EXCLUDE_LR11X0=1
|
||||||
|
-D RADIOLIB_EXCLUDE_SX126X=1
|
||||||
|
-D RADIOLIB_EXCLUDE_SX128X=1
|
||||||
-D HELTEC_V2
|
-D HELTEC_V2
|
||||||
lib_deps =
|
lib_deps =
|
||||||
${common.lib_deps}
|
${common.lib_deps}
|
||||||
|
|||||||
@@ -0,0 +1,56 @@
|
|||||||
|
/* Copyright (C) 2025 Ricardo Guzman - CA2RXU
|
||||||
|
*
|
||||||
|
* This file is part of LoRa APRS iGate.
|
||||||
|
*
|
||||||
|
* LoRa APRS iGate is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* LoRa APRS iGate is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with LoRa APRS iGate. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef BOARD_PINOUT_H_
|
||||||
|
#define BOARD_PINOUT_H_
|
||||||
|
|
||||||
|
#define ESP32
|
||||||
|
|
||||||
|
// LoRa Radio
|
||||||
|
#define HAS_SX1276
|
||||||
|
#define RADIO_SCLK_PIN 5
|
||||||
|
#define RADIO_MISO_PIN 19
|
||||||
|
#define RADIO_MOSI_PIN 27
|
||||||
|
#define RADIO_CS_PIN 18
|
||||||
|
#define RADIO_RST_PIN 14
|
||||||
|
#define RADIO_BUSY_PIN 26
|
||||||
|
#define RADIO_WAKEUP_PIN RADIO_BUSY_PIN
|
||||||
|
#define GPIO_WAKEUP_PIN GPIO_SEL_26
|
||||||
|
|
||||||
|
// I2C
|
||||||
|
#define USE_WIRE_WITH_OLED_PINS
|
||||||
|
|
||||||
|
// Display
|
||||||
|
#define HAS_DISPLAY
|
||||||
|
|
||||||
|
#undef OLED_SDA
|
||||||
|
#undef OLED_SCL
|
||||||
|
#undef OLED_RST
|
||||||
|
|
||||||
|
#define OLED_SDA 4
|
||||||
|
#define OLED_SCL 15
|
||||||
|
#define OLED_RST 16
|
||||||
|
#define OLED_DISPLAY_HAS_RST_PIN
|
||||||
|
|
||||||
|
// Aditional Config
|
||||||
|
#define INTERNAL_LED_PIN 25
|
||||||
|
#define BATTERY_PIN 37
|
||||||
|
#define ADC_CTRL 21
|
||||||
|
#define ADC_CTRL_INVERTED 1
|
||||||
|
|
||||||
|
#endif
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
[env:heltec-lora32-v2_915]
|
||||||
|
board = ttgo-lora32-v21
|
||||||
|
build_flags =
|
||||||
|
${common.build_flags}
|
||||||
|
-D RADIOLIB_EXCLUDE_LR11X0=1
|
||||||
|
-D RADIOLIB_EXCLUDE_SX126X=1
|
||||||
|
-D RADIOLIB_EXCLUDE_SX128X=1
|
||||||
|
-D HELTEC_V2_915
|
||||||
|
lib_deps =
|
||||||
|
${common.lib_deps}
|
||||||
|
${common.display_libs}
|
||||||
@@ -19,8 +19,11 @@
|
|||||||
#ifndef BOARD_PINOUT_H_
|
#ifndef BOARD_PINOUT_H_
|
||||||
#define BOARD_PINOUT_H_
|
#define BOARD_PINOUT_H_
|
||||||
|
|
||||||
|
#define ESP32_C3
|
||||||
|
|
||||||
// LoRa Radio
|
// LoRa Radio
|
||||||
#define HAS_SX1262
|
#define HAS_SX1262
|
||||||
|
#define HAS_TCXO
|
||||||
#define RADIO_SCLK_PIN 10
|
#define RADIO_SCLK_PIN 10
|
||||||
#define RADIO_MISO_PIN 6
|
#define RADIO_MISO_PIN 6
|
||||||
#define RADIO_MOSI_PIN 7
|
#define RADIO_MOSI_PIN 7
|
||||||
|
|||||||
@@ -3,6 +3,9 @@ board = esp32-c3-devkitm-1
|
|||||||
board_build.mcu = esp32c3
|
board_build.mcu = esp32c3
|
||||||
build_flags =
|
build_flags =
|
||||||
${common.build_flags}
|
${common.build_flags}
|
||||||
|
-D RADIOLIB_EXCLUDE_LR11X0=1
|
||||||
|
-D RADIOLIB_EXCLUDE_SX127X=1
|
||||||
|
-D RADIOLIB_EXCLUDE_SX128X=1
|
||||||
-D HELTEC_HTCT62
|
-D HELTEC_HTCT62
|
||||||
lib_deps =
|
lib_deps =
|
||||||
${common.lib_deps}
|
${common.lib_deps}
|
||||||
|
|||||||
@@ -0,0 +1,60 @@
|
|||||||
|
/* Copyright (C) 2025 Ricardo Guzman - CA2RXU
|
||||||
|
*
|
||||||
|
* This file is part of LoRa APRS iGate.
|
||||||
|
*
|
||||||
|
* LoRa APRS iGate is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* LoRa APRS iGate is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with LoRa APRS iGate. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef BOARD_PINOUT_H_
|
||||||
|
#define BOARD_PINOUT_H_
|
||||||
|
|
||||||
|
#define ESP32_S3
|
||||||
|
|
||||||
|
// LoRa Radio
|
||||||
|
#define HAS_SX1262
|
||||||
|
#define HAS_TCXO
|
||||||
|
#define RADIO_SCLK_PIN 9
|
||||||
|
#define RADIO_MISO_PIN 11
|
||||||
|
#define RADIO_MOSI_PIN 10
|
||||||
|
#define RADIO_CS_PIN 8
|
||||||
|
#define RADIO_RST_PIN 12
|
||||||
|
#define RADIO_DIO1_PIN 14
|
||||||
|
#define RADIO_BUSY_PIN 13
|
||||||
|
#define RADIO_WAKEUP_PIN RADIO_DIO1_PIN
|
||||||
|
#define GPIO_WAKEUP_PIN GPIO_SEL_14
|
||||||
|
|
||||||
|
// I2C
|
||||||
|
#define USE_WIRE1_WITH_BOARD_I2C_PINS
|
||||||
|
#define BOARD_I2C_SDA 39
|
||||||
|
#define BOARD_I2C_SCL 38
|
||||||
|
|
||||||
|
// Display
|
||||||
|
#define HAS_DISPLAY
|
||||||
|
#define HAS_EPAPER
|
||||||
|
#define EPAPER_BUSY 6
|
||||||
|
#define EPAPER_RST 5
|
||||||
|
#define EPAPER_DC 4
|
||||||
|
#define EPAPER_CS 3
|
||||||
|
#define EPAPER_SCL 2
|
||||||
|
#define EPAPER_SDA 1
|
||||||
|
|
||||||
|
// Aditional Config
|
||||||
|
#define INTERNAL_LED_PIN 45
|
||||||
|
#define BATTERY_PIN 7
|
||||||
|
#define ADC_CTRL 46
|
||||||
|
#define ADC_CTRL_INVERTED 0
|
||||||
|
#define VEXT_CTRL 18
|
||||||
|
#define VEXT_CTRL_INVERTED 0
|
||||||
|
|
||||||
|
#endif
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
[env:heltec_vision_master_e290]
|
||||||
|
board = esp32-s3-devkitc-1
|
||||||
|
board_build.mcu = esp32s3
|
||||||
|
build_flags =
|
||||||
|
${common.build_flags}
|
||||||
|
-D RADIOLIB_EXCLUDE_LR11X0=1
|
||||||
|
-D RADIOLIB_EXCLUDE_SX127X=1
|
||||||
|
-D RADIOLIB_EXCLUDE_SX128X=1
|
||||||
|
-D HELTEC_VM_E290
|
||||||
|
-D Vision_Master_E290
|
||||||
|
lib_deps =
|
||||||
|
${common.lib_deps}
|
||||||
|
https://github.com/todd-herbert/heltec-eink-modules.git
|
||||||
@@ -19,8 +19,11 @@
|
|||||||
#ifndef BOARD_PINOUT_H_
|
#ifndef BOARD_PINOUT_H_
|
||||||
#define BOARD_PINOUT_H_
|
#define BOARD_PINOUT_H_
|
||||||
|
|
||||||
|
#define ESP32_S3
|
||||||
|
|
||||||
// LoRa Radio
|
// LoRa Radio
|
||||||
#define HAS_SX1262
|
#define HAS_SX1262
|
||||||
|
#define HAS_TCXO
|
||||||
#define RADIO_SCLK_PIN 9
|
#define RADIO_SCLK_PIN 9
|
||||||
#define RADIO_MISO_PIN 11
|
#define RADIO_MISO_PIN 11
|
||||||
#define RADIO_MOSI_PIN 10
|
#define RADIO_MOSI_PIN 10
|
||||||
@@ -53,6 +56,8 @@
|
|||||||
#define INTERNAL_LED_PIN 35
|
#define INTERNAL_LED_PIN 35
|
||||||
#define BATTERY_PIN 1
|
#define BATTERY_PIN 1
|
||||||
#define VEXT_CTRL 36
|
#define VEXT_CTRL 36
|
||||||
|
#define VEXT_CTRL_INVERTED 0
|
||||||
#define ADC_CTRL 37
|
#define ADC_CTRL 37
|
||||||
|
#define ADC_CTRL_INVERTED 1
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
@@ -3,6 +3,9 @@ board = heltec_wifi_lora_32_V3
|
|||||||
board_build.mcu = esp32s3
|
board_build.mcu = esp32s3
|
||||||
build_flags =
|
build_flags =
|
||||||
${common.build_flags}
|
${common.build_flags}
|
||||||
|
-D RADIOLIB_EXCLUDE_LR11X0=1
|
||||||
|
-D RADIOLIB_EXCLUDE_SX127X=1
|
||||||
|
-D RADIOLIB_EXCLUDE_SX128X=1
|
||||||
-D HELTEC_V3
|
-D HELTEC_V3
|
||||||
lib_deps =
|
lib_deps =
|
||||||
${common.lib_deps}
|
${common.lib_deps}
|
||||||
|
|||||||
@@ -19,8 +19,11 @@
|
|||||||
#ifndef BOARD_PINOUT_H_
|
#ifndef BOARD_PINOUT_H_
|
||||||
#define BOARD_PINOUT_H_
|
#define BOARD_PINOUT_H_
|
||||||
|
|
||||||
|
#define ESP32_S3
|
||||||
|
|
||||||
// LoRa Radio
|
// LoRa Radio
|
||||||
#define HAS_SX1262
|
#define HAS_SX1262
|
||||||
|
#define HAS_TCXO
|
||||||
#define RADIO_SCLK_PIN 9
|
#define RADIO_SCLK_PIN 9
|
||||||
#define RADIO_MISO_PIN 11
|
#define RADIO_MISO_PIN 11
|
||||||
#define RADIO_MOSI_PIN 10
|
#define RADIO_MOSI_PIN 10
|
||||||
@@ -53,6 +56,8 @@
|
|||||||
#define INTERNAL_LED_PIN 35
|
#define INTERNAL_LED_PIN 35
|
||||||
#define BATTERY_PIN 1
|
#define BATTERY_PIN 1
|
||||||
#define VEXT_CTRL 36
|
#define VEXT_CTRL 36
|
||||||
|
#define VEXT_CTRL_INVERTED 1
|
||||||
#define ADC_CTRL 37
|
#define ADC_CTRL 37
|
||||||
|
#define ADC_CTRL_INVERTED 0
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
@@ -3,6 +3,9 @@ board = heltec_wifi_lora_32_V3
|
|||||||
board_build.mcu = esp32s3
|
board_build.mcu = esp32s3
|
||||||
build_flags =
|
build_flags =
|
||||||
${common.build_flags}
|
${common.build_flags}
|
||||||
|
-D RADIOLIB_EXCLUDE_LR11X0=1
|
||||||
|
-D RADIOLIB_EXCLUDE_SX127X=1
|
||||||
|
-D RADIOLIB_EXCLUDE_SX128X=1
|
||||||
-D HELTEC_V3_2
|
-D HELTEC_V3_2
|
||||||
lib_deps =
|
lib_deps =
|
||||||
${common.lib_deps}
|
${common.lib_deps}
|
||||||
|
|||||||
@@ -0,0 +1,79 @@
|
|||||||
|
/* Copyright (C) 2025 Ricardo Guzman - CA2RXU
|
||||||
|
*
|
||||||
|
* This file is part of LoRa APRS iGate.
|
||||||
|
*
|
||||||
|
* LoRa APRS iGate is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* LoRa APRS iGate is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with LoRa APRS iGate. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef BOARD_PINOUT_H_
|
||||||
|
#define BOARD_PINOUT_H_
|
||||||
|
|
||||||
|
#define ESP32_S3
|
||||||
|
|
||||||
|
// LoRa Radio
|
||||||
|
#define HAS_SX1262
|
||||||
|
#define HAS_TCXO
|
||||||
|
#define RADIO_SCLK_PIN 9
|
||||||
|
#define RADIO_MISO_PIN 11
|
||||||
|
#define RADIO_MOSI_PIN 10
|
||||||
|
#define RADIO_CS_PIN 8
|
||||||
|
#define RADIO_RST_PIN 12
|
||||||
|
#define RADIO_DIO1_PIN 14
|
||||||
|
#define RADIO_BUSY_PIN 13
|
||||||
|
#define RADIO_WAKEUP_PIN RADIO_DIO1_PIN
|
||||||
|
#define GPIO_WAKEUP_PIN GPIO_SEL_14
|
||||||
|
|
||||||
|
// I2C
|
||||||
|
#define USE_WIRE_WITH_OLED_PINS
|
||||||
|
#define USE_WIRE1_WITH_BOARD_I2C_PINS
|
||||||
|
#define BOARD_I2C_SDA 41
|
||||||
|
#define BOARD_I2C_SCL 42
|
||||||
|
|
||||||
|
// Display
|
||||||
|
#define HAS_DISPLAY
|
||||||
|
|
||||||
|
#undef OLED_SDA
|
||||||
|
#undef OLED_SCL
|
||||||
|
#undef OLED_RST
|
||||||
|
|
||||||
|
#define OLED_SDA 17
|
||||||
|
#define OLED_SCL 18
|
||||||
|
#define OLED_RST 21
|
||||||
|
#define OLED_DISPLAY_HAS_RST_PIN
|
||||||
|
|
||||||
|
// Aditional Config
|
||||||
|
#define INTERNAL_LED_PIN 35
|
||||||
|
#define BATTERY_PIN 1
|
||||||
|
#define VEXT_CTRL 36
|
||||||
|
#define VEXT_CTRL_INVERTED 1
|
||||||
|
#define ADC_CTRL 37
|
||||||
|
#define ADC_CTRL_INVERTED 0
|
||||||
|
|
||||||
|
// GPS ??
|
||||||
|
#define VGNS_CTRL 34 // cambiar nombre para prender GPS ?
|
||||||
|
// wakeup 40
|
||||||
|
// TX 39
|
||||||
|
// RX 38
|
||||||
|
// RST 42
|
||||||
|
// PPS 41
|
||||||
|
//#define GPS_L76K
|
||||||
|
|
||||||
|
// // active low, powers the oled display and the lora antenna boost
|
||||||
|
|
||||||
|
//#define LORA_PA_POWER 7 // power en
|
||||||
|
//#define LORA_PA_EN 2
|
||||||
|
//#define LORA_PA_TX_EN 46 // enable tx
|
||||||
|
|
||||||
|
|
||||||
|
#endif
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
[env:heltec_wifi_lora_32_V4]
|
||||||
|
board = heltec_wifi_lora_32_V3
|
||||||
|
board_build.mcu = esp32s3
|
||||||
|
build_flags =
|
||||||
|
${common.build_flags}
|
||||||
|
-D RADIOLIB_EXCLUDE_LR11X0=1
|
||||||
|
-D RADIOLIB_EXCLUDE_SX127X=1
|
||||||
|
-D RADIOLIB_EXCLUDE_SX128X=1
|
||||||
|
-D HELTEC_V4
|
||||||
|
lib_deps =
|
||||||
|
${common.lib_deps}
|
||||||
|
${common.display_libs}
|
||||||
@@ -19,6 +19,8 @@
|
|||||||
#ifndef BOARD_PINOUT_H_
|
#ifndef BOARD_PINOUT_H_
|
||||||
#define BOARD_PINOUT_H_
|
#define BOARD_PINOUT_H_
|
||||||
|
|
||||||
|
#define ESP32
|
||||||
|
|
||||||
// LoRa Radio
|
// LoRa Radio
|
||||||
#define HAS_SX1276
|
#define HAS_SX1276
|
||||||
#define RADIO_SCLK_PIN 5
|
#define RADIO_SCLK_PIN 5
|
||||||
|
|||||||
@@ -2,6 +2,9 @@
|
|||||||
board = esp32dev
|
board = esp32dev
|
||||||
build_flags =
|
build_flags =
|
||||||
${common.build_flags}
|
${common.build_flags}
|
||||||
|
-D RADIOLIB_EXCLUDE_LR11X0=1
|
||||||
|
-D RADIOLIB_EXCLUDE_SX126X=1
|
||||||
|
-D RADIOLIB_EXCLUDE_SX128X=1
|
||||||
-D HELTEC_WIRELESS_BRIDGE
|
-D HELTEC_WIRELESS_BRIDGE
|
||||||
lib_deps =
|
lib_deps =
|
||||||
${common.lib_deps}
|
${common.lib_deps}
|
||||||
|
|||||||
@@ -19,8 +19,11 @@
|
|||||||
#ifndef BOARD_PINOUT_H_
|
#ifndef BOARD_PINOUT_H_
|
||||||
#define BOARD_PINOUT_H_
|
#define BOARD_PINOUT_H_
|
||||||
|
|
||||||
|
#define ESP32_S3
|
||||||
|
|
||||||
// LoRa Radio
|
// LoRa Radio
|
||||||
#define HAS_SX1262
|
#define HAS_SX1262
|
||||||
|
#define HAS_TCXO
|
||||||
#define RADIO_SCLK_PIN 9
|
#define RADIO_SCLK_PIN 9
|
||||||
#define RADIO_MISO_PIN 11
|
#define RADIO_MISO_PIN 11
|
||||||
#define RADIO_MOSI_PIN 10
|
#define RADIO_MOSI_PIN 10
|
||||||
@@ -50,6 +53,8 @@
|
|||||||
#define INTERNAL_LED_PIN 18
|
#define INTERNAL_LED_PIN 18
|
||||||
#define BATTERY_PIN 20
|
#define BATTERY_PIN 20
|
||||||
#define ADC_CTRL 19
|
#define ADC_CTRL 19
|
||||||
|
#define ADC_CTRL_INVERTED 1
|
||||||
#define VEXT_CTRL 45
|
#define VEXT_CTRL 45
|
||||||
|
#define VEXT_CTRL_INVERTED 1
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
@@ -3,6 +3,9 @@ board = esp32-s3-devkitc-1
|
|||||||
board_build.mcu = esp32s3
|
board_build.mcu = esp32s3
|
||||||
build_flags =
|
build_flags =
|
||||||
${common.build_flags}
|
${common.build_flags}
|
||||||
|
-D RADIOLIB_EXCLUDE_LR11X0=1
|
||||||
|
-D RADIOLIB_EXCLUDE_SX127X=1
|
||||||
|
-D RADIOLIB_EXCLUDE_SX128X=1
|
||||||
-D HELTEC_WP_V1
|
-D HELTEC_WP_V1
|
||||||
-D WIRELESS_PAPER
|
-D WIRELESS_PAPER
|
||||||
lib_deps =
|
lib_deps =
|
||||||
|
|||||||
@@ -0,0 +1,60 @@
|
|||||||
|
/* Copyright (C) 2025 Ricardo Guzman - CA2RXU
|
||||||
|
*
|
||||||
|
* This file is part of LoRa APRS iGate.
|
||||||
|
*
|
||||||
|
* LoRa APRS iGate is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* LoRa APRS iGate is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with LoRa APRS iGate. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef BOARD_PINOUT_H_
|
||||||
|
#define BOARD_PINOUT_H_
|
||||||
|
|
||||||
|
#define ESP32_S3
|
||||||
|
|
||||||
|
// LoRa Radio
|
||||||
|
#define HAS_SX1262
|
||||||
|
#define HAS_TCXO
|
||||||
|
#define RADIO_SCLK_PIN 9
|
||||||
|
#define RADIO_MISO_PIN 11
|
||||||
|
#define RADIO_MOSI_PIN 10
|
||||||
|
#define RADIO_CS_PIN 8
|
||||||
|
#define RADIO_RST_PIN 12
|
||||||
|
#define RADIO_DIO1_PIN 14
|
||||||
|
#define RADIO_BUSY_PIN 13
|
||||||
|
#define RADIO_WAKEUP_PIN RADIO_DIO1_PIN
|
||||||
|
#define GPIO_WAKEUP_PIN GPIO_SEL_14
|
||||||
|
|
||||||
|
// I2C
|
||||||
|
#define USE_WIRE1_WITH_BOARD_I2C_PINS
|
||||||
|
#define BOARD_I2C_SDA 37
|
||||||
|
#define BOARD_I2C_SCL 36
|
||||||
|
|
||||||
|
// Display
|
||||||
|
#define HAS_DISPLAY
|
||||||
|
#define HAS_EPAPER
|
||||||
|
#define EPAPER_BUSY 7
|
||||||
|
#define EPAPER_RST 6
|
||||||
|
#define EPAPER_DC 5
|
||||||
|
#define EPAPER_CS 4
|
||||||
|
#define EPAPER_SCL 3
|
||||||
|
#define EPAPER_SDA 2
|
||||||
|
|
||||||
|
// Aditional Config
|
||||||
|
#define INTERNAL_LED_PIN 18
|
||||||
|
#define BATTERY_PIN 20
|
||||||
|
#define ADC_CTRL 19
|
||||||
|
#define ADC_CTRL_INVERTED 1
|
||||||
|
#define VEXT_CTRL 45
|
||||||
|
#define VEXT_CTRL_INVERTED 1
|
||||||
|
|
||||||
|
#endif
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
[env:heltec_wireless_paper_v1_2]
|
||||||
|
board = esp32-s3-devkitc-1
|
||||||
|
board_build.mcu = esp32s3
|
||||||
|
build_flags =
|
||||||
|
${common.build_flags}
|
||||||
|
-D RADIOLIB_EXCLUDE_LR11X0=1
|
||||||
|
-D RADIOLIB_EXCLUDE_SX127X=1
|
||||||
|
-D RADIOLIB_EXCLUDE_SX128X=1
|
||||||
|
-D HELTEC_WP_V1_2
|
||||||
|
-D WIRELESS_PAPER
|
||||||
|
-D V1_2
|
||||||
|
lib_deps =
|
||||||
|
${common.lib_deps}
|
||||||
|
https://github.com/todd-herbert/heltec-eink-modules.git
|
||||||
@@ -19,8 +19,11 @@
|
|||||||
#ifndef BOARD_PINOUT_H_
|
#ifndef BOARD_PINOUT_H_
|
||||||
#define BOARD_PINOUT_H_
|
#define BOARD_PINOUT_H_
|
||||||
|
|
||||||
|
#define ESP32_S3
|
||||||
|
|
||||||
// LoRa Radio
|
// LoRa Radio
|
||||||
#define HAS_SX1262
|
#define HAS_SX1262
|
||||||
|
#define HAS_TCXO
|
||||||
#define RADIO_SCLK_PIN 9
|
#define RADIO_SCLK_PIN 9
|
||||||
#define RADIO_MISO_PIN 11
|
#define RADIO_MISO_PIN 11
|
||||||
#define RADIO_MOSI_PIN 10
|
#define RADIO_MOSI_PIN 10
|
||||||
@@ -49,8 +52,10 @@
|
|||||||
// Aditional Config
|
// Aditional Config
|
||||||
#define INTERNAL_LED_PIN 35
|
#define INTERNAL_LED_PIN 35
|
||||||
#define BATTERY_PIN 1
|
#define BATTERY_PIN 1
|
||||||
#define VEXT_CTRL 36
|
|
||||||
#define ADC_CTRL 37
|
#define ADC_CTRL 37
|
||||||
|
#define VEXT_CTRL 36
|
||||||
|
#define VEXT_CTRL_INVERTED 1
|
||||||
|
|
||||||
#define BOARD_I2C_SDA 41
|
#define BOARD_I2C_SDA 41
|
||||||
#define BOARD_I2C_SCL 42
|
#define BOARD_I2C_SCL 42
|
||||||
|
|
||||||
|
|||||||
@@ -3,6 +3,9 @@ board = esp32-s3-devkitc-1
|
|||||||
board_build.mcu = esp32s3
|
board_build.mcu = esp32s3
|
||||||
build_flags =
|
build_flags =
|
||||||
${common.build_flags}
|
${common.build_flags}
|
||||||
|
-D RADIOLIB_EXCLUDE_LR11X0=1
|
||||||
|
-D RADIOLIB_EXCLUDE_SX127X=1
|
||||||
|
-D RADIOLIB_EXCLUDE_SX128X=1
|
||||||
-D HELTEC_WS
|
-D HELTEC_WS
|
||||||
lib_deps =
|
lib_deps =
|
||||||
${common.lib_deps}
|
${common.lib_deps}
|
||||||
|
|||||||
@@ -19,8 +19,11 @@
|
|||||||
#ifndef BOARD_PINOUT_H_
|
#ifndef BOARD_PINOUT_H_
|
||||||
#define BOARD_PINOUT_H_
|
#define BOARD_PINOUT_H_
|
||||||
|
|
||||||
|
#define ESP32_S3
|
||||||
|
|
||||||
// LoRa Radio
|
// LoRa Radio
|
||||||
#define HAS_SX1262
|
#define HAS_SX1262
|
||||||
|
#define HAS_TCXO
|
||||||
#define RADIO_SCLK_PIN 9
|
#define RADIO_SCLK_PIN 9
|
||||||
#define RADIO_MISO_PIN 11
|
#define RADIO_MISO_PIN 11
|
||||||
#define RADIO_MOSI_PIN 10
|
#define RADIO_MOSI_PIN 10
|
||||||
@@ -39,7 +42,9 @@
|
|||||||
// Aditional Config
|
// Aditional Config
|
||||||
#define INTERNAL_LED_PIN 35
|
#define INTERNAL_LED_PIN 35
|
||||||
#define BATTERY_PIN 1
|
#define BATTERY_PIN 1
|
||||||
#define VEXT_CTRL 36
|
|
||||||
#define ADC_CTRL 37
|
#define ADC_CTRL 37
|
||||||
|
#define ADC_CTRL_INVERTED 1
|
||||||
|
#define VEXT_CTRL 36
|
||||||
|
#define VEXT_CTRL_INVERTED 1
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
@@ -3,6 +3,9 @@ board = esp32-s3-devkitc-1
|
|||||||
board_build.mcu = esp32s3
|
board_build.mcu = esp32s3
|
||||||
build_flags =
|
build_flags =
|
||||||
${common.build_flags}
|
${common.build_flags}
|
||||||
|
-D RADIOLIB_EXCLUDE_LR11X0=1
|
||||||
|
-D RADIOLIB_EXCLUDE_SX127X=1
|
||||||
|
-D RADIOLIB_EXCLUDE_SX128X=1
|
||||||
-D HELTEC_WSL_V3
|
-D HELTEC_WSL_V3
|
||||||
lib_deps =
|
lib_deps =
|
||||||
${common.lib_deps}
|
${common.lib_deps}
|
||||||
@@ -19,8 +19,11 @@
|
|||||||
#ifndef BOARD_PINOUT_H_
|
#ifndef BOARD_PINOUT_H_
|
||||||
#define BOARD_PINOUT_H_
|
#define BOARD_PINOUT_H_
|
||||||
|
|
||||||
|
#define ESP32_S3
|
||||||
|
|
||||||
// LoRa Radio
|
// LoRa Radio
|
||||||
#define HAS_SX1262
|
#define HAS_SX1262
|
||||||
|
#define HAS_TCXO
|
||||||
#define RADIO_SCLK_PIN 9
|
#define RADIO_SCLK_PIN 9
|
||||||
#define RADIO_MISO_PIN 11
|
#define RADIO_MISO_PIN 11
|
||||||
#define RADIO_MOSI_PIN 10
|
#define RADIO_MOSI_PIN 10
|
||||||
@@ -43,7 +46,9 @@
|
|||||||
// Aditional Config
|
// Aditional Config
|
||||||
#define INTERNAL_LED_PIN 35
|
#define INTERNAL_LED_PIN 35
|
||||||
#define BATTERY_PIN 1
|
#define BATTERY_PIN 1
|
||||||
#define VEXT_CTRL 36
|
|
||||||
#define ADC_CTRL 37
|
#define ADC_CTRL 37
|
||||||
|
#define ADC_CTRL_INVERTED 1
|
||||||
|
#define VEXT_CTRL 36
|
||||||
|
#define VEXT_CTRL_INVERTED 1
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
@@ -3,6 +3,9 @@ board = esp32-s3-devkitc-1
|
|||||||
board_build.mcu = esp32s3
|
board_build.mcu = esp32s3
|
||||||
build_flags =
|
build_flags =
|
||||||
${common.build_flags}
|
${common.build_flags}
|
||||||
|
-D RADIOLIB_EXCLUDE_LR11X0=1
|
||||||
|
-D RADIOLIB_EXCLUDE_SX127X=1
|
||||||
|
-D RADIOLIB_EXCLUDE_SX128X=1
|
||||||
-D HELTEC_WSL_V3_DISPLAY
|
-D HELTEC_WSL_V3_DISPLAY
|
||||||
lib_deps =
|
lib_deps =
|
||||||
${common.lib_deps}
|
${common.lib_deps}
|
||||||
@@ -19,8 +19,11 @@
|
|||||||
#ifndef BOARD_PINOUT_H_
|
#ifndef BOARD_PINOUT_H_
|
||||||
#define BOARD_PINOUT_H_
|
#define BOARD_PINOUT_H_
|
||||||
|
|
||||||
|
#define ESP32_S3
|
||||||
|
|
||||||
// LoRa Radio
|
// LoRa Radio
|
||||||
#define HAS_SX1262
|
#define HAS_SX1262
|
||||||
|
#define HAS_TCXO
|
||||||
#define RADIO_SCLK_PIN 9 // SX1262 SCK
|
#define RADIO_SCLK_PIN 9 // SX1262 SCK
|
||||||
#define RADIO_MISO_PIN 11 // SX1262 MISO
|
#define RADIO_MISO_PIN 11 // SX1262 MISO
|
||||||
#define RADIO_MOSI_PIN 10 // SX1262 MOSI
|
#define RADIO_MOSI_PIN 10 // SX1262 MOSI
|
||||||
@@ -42,9 +45,11 @@
|
|||||||
|
|
||||||
// Aditional Config
|
// Aditional Config
|
||||||
#define INTERNAL_LED_PIN 18
|
#define INTERNAL_LED_PIN 18
|
||||||
#define BATTERY_PIN 1
|
#define BATTERY_PIN 1
|
||||||
#define ADC_CTRL 2 // HELTEC Wireless Tracker ADC_CTRL = HIGH powers the voltage divider to read BatteryPin. Only on V05 = V1.1
|
|
||||||
#define VEXT_CTRL 3 // To turn on GPS and TFT
|
#define VEXT_CTRL 3 // To turn on GPS and TFT
|
||||||
|
#define VEXT_CTRL_INVERTED 0
|
||||||
|
#define ADC_CTRL 2 // HELTEC Wireless Tracker ADC_CTRL = HIGH powers the voltage divider to read BatteryPin. Only on V05 = V1.1
|
||||||
|
#define ADC_CTRL_INVERTED 0
|
||||||
|
|
||||||
// GPS
|
// GPS
|
||||||
#define HAS_GPS
|
#define HAS_GPS
|
||||||
|
|||||||
@@ -27,6 +27,9 @@ build_flags =
|
|||||||
-D LOAD_FONT8
|
-D LOAD_FONT8
|
||||||
-D SPI_FREQUENCY=27000000
|
-D SPI_FREQUENCY=27000000
|
||||||
-D USE_HSPI_PORT
|
-D USE_HSPI_PORT
|
||||||
|
-D RADIOLIB_EXCLUDE_LR11X0=1
|
||||||
|
-D RADIOLIB_EXCLUDE_SX127X=1
|
||||||
|
-D RADIOLIB_EXCLUDE_SX128X=1
|
||||||
lib_deps =
|
lib_deps =
|
||||||
${common.lib_deps}
|
${common.lib_deps}
|
||||||
bodmer/TFT_eSPI @ 2.5.43
|
bodmer/TFT_eSPI @ 2.5.43
|
||||||
@@ -19,6 +19,8 @@
|
|||||||
#ifndef BOARD_PINOUT_H_
|
#ifndef BOARD_PINOUT_H_
|
||||||
#define BOARD_PINOUT_H_
|
#define BOARD_PINOUT_H_
|
||||||
|
|
||||||
|
#define ESP32
|
||||||
|
|
||||||
// LoRa Radio
|
// LoRa Radio
|
||||||
#define HAS_SX1278
|
#define HAS_SX1278
|
||||||
#define RADIO_SCLK_PIN 5
|
#define RADIO_SCLK_PIN 5
|
||||||
|
|||||||
@@ -2,6 +2,9 @@
|
|||||||
board = ttgo-lora32-v21
|
board = ttgo-lora32-v21
|
||||||
build_flags =
|
build_flags =
|
||||||
${common.build_flags}
|
${common.build_flags}
|
||||||
|
-D RADIOLIB_EXCLUDE_LR11X0=1
|
||||||
|
-D RADIOLIB_EXCLUDE_SX126X=1
|
||||||
|
-D RADIOLIB_EXCLUDE_SX128X=1
|
||||||
-D TTGO_LORA32_V2_1
|
-D TTGO_LORA32_V2_1
|
||||||
lib_deps =
|
lib_deps =
|
||||||
${common.lib_deps}
|
${common.lib_deps}
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user