Compare commits
60 Commits
RxTxFreq
...
decodingFi
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
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 | ||
|
|
8add599838 | ||
|
|
83ec2265c6 | ||
|
|
bec4f4f473 | ||
|
|
87a67cd2c9 | ||
|
|
4e48b2d02d | ||
|
|
607277bfe9 | ||
|
|
c2f8596667 |
4
.github/workflows/build.yml
vendored
@@ -71,6 +71,10 @@ jobs:
|
||||
chip: esp32c3
|
||||
- name: heltec_wireless_paper_v1
|
||||
chip: esp32s3
|
||||
- name: heltec_wireless_paper_v1_2
|
||||
chip: esp32s3
|
||||
- name: heltec_vision_master_e290
|
||||
chip: esp32s3
|
||||
- name: OE5HWN_MeshCom
|
||||
chip: esp32
|
||||
- name: WEMOS-LOLIN32-OLED-DIY
|
||||
|
||||
18
README.md
@@ -2,7 +2,7 @@
|
||||
|
||||
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>))__
|
||||
<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://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:
|
||||
|
||||
[<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)
|
||||
|
||||
____________________________________________________
|
||||
|
||||
@@ -32,7 +32,7 @@ ____________________________________________________
|
||||
|
||||
- T-Deck Plus (and also regular T-Deck with/without GPS).
|
||||
|
||||
- HELTEC V2, V3, V3.2, T114, Wireless Stick, Wireless Stick Lite, HT-CT62, Wireless Tracker, Wireless Paper.
|
||||
- HELTEC V2, V3, V3.2, T114, Wireless Stick, Wireless Stick Lite V3/V3.2, HT-CT62, Wireless Tracker, Wireless Paper.
|
||||
|
||||
- RAK Wireless 4631 + 19007(or 19003)
|
||||
|
||||
@@ -51,9 +51,15 @@ ____________________________________________________
|
||||
<br />
|
||||
|
||||
# Timeline (Versions):
|
||||
|
||||
- 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 Startup Delay to allow the Router/Modem to start WiFiAP before connecting.
|
||||
- 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-10 Changed 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-09 MQTT added (pub+sub), Status defined by Op now and many fixes more.
|
||||
- 2025-06-20 Digipeaters now with updated EcoMode (Board Sleeps until packet Rx reducing current consumption to almost 10% at idle).
|
||||
|
||||
@@ -2,32 +2,33 @@
|
||||
build_flags =
|
||||
-Werror -Wall
|
||||
-DELEGANTOTA_USE_ASYNC_WEBSERVER=1
|
||||
-DRADIOLIB_EXCLUDE_CC1101=1
|
||||
-DRADIOLIB_EXCLUDE_NRF24=1
|
||||
-DRADIOLIB_EXCLUDE_RF69=1
|
||||
-DRADIOLIB_EXCLUDE_SX1231=1
|
||||
-DRADIOLIB_EXCLUDE_SX1233=1
|
||||
-DRADIOLIB_EXCLUDE_SI443X=1
|
||||
-DRADIOLIB_EXCLUDE_RFM2X=1
|
||||
-DRADIOLIB_EXCLUDE_AFSK=1
|
||||
-DRADIOLIB_EXCLUDE_BELL=1
|
||||
-DRADIOLIB_EXCLUDE_HELLSCHREIBER=1
|
||||
-DRADIOLIB_EXCLUDE_MORSE=1
|
||||
-DRADIOLIB_EXCLUDE_RTTY=1
|
||||
-DRADIOLIB_EXCLUDE_SSTV=1
|
||||
-DRADIOLIB_EXCLUDE_AX25=1
|
||||
-DRADIOLIB_EXCLUDE_DIRECT_RECEIVE=1
|
||||
-DRADIOLIB_EXCLUDE_BELL=1
|
||||
-DRADIOLIB_EXCLUDE_PAGER=1
|
||||
-DRADIOLIB_EXCLUDE_FSK4=1
|
||||
-DRADIOLIB_EXCLUDE_APRS=1
|
||||
-DRADIOLIB_EXCLUDE_LORAWAN=1
|
||||
-D RADIOLIB_EXCLUDE_CC1101=1
|
||||
-D RADIOLIB_EXCLUDE_RF69=1
|
||||
-D RADIOLIB_EXCLUDE_RFM2X=1
|
||||
-D RADIOLIB_EXCLUDE_SX1231=1
|
||||
-D RADIOLIB_EXCLUDE_SX1233=1
|
||||
-D RADIOLIB_EXCLUDE_SI443X=1
|
||||
-D RADIOLIB_EXCLUDE_NRF24=1
|
||||
-D RADIOLIB_EXCLUDE_AFSK=1
|
||||
-D RADIOLIB_EXCLUDE_APRS=1
|
||||
-D RADIOLIB_EXCLUDE_AX25=1
|
||||
-D RADIOLIB_EXCLUDE_BELL=1
|
||||
-D RADIOLIB_EXCLUDE_FSK4=1
|
||||
-D RADIOLIB_EXCLUDE_HELLSCHREIBER=1
|
||||
-D RADIOLIB_EXCLUDE_LORAWAN=1
|
||||
-D RADIOLIB_EXCLUDE_MORSE=1
|
||||
-D RADIOLIB_EXCLUDE_PAGER=1
|
||||
-D RADIOLIB_EXCLUDE_DIRECT_RECEIVE=1
|
||||
-D RADIOLIB_EXCLUDE_RTTY=1
|
||||
-D RADIOLIB_EXCLUDE_SSTV=1
|
||||
-I variants/${PIOENV}
|
||||
lib_deps =
|
||||
adafruit/Adafruit Unified Sensor @ 1.1.14
|
||||
adafruit/Adafruit AHTX0 @ 2.0.5
|
||||
adafruit/Adafruit BME280 Library @ 2.2.4
|
||||
adafruit/Adafruit BMP280 Library @ 2.6.8
|
||||
adafruit/Adafruit BME680 Library @ 2.0.4
|
||||
adafruit/Adafruit INA219 @ 1.2.3
|
||||
adafruit/Adafruit Si7021 Library @ 1.5.3
|
||||
arduino-libraries/NTPClient @ 3.2.1
|
||||
ayushsharma82/ElegantOTA @ 3.1.5
|
||||
@@ -37,7 +38,7 @@ lib_deps =
|
||||
mathieucarbou/AsyncTCP @ 3.2.5
|
||||
mathieucarbou/ESPAsyncWebServer @ 3.2.3
|
||||
mikalhart/TinyGPSPlus @ 1.0.3
|
||||
richonguzman/APRSPacketLib @1.0.0
|
||||
richonguzman/APRSPacketLib @ 1.0.4
|
||||
display_libs =
|
||||
adafruit/Adafruit GFX Library @ 1.11.9
|
||||
adafruit/Adafruit SSD1306 @ 2.5.10
|
||||
|
||||
@@ -17,10 +17,11 @@
|
||||
"path": "WIDE1-1",
|
||||
"sendViaAPRSIS": false,
|
||||
"sendViaRF": false,
|
||||
"beaconFreq": 1,
|
||||
"statusActive": false,
|
||||
"statusPacket": "",
|
||||
"gpsActive": false,
|
||||
"gpsAmbiguity": false
|
||||
"ambiguityLevel": 0
|
||||
},
|
||||
"aprs_is": {
|
||||
"active": false,
|
||||
@@ -35,8 +36,7 @@
|
||||
"blacklist": "",
|
||||
"digi": {
|
||||
"mode": 0,
|
||||
"ecoMode": 0,
|
||||
"beaconOnRxFreq": false
|
||||
"ecoMode": 0
|
||||
},
|
||||
"lora": {
|
||||
"rxActive": true,
|
||||
@@ -61,11 +61,12 @@
|
||||
"monitorInternalVoltage": false,
|
||||
"internalSleepVoltage": 2.9,
|
||||
"sendExternalVoltage": false,
|
||||
"externalVoltagePin": 34,
|
||||
"monitorExternalVoltage": false,
|
||||
"externalSleepVoltage": 10.9,
|
||||
"useExternalI2CSensor": false,
|
||||
"voltageDividerR1": 100.0,
|
||||
"voltageDividerR2": 27.0,
|
||||
"externalVoltagePin": 34,
|
||||
"sendVoltageAsTelemetry": false
|
||||
},
|
||||
"wxsensor": {
|
||||
@@ -82,7 +83,8 @@
|
||||
"tnc": {
|
||||
"enableServer": false,
|
||||
"enableSerial": false,
|
||||
"acceptOwn": false
|
||||
"acceptOwn": false,
|
||||
"aprsBrigdeActive": false
|
||||
},
|
||||
"mqtt": {
|
||||
"active": false,
|
||||
|
||||
@@ -144,8 +144,7 @@
|
||||
name="beacon.comment"
|
||||
id="beacon.comment"
|
||||
class="form-control"
|
||||
placeholder="LoRa APRS"
|
||||
required=""
|
||||
placeholder=""
|
||||
/>
|
||||
</div>
|
||||
<div class="col-12 mt-3">
|
||||
@@ -189,18 +188,10 @@
|
||||
name="action.symbol"
|
||||
id="action.symbol"
|
||||
>
|
||||
<option value="L#">
|
||||
Green star with L
|
||||
</option>
|
||||
<option value="L_">
|
||||
Blue circle with L
|
||||
</option>
|
||||
<option value="L&">
|
||||
Black diamond with L
|
||||
</option>
|
||||
<option value="La">
|
||||
Red diamond with L
|
||||
</option>
|
||||
<option value="L#">Green star with L</option>
|
||||
<option value="L_">Blue circle with L</option>
|
||||
<option value="L&">Black diamond with L</option>
|
||||
<option value="La" selected>Red diamond with L</option>
|
||||
</select>
|
||||
</div>
|
||||
<div
|
||||
@@ -567,11 +558,28 @@
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-6 d-grid gap-2">
|
||||
<button class="btn btn-primary" id="send-beacon">Send beacon now</button>
|
||||
</div>
|
||||
<div class="row mt-3">
|
||||
<div class="col-6">
|
||||
<button class="btn btn-primary form-control h-100" id="send-beacon">Send beacon now</button>
|
||||
</div>
|
||||
<div class="col-6">
|
||||
<label
|
||||
for="beacon.beaconFreq"
|
||||
class="form-label">
|
||||
<small>(Select LoRa Beacon Frequency)</small>
|
||||
</label>
|
||||
<select
|
||||
class="form-select form-select"
|
||||
name="beacon.beaconFreq"
|
||||
id="beacon.beaconFreq"
|
||||
>
|
||||
<option value="0">Beacon on Rx Freq</option>
|
||||
<option value="1">Beacon on Tx Freq</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mt-4">
|
||||
<div class="row mt-3">
|
||||
<div class="col-6">
|
||||
<label
|
||||
for="beacon.interval"
|
||||
@@ -594,6 +602,23 @@
|
||||
</span>
|
||||
</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 class="col-12 mt-3">
|
||||
<div class="form-check form-switch">
|
||||
@@ -610,21 +635,6 @@
|
||||
</label>
|
||||
</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>
|
||||
<hr>
|
||||
@@ -646,7 +656,7 @@
|
||||
</svg>
|
||||
Black List
|
||||
</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 class="col-9">
|
||||
<div class="row">
|
||||
@@ -702,15 +712,9 @@
|
||||
name="digi.mode"
|
||||
id="digi.mode"
|
||||
>
|
||||
<option value="0">
|
||||
OFF
|
||||
</option>
|
||||
<option value="2">
|
||||
WIDE1 (fill-in) Digi
|
||||
</option>
|
||||
<option value="3">
|
||||
WIDE2 (+WIDE1) Digi
|
||||
</option>
|
||||
<option value="0" selected>OFF</option>
|
||||
<option value="2">WIDE1 (fill-in) Digi</option>
|
||||
<option value="3">WIDE2 (+WIDE1) Digi</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-12 mt-3">
|
||||
@@ -727,37 +731,9 @@
|
||||
name="digi.ecoMode"
|
||||
id="digi.ecoMode"
|
||||
>
|
||||
<option value="0">
|
||||
OFF (Normal Mode - WiFiAP and Serial Output 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>
|
||||
</div>
|
||||
<div class="col-12 mt-3">
|
||||
<label
|
||||
for="digi.beaconOnRxFreq"
|
||||
class="form-label"
|
||||
>Digipeater Beacon Frequency
|
||||
<small
|
||||
>(If Rx Freq different from Tx Freq).</small
|
||||
></label
|
||||
>
|
||||
<select
|
||||
class="form-select form-select"
|
||||
name="digi.beaconOnRxFreq"
|
||||
id="digi.beaconOnRxFreq"
|
||||
>
|
||||
<option value="false">
|
||||
Beacon on Tx Freq
|
||||
</option>
|
||||
<option value="true">
|
||||
Beacon on Rx Freq
|
||||
</option>
|
||||
<option value="0" selected>OFF (Normal Mode - WiFiAP and Serial Output 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>
|
||||
</div>
|
||||
</div>
|
||||
@@ -1220,7 +1196,20 @@
|
||||
>Send External Voltage</label
|
||||
>
|
||||
</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
|
||||
type="checkbox"
|
||||
name="battery.monitorExternalVoltage"
|
||||
@@ -1512,25 +1501,7 @@
|
||||
</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">
|
||||
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="col-6">
|
||||
<div class="form-check form-switch">
|
||||
<input
|
||||
type="checkbox"
|
||||
@@ -1545,7 +1516,24 @@
|
||||
>
|
||||
</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">
|
||||
<input
|
||||
type="checkbox"
|
||||
@@ -1560,6 +1548,21 @@
|
||||
>
|
||||
</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>
|
||||
@@ -2019,6 +2022,7 @@
|
||||
name="remoteManagement.managers"
|
||||
id="remoteManagement.managers"
|
||||
class="form-control"
|
||||
oninput="this.value = this.value.toUpperCase();"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -119,7 +119,11 @@ function loadSettings(settings) {
|
||||
document.getElementById("beacon.interval").value = settings.beacon.interval;
|
||||
document.getElementById("other.rememberStationTime").value = settings.other.rememberStationTime;
|
||||
document.getElementById("beacon.sendViaAPRSIS").checked = settings.beacon.sendViaAPRSIS;
|
||||
|
||||
document.getElementById("beacon.sendViaRF").checked = settings.beacon.sendViaRF;
|
||||
document.getElementById("beacon.beaconFreq").value = settings.beacon.beaconFreq;
|
||||
BeaconingViaRFCheckbox.checked = settings.beacon.sendViaRF;
|
||||
BeaconingFrequency.disabled = !BeaconingViaRFCheckbox.checked;
|
||||
|
||||
document.getElementById("beacon.statusActive").checked = settings.beacon.statusActive;
|
||||
document.getElementById("beacon.statusPacket").value = settings.beacon.statusPacket;
|
||||
@@ -127,7 +131,7 @@ function loadSettings(settings) {
|
||||
StatusPacket.disabled = !StatusCheckbox.checked;
|
||||
|
||||
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
|
||||
document.getElementById("blacklist").value = settings.blacklist;
|
||||
@@ -135,7 +139,6 @@ function loadSettings(settings) {
|
||||
// Digi
|
||||
document.getElementById("digi.mode").value = settings.digi.mode;
|
||||
document.getElementById("digi.ecoMode").value = settings.digi.ecoMode;
|
||||
document.getElementById("digi.beaconOnRxFreq").value = settings.digi.beaconOnRxFreq;
|
||||
|
||||
// LoRa
|
||||
document.getElementById("lora.rxActive").checked = settings.lora.rxActive;
|
||||
@@ -165,13 +168,16 @@ function loadSettings(settings) {
|
||||
MonitorInternalSleepVoltage.disabled = !MonitorInternalVoltageCheckbox.checked;
|
||||
|
||||
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.voltageDividerR1").value = settings.battery.voltageDividerR1.toFixed(1);
|
||||
document.getElementById("battery.voltageDividerR2").value = settings.battery.voltageDividerR2.toFixed(1);
|
||||
SendExternalVoltageCheckbox.checked = settings.battery.sendExternalVoltage;
|
||||
ExternalVoltagePin.disabled = !SendExternalVoltageCheckbox.checked;
|
||||
ExternalVoltageDividerR1.disabled = !SendExternalVoltageCheckbox.checked;
|
||||
ExternalVoltageDividerR2.disabled = !SendExternalVoltageCheckbox.checked;
|
||||
UseExternalI2CSensorCheckbox.disabled = !SendExternalVoltageCheckbox.checked;
|
||||
ExternalVoltagePin.disabled = !SendExternalVoltageCheckbox.checked || UseExternalI2CSensorCheckbox.checked;
|
||||
ExternalVoltageDividerR1.disabled = !SendExternalVoltageCheckbox.checked || UseExternalI2CSensorCheckbox.checked;
|
||||
ExternalVoltageDividerR2.disabled = !SendExternalVoltageCheckbox.checked || UseExternalI2CSensorCheckbox.checked;
|
||||
|
||||
|
||||
document.getElementById("battery.monitorExternalVoltage").checked = settings.battery.monitorExternalVoltage;
|
||||
document.getElementById("battery.externalSleepVoltage").value = settings.battery.externalSleepVoltage.toFixed(1);
|
||||
@@ -203,6 +209,7 @@ function loadSettings(settings) {
|
||||
document.getElementById("tnc.enableServer").checked = settings.tnc.enableServer;
|
||||
document.getElementById("tnc.enableSerial").checked = settings.tnc.enableSerial;
|
||||
document.getElementById("tnc.acceptOwn").checked = settings.tnc.acceptOwn;
|
||||
document.getElementById("tnc.aprsBridgeActive").checked = settings.tnc.aprsBridgeActive;
|
||||
}
|
||||
|
||||
// MQTT
|
||||
@@ -212,14 +219,14 @@ function loadSettings(settings) {
|
||||
document.getElementById("mqtt.username").value = settings.mqtt.username;
|
||||
document.getElementById("mqtt.password").value = settings.mqtt.password;
|
||||
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;
|
||||
MqttServer.disabled = !MqttCheckbox.check;
|
||||
MqttTopic.disabled = !MqttCheckbox.check;
|
||||
MqttUsername.disabled = !MqttCheckbox.check;
|
||||
MqttPassword.disabled = !MqttCheckbox.check;
|
||||
MqttPort.disabled = !MqttCheckbox.check;
|
||||
MqttBeaconOverMqtt.disabled = !MqttCheckbox.check;
|
||||
MqttServer.disabled = !MqttCheckbox.checked;
|
||||
MqttTopic.disabled = !MqttCheckbox.checked;
|
||||
MqttUsername.disabled = !MqttCheckbox.checked;
|
||||
MqttPassword.disabled = !MqttCheckbox.checked;
|
||||
MqttPort.disabled = !MqttCheckbox.checked;
|
||||
MqttBeaconOverMqtt.disabled = !MqttCheckbox.checked;
|
||||
|
||||
// Reboot
|
||||
document.getElementById("other.rebootMode").checked = settings.other.rebootMode;
|
||||
@@ -306,6 +313,12 @@ function updateImage() {
|
||||
}
|
||||
}
|
||||
|
||||
// Beaconing Switches
|
||||
const BeaconingViaRFCheckbox = document.querySelector('input[name="beacon.sendViaRF"]');
|
||||
const BeaconingFrequency = document.querySelector('select[name="beacon.beaconFreq"]');
|
||||
BeaconingViaRFCheckbox.addEventListener("change", function() {
|
||||
BeaconingFrequency.disabled = !this.checked;
|
||||
});
|
||||
|
||||
// Status Switch
|
||||
const StatusCheckbox = document.querySelector('input[name="beacon.statusActive"]');
|
||||
@@ -350,13 +363,21 @@ MonitorExternalVoltageCheckbox.addEventListener("change", function () {
|
||||
MonitorExternalSleepVoltage.disabled = !this.checked;
|
||||
});
|
||||
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 ExternalVoltageDividerR1 = document.querySelector('input[name="battery.voltageDividerR1"]');
|
||||
const ExternalVoltageDividerR2 = document.querySelector('input[name="battery.voltageDividerR2"]');
|
||||
SendExternalVoltageCheckbox.addEventListener("change", function () {
|
||||
ExternalVoltagePin.disabled = !this.checked;
|
||||
ExternalVoltageDividerR1.disabled = !this.checked;
|
||||
ExternalVoltageDividerR2.disabled = !this.checked;
|
||||
UseExternalI2CSensorCheckbox.disabled = !this.checked;
|
||||
ExternalVoltagePin.disabled = !this.checked || UseExternalI2CSensorCheckbox.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
|
||||
|
||||
|
Before Width: | Height: | Size: 121 KiB |
|
Before Width: | Height: | Size: 6.9 KiB |
|
Before Width: | Height: | Size: 25 KiB |
|
Before Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 21 KiB |
|
Before Width: | Height: | Size: 74 KiB |
|
Before Width: | Height: | Size: 2.3 KiB |
|
Before Width: | Height: | Size: 25 KiB |
|
Before Width: | Height: | Size: 30 KiB |
|
Before Width: | Height: | Size: 34 KiB |
|
Before Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 141 KiB |
|
Before Width: | Height: | Size: 24 KiB |
|
Before Width: | Height: | Size: 164 KiB |
|
Before Width: | Height: | Size: 46 KiB |
|
Before Width: | Height: | Size: 102 KiB |
|
Before Width: | Height: | Size: 122 KiB |
|
Before Width: | Height: | Size: 36 KiB |
|
Before Width: | Height: | Size: 64 KiB |
|
Before Width: | Height: | Size: 150 KiB |
|
Before Width: | Height: | Size: 65 KiB |
|
Before Width: | Height: | Size: 198 KiB |
|
Before Width: | Height: | Size: 96 KiB |
|
Before Width: | Height: | Size: 53 KiB |
|
Before Width: | Height: | Size: 68 KiB |
|
Before Width: | Height: | Size: 47 KiB |
|
Before Width: | Height: | Size: 130 KiB |
|
Before Width: | Height: | Size: 55 KiB |
|
Before Width: | Height: | Size: 71 KiB |
|
Before Width: | Height: | Size: 98 KiB |
|
Before Width: | Height: | Size: 43 KiB |
|
Before Width: | Height: | Size: 91 KiB |
|
Before Width: | Height: | Size: 184 KiB |
|
Before Width: | Height: | Size: 711 KiB |
@@ -45,12 +45,13 @@ public:
|
||||
String overlay;
|
||||
String symbol;
|
||||
String path;
|
||||
bool sendViaRF;
|
||||
bool sendViaAPRSIS;
|
||||
bool gpsActive;
|
||||
bool gpsAmbiguity;
|
||||
bool sendViaRF;
|
||||
int beaconFreq;
|
||||
bool statusActive;
|
||||
String statusPacket;
|
||||
bool gpsActive;
|
||||
int ambiguityLevel;
|
||||
};
|
||||
|
||||
class APRS_IS {
|
||||
@@ -67,8 +68,7 @@ public:
|
||||
class DIGI {
|
||||
public:
|
||||
int mode;
|
||||
int ecoMode; // 0 = Not Active | 1 = Ultra EcoMode | 2 = Not Active (WiFi OFF, Serial ON)
|
||||
bool beaconOnRxFreq;
|
||||
int ecoMode; // 0 = Not Active | 1 = Ultra EcoMode | 2 = Not Active (WiFi OFF, Serial ON)
|
||||
};
|
||||
|
||||
class LoraModule {
|
||||
@@ -102,6 +102,7 @@ public:
|
||||
int externalVoltagePin;
|
||||
bool monitorExternalVoltage;
|
||||
float externalSleepVoltage;
|
||||
bool useExternalI2CSensor;
|
||||
float voltageDividerR1;
|
||||
float voltageDividerR2;
|
||||
bool sendVoltageAsTelemetry;
|
||||
@@ -127,6 +128,7 @@ public:
|
||||
bool enableServer;
|
||||
bool enableSerial;
|
||||
bool acceptOwn;
|
||||
bool aprsBridgeActive;
|
||||
};
|
||||
|
||||
class OTA {
|
||||
|
||||
@@ -27,8 +27,8 @@ namespace TNC_Utils {
|
||||
void setup();
|
||||
void loop();
|
||||
|
||||
void sendToClients(const String& packet);
|
||||
void sendToSerial(const String& packet);
|
||||
void sendToClients(const String& packet, bool stripBytes = false);
|
||||
void sendToSerial(const String& packet, bool stripBytes = false);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
#define WX_UTILS_H_
|
||||
|
||||
#include <Adafruit_Sensor.h>
|
||||
#include <Adafruit_AHTX0.h>
|
||||
#include <Adafruit_BME280.h>
|
||||
#include <Adafruit_BMP280.h>
|
||||
#include <Adafruit_BME680.h>
|
||||
|
||||
@@ -67,8 +67,8 @@ ___________________________________________________________________*/
|
||||
#endif
|
||||
|
||||
|
||||
String versionDate = "2025-10-13";
|
||||
String versionNumber = "3.1.3";
|
||||
String versionDate = "2025-12-28";
|
||||
String versionNumber = "3.1.6.3";
|
||||
Configuration Config;
|
||||
WiFiClient aprsIsClient;
|
||||
WiFiClient mqttClient;
|
||||
@@ -192,9 +192,9 @@ void loop() {
|
||||
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.enableSerial) TNC_Utils::sendToSerial(packet); // Send received packet to Serial KISS
|
||||
if (Config.mqtt.active) MQTT_Utils::sendToMqtt(packet); // Send received packet to MQTT
|
||||
if (Config.tnc.enableServer) TNC_Utils::sendToClients(packet, true); // Send received packet to TNC 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.aprs_is.active) APRS_IS_Utils::listenAPRSIS(); // listen received packet from APRSIS
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
* along with LoRa APRS iGate. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <APRSPacketLib.h>
|
||||
#include <WiFi.h>
|
||||
#include "configuration.h"
|
||||
#include "aprs_is_utils.h"
|
||||
@@ -25,6 +26,7 @@
|
||||
#include "query_utils.h"
|
||||
#include "A7670_utils.h"
|
||||
#include "digi_utils.h"
|
||||
#include "tnc_utils.h"
|
||||
#include "display.h"
|
||||
#include "utils.h"
|
||||
|
||||
@@ -235,12 +237,7 @@ namespace APRS_IS_Utils {
|
||||
String buildPacketToTx(const String& aprsisPacket, uint8_t packetType) {
|
||||
String packet = aprsisPacket;
|
||||
packet.trim();
|
||||
String outputPacket = Config.callsign;
|
||||
outputPacket += ">APLRG1";
|
||||
if (Config.beacon.path != "") {
|
||||
outputPacket += ",";
|
||||
outputPacket += Config.beacon.path;
|
||||
}
|
||||
String outputPacket = APRSPacketLib::generateBasePacket(Config.callsign, "APLRG1", Config.beacon.path);
|
||||
outputPacket += ":}";
|
||||
outputPacket += packet.substring(0, packet.indexOf(",")); // Callsign>Tocall
|
||||
outputPacket.concat(",TCPIP,");
|
||||
@@ -281,8 +278,9 @@ namespace APRS_IS_Utils {
|
||||
if (!passcodeValid && packet.indexOf(Config.callsign) != -1) {
|
||||
if (packet.indexOf("unverified") != -1 ) {
|
||||
Serial.println("\n****APRS PASSCODE NOT VALID****\n");
|
||||
displayShow(firstLine, "", " APRS PASSCODE", " NOT VALID !!!", "", "", "", 0);
|
||||
while (1) {};
|
||||
displayShow(firstLine, "", " APRS PASSCODE", " NOT VALID !!!", "", "", "", 3000);
|
||||
aprsIsClient.stop();
|
||||
Config.aprs_is.active = false;
|
||||
} else if (packet.indexOf("verified") != -1 ) {
|
||||
passcodeValid = true;
|
||||
}
|
||||
@@ -367,6 +365,10 @@ namespace APRS_IS_Utils {
|
||||
Serial.println(" ---> Rejected (Time): No Tx");
|
||||
}
|
||||
}
|
||||
if (Config.tnc.aprsBridgeActive) {
|
||||
if (Config.tnc.enableServer) TNC_Utils::sendToClients(packet); // Send received packet to TNC KISS
|
||||
if (Config.tnc.enableSerial) TNC_Utils::sendToSerial(packet); // Send received packet to Serial KISS
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
* 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 "configuration.h"
|
||||
#include "board_pinout.h"
|
||||
@@ -37,6 +37,10 @@ float multiplyCorrection = 0.035;
|
||||
|
||||
float voltageDividerTransformation = 0.0;
|
||||
|
||||
uint8_t externalI2CSensorAddress = 0x00;
|
||||
int externalI2CSensorType = 0; // 0 = None | 1 = INA219
|
||||
|
||||
Adafruit_INA219 ina219;
|
||||
|
||||
|
||||
#ifdef HAS_ADC_CALIBRATION
|
||||
@@ -98,6 +102,30 @@ namespace BATTERY_Utils {
|
||||
#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() {
|
||||
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();
|
||||
}
|
||||
#endif
|
||||
|
||||
getI2CVoltageSensorAddress();
|
||||
if (externalI2CSensorAddress != 0x00) {
|
||||
if (detectINA219(externalI2CSensorAddress)) {
|
||||
Serial.println("INA219 sensor found");
|
||||
externalI2CSensorType = 1; // INA219
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
float checkInternalVoltage() {
|
||||
@@ -177,37 +213,49 @@ namespace BATTERY_Utils {
|
||||
}
|
||||
|
||||
float checkExternalVoltage() {
|
||||
int sample;
|
||||
int sampleSum = 0;
|
||||
for (int i = 0; i < 100; i++) {
|
||||
#ifdef HAS_ADC_CALIBRATION
|
||||
if (calibrationEnable){
|
||||
sample = adc1_get_raw(ExternalVoltage_ADC_Channel);
|
||||
} else {
|
||||
if (externalI2CSensorType == 0) {
|
||||
int sample;
|
||||
int sampleSum = 0;
|
||||
for (int i = 0; i < 100; i++) {
|
||||
#ifdef HAS_ADC_CALIBRATION
|
||||
if (calibrationEnable){
|
||||
sample = adc1_get_raw(ExternalVoltage_ADC_Channel);
|
||||
} else {
|
||||
sample = analogRead(Config.battery.externalVoltagePin);
|
||||
}
|
||||
#else
|
||||
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
|
||||
sample = analogRead(Config.battery.externalVoltagePin);
|
||||
extVoltage = ((((sampleSum/100.0)* adcReadingTransformation) + readingCorrection) * voltageDividerTransformation) - multiplyCorrection;
|
||||
#endif
|
||||
sampleSum += sample;
|
||||
delayMicroseconds(50);
|
||||
}
|
||||
|
||||
return extVoltage; // raw voltage without mapping
|
||||
|
||||
float extVoltage;
|
||||
#ifdef HAS_ADC_CALIBRATION
|
||||
if (calibrationEnable){
|
||||
extVoltage = esp_adc_cal_raw_to_voltage(sampleSum / 100, &adc_chars) * voltageDividerTransformation; // in mV
|
||||
extVoltage /= 1000;
|
||||
} else {
|
||||
extVoltage = ((((sampleSum/100)* adcReadingTransformation) + readingCorrection) * voltageDividerTransformation) - multiplyCorrection;
|
||||
// return mapVoltage(voltage, 5.05, 6.32, 4.5, 5.5); // mapped voltage
|
||||
} else if (externalI2CSensorType == 1) { // INA219
|
||||
int sampleSum = 0;
|
||||
for (int i = 0; i < 100; i++) {
|
||||
sampleSum += ina219.getBusVoltage_V() * 1000.0;
|
||||
delayMicroseconds(50);
|
||||
}
|
||||
#else
|
||||
extVoltage = ((((sampleSum/100)* adcReadingTransformation) + readingCorrection) * voltageDividerTransformation) - multiplyCorrection;
|
||||
#endif
|
||||
|
||||
return extVoltage; // raw voltage without mapping
|
||||
|
||||
// return mapVoltage(voltage, 5.05, 6.32, 4.5, 5.5); // mapped voltage
|
||||
float extVoltage = sampleSum/100.0;
|
||||
return extVoltage/1000.0;
|
||||
} else {
|
||||
return 0.0;
|
||||
}
|
||||
}
|
||||
|
||||
void startupBatteryHealth() {
|
||||
|
||||
@@ -68,15 +68,17 @@ bool Configuration::writeFile() {
|
||||
data["beacon"]["longitude"] = beacon.longitude;
|
||||
data["beacon"]["overlay"] = beacon.overlay;
|
||||
data["beacon"]["symbol"] = beacon.symbol;
|
||||
data["beacon"]["path"] = beacon.path;
|
||||
|
||||
data["beacon"]["sendViaAPRSIS"] = beacon.sendViaAPRSIS;
|
||||
data["beacon"]["sendViaRF"] = beacon.sendViaRF;
|
||||
data["beacon"]["path"] = beacon.path;
|
||||
data["beacon"]["beaconFreq"] = beacon.beaconFreq;
|
||||
|
||||
data["beacon"]["statusActive"] = beacon.statusActive;
|
||||
data["beacon"]["statusPacket"] = beacon.statusPacket;
|
||||
|
||||
data["beacon"]["gpsActive"] = beacon.gpsActive;
|
||||
data["beacon"]["gpsAmbiguity"] = beacon.gpsAmbiguity;
|
||||
data["beacon"]["ambiguityLevel"] = beacon.ambiguityLevel;
|
||||
|
||||
data["personalNote"] = personalNote;
|
||||
|
||||
@@ -87,7 +89,6 @@ bool Configuration::writeFile() {
|
||||
#if defined(HAS_A7670)
|
||||
if (digi.ecoMode == 1) data["digi"]["ecoMode"] = 2;
|
||||
#endif
|
||||
data["digi"]["beaconOnRxFreq"] = digi.beaconOnRxFreq;
|
||||
|
||||
data["lora"]["rxActive"] = loramodule.rxActive;
|
||||
data["lora"]["rxFreq"] = loramodule.rxFreq;
|
||||
@@ -110,11 +111,12 @@ bool Configuration::writeFile() {
|
||||
data["battery"]["internalSleepVoltage"] = battery.internalSleepVoltage;
|
||||
|
||||
data["battery"]["sendExternalVoltage"] = battery.sendExternalVoltage;
|
||||
data["battery"]["externalVoltagePin"] = battery.externalVoltagePin;
|
||||
data["battery"]["monitorExternalVoltage"] = battery.monitorExternalVoltage;
|
||||
data["battery"]["externalSleepVoltage"] = battery.externalSleepVoltage;
|
||||
data["battery"]["useExternalI2CSensor"] = battery.useExternalI2CSensor;
|
||||
data["battery"]["voltageDividerR1"] = battery.voltageDividerR1;
|
||||
data["battery"]["voltageDividerR2"] = battery.voltageDividerR2;
|
||||
data["battery"]["externalVoltagePin"] = battery.externalVoltagePin;
|
||||
|
||||
data["battery"]["sendVoltageAsTelemetry"] = battery.sendVoltageAsTelemetry;
|
||||
|
||||
@@ -130,6 +132,7 @@ bool Configuration::writeFile() {
|
||||
data["tnc"]["enableServer"] = tnc.enableServer;
|
||||
data["tnc"]["enableSerial"] = tnc.enableSerial;
|
||||
data["tnc"]["acceptOwn"] = tnc.acceptOwn;
|
||||
data["tnc"]["aprsBridgeActive"] = tnc.aprsBridgeActive;
|
||||
|
||||
data["mqtt"]["active"] = mqtt.active;
|
||||
data["mqtt"]["server"] = mqtt.server;
|
||||
@@ -226,10 +229,11 @@ bool Configuration::readFile() {
|
||||
!data["beacon"].containsKey("path") ||
|
||||
!data["beacon"].containsKey("sendViaAPRSIS") ||
|
||||
!data["beacon"].containsKey("sendViaRF") ||
|
||||
!data["beacon"].containsKey("beaconFreq") ||
|
||||
!data["beacon"].containsKey("statusActive") ||
|
||||
!data["beacon"].containsKey("statusPacket") ||
|
||||
!data["beacon"].containsKey("gpsActive") ||
|
||||
!data["beacon"].containsKey("gpsAmbiguity")) needsRewrite = true;
|
||||
!data["beacon"].containsKey("ambiguityLevel")) needsRewrite = true;
|
||||
beacon.latitude = data["beacon"]["latitude"] | 0.0;
|
||||
beacon.longitude = data["beacon"]["longitude"] | 0.0;
|
||||
beacon.comment = data["beacon"]["comment"] | "LoRa APRS";
|
||||
@@ -239,10 +243,11 @@ bool Configuration::readFile() {
|
||||
beacon.path = data["beacon"]["path"] | "WIDE1-1";
|
||||
beacon.sendViaAPRSIS = data["beacon"]["sendViaAPRSIS"] | false;
|
||||
beacon.sendViaRF = data["beacon"]["sendViaRF"] | false;
|
||||
beacon.beaconFreq = data["beacon"]["beaconFreq"] | 1;
|
||||
beacon.statusActive = data["beacon"]["statusActive"] | false;
|
||||
beacon.statusPacket = data["beacon"]["statusPacket"] | "";
|
||||
beacon.gpsActive = data["beacon"]["gpsActive"] | false;
|
||||
beacon.gpsAmbiguity = data["beacon"]["gpsAmbiguity"] | false;
|
||||
beacon.ambiguityLevel = data["beacon"]["ambiguityLevel"] | 0;
|
||||
|
||||
if (!data.containsKey("personalNote")) needsRewrite = true;
|
||||
personalNote = data["personalNote"] | "personal note here";
|
||||
@@ -251,13 +256,10 @@ bool Configuration::readFile() {
|
||||
blacklist = data["blacklist"] | "station callsign";
|
||||
|
||||
if (!data["digi"].containsKey("mode") ||
|
||||
!data["digi"].containsKey("ecoMode") ||
|
||||
!data["digi"].containsKey("beaconOnRxFreq")) needsRewrite = true;
|
||||
!data["digi"].containsKey("ecoMode")) needsRewrite = true;
|
||||
digi.mode = data["digi"]["mode"] | 0;
|
||||
digi.ecoMode = data["digi"]["ecoMode"] | 0;
|
||||
if (digi.ecoMode == 1) shouldSleepStop = false;
|
||||
digi.beaconOnRxFreq = data["digi"]["beaconOnRxFreq"] | false;
|
||||
|
||||
#if defined(HAS_A7670)
|
||||
if (digi.ecoMode == 1) digi.ecoMode = 2;
|
||||
#endif
|
||||
@@ -288,7 +290,11 @@ bool Configuration::readFile() {
|
||||
if (!data["display"].containsKey("alwaysOn") ||
|
||||
!data["display"].containsKey("timeout") ||
|
||||
!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.turn180 = data["display"]["turn180"] | false;
|
||||
|
||||
@@ -296,21 +302,23 @@ bool Configuration::readFile() {
|
||||
!data["battery"].containsKey("monitorInternalVoltage") ||
|
||||
!data["battery"].containsKey("internalSleepVoltage") ||
|
||||
!data["battery"].containsKey("sendExternalVoltage") ||
|
||||
!data["battery"].containsKey("externalVoltagePin") ||
|
||||
!data["battery"].containsKey("monitorExternalVoltage") ||
|
||||
!data["battery"].containsKey("externalSleepVoltage") ||
|
||||
!data["battery"].containsKey("useExternalI2CSensor") ||
|
||||
!data["battery"].containsKey("voltageDividerR1") ||
|
||||
!data["battery"].containsKey("voltageDividerR2") ||
|
||||
!data["battery"].containsKey("externalVoltagePin") ||
|
||||
!data["battery"].containsKey("sendVoltageAsTelemetry")) needsRewrite = true;
|
||||
battery.sendInternalVoltage = data["battery"]["sendInternalVoltage"] | false;
|
||||
battery.monitorInternalVoltage = data["battery"]["monitorInternalVoltage"] | false;
|
||||
battery.internalSleepVoltage = data["battery"]["internalSleepVoltage"] | 2.9;
|
||||
battery.sendExternalVoltage = data["battery"]["sendExternalVoltage"] | false;
|
||||
battery.externalVoltagePin = data["battery"]["externalVoltagePin"] | 34;
|
||||
battery.monitorExternalVoltage = data["battery"]["monitorExternalVoltage"] | false;
|
||||
battery.externalSleepVoltage = data["battery"]["externalSleepVoltage"] | 10.9;
|
||||
battery.useExternalI2CSensor = data["battery"]["useExternalI2CSensor"] | false;
|
||||
battery.voltageDividerR1 = data["battery"]["voltageDividerR1"] | 100.0;
|
||||
battery.voltageDividerR2 = data["battery"]["voltageDividerR2"] | 27.0;
|
||||
battery.externalVoltagePin = data["battery"]["externalVoltagePin"] | 34;
|
||||
battery.sendVoltageAsTelemetry = data["battery"]["sendVoltageAsTelemetry"] | false;
|
||||
|
||||
if (!data["wxsensor"].containsKey("active") ||
|
||||
@@ -331,10 +339,12 @@ bool Configuration::readFile() {
|
||||
|
||||
if (!data["tnc"].containsKey("enableServer") ||
|
||||
!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.enableSerial = data["tnc"]["enableSerial"] | false;
|
||||
tnc.acceptOwn = data["tnc"]["acceptOwn"] | false;
|
||||
tnc.aprsBridgeActive = data["tnc"]["aprsBridgeActive"] | false;
|
||||
|
||||
if (!data["mqtt"].containsKey("active") ||
|
||||
!data["mqtt"].containsKey("server") ||
|
||||
@@ -436,15 +446,17 @@ void Configuration::setDefaultValues() {
|
||||
beacon.interval = 15;
|
||||
beacon.overlay = "L";
|
||||
beacon.symbol = "a";
|
||||
beacon.sendViaAPRSIS = true;
|
||||
beacon.sendViaRF = false;
|
||||
beacon.path = "WIDE1-1";
|
||||
|
||||
beacon.sendViaAPRSIS = true;
|
||||
beacon.sendViaRF = false;
|
||||
beacon.beaconFreq = 1;
|
||||
|
||||
beacon.statusActive = false;
|
||||
beacon.statusPacket = "";
|
||||
|
||||
beacon.gpsActive = false;
|
||||
beacon.gpsAmbiguity = false;
|
||||
beacon.ambiguityLevel = 0;
|
||||
|
||||
personalNote = "";
|
||||
|
||||
@@ -452,7 +464,6 @@ void Configuration::setDefaultValues() {
|
||||
|
||||
digi.mode = 0;
|
||||
digi.ecoMode = 0;
|
||||
digi.beaconOnRxFreq = false;
|
||||
|
||||
loramodule.rxActive = true;
|
||||
loramodule.rxFreq = 433775000;
|
||||
@@ -475,11 +486,12 @@ void Configuration::setDefaultValues() {
|
||||
battery.internalSleepVoltage = 2.9;
|
||||
|
||||
battery.sendExternalVoltage = false;
|
||||
battery.externalVoltagePin = 34;
|
||||
battery.monitorExternalVoltage = false;
|
||||
battery.externalSleepVoltage = 10.9;
|
||||
battery.useExternalI2CSensor = false;
|
||||
battery.voltageDividerR1 = 100.0;
|
||||
battery.voltageDividerR2 = 27.0;
|
||||
battery.externalVoltagePin = 34;
|
||||
|
||||
battery.sendVoltageAsTelemetry = false;
|
||||
|
||||
@@ -495,6 +507,7 @@ void Configuration::setDefaultValues() {
|
||||
tnc.enableServer = false;
|
||||
tnc.enableSerial = false;
|
||||
tnc.acceptOwn = false;
|
||||
tnc.aprsBridgeActive = false;
|
||||
|
||||
mqtt.active = false;
|
||||
mqtt.server = "";
|
||||
@@ -524,7 +537,7 @@ void Configuration::setDefaultValues() {
|
||||
|
||||
backupDigiMode = false;
|
||||
|
||||
Serial.println("All is Written!");
|
||||
Serial.println("New Data Created... All is Written!");
|
||||
}
|
||||
|
||||
Configuration::Configuration() {
|
||||
|
||||
@@ -47,9 +47,13 @@
|
||||
#ifdef HELTEC_WP_V1
|
||||
EInkDisplay_WirelessPaperV1_1 display;
|
||||
#endif
|
||||
/*#ifdef HELTEC_WP_V1_2 // SOON!
|
||||
#ifdef HELTEC_WP_V1_2
|
||||
EInkDisplay_WirelessPaperV1_2 display;
|
||||
#endif*/
|
||||
#endif
|
||||
#ifdef HELTEC_VM_E290
|
||||
EInkDisplay_VisionMasterE290 display;
|
||||
#endif
|
||||
|
||||
String lastEpaperText;
|
||||
#else
|
||||
#include <Adafruit_GFX.h>
|
||||
@@ -88,14 +92,22 @@ void displaySetup() {
|
||||
tft.setTextFont(0);
|
||||
tft.fillScreen(TFT_BLACK);
|
||||
#if defined(TTGO_T_DECK_GPS) || defined(TTGO_T_DECK_PLUS)
|
||||
sprite.createSprite(320,240);
|
||||
sprite.createSprite(320, 240);
|
||||
#else
|
||||
sprite.createSprite(160,80);
|
||||
sprite.createSprite(160, 80);
|
||||
#endif
|
||||
#else
|
||||
#ifdef HAS_EPAPER
|
||||
display.landscape();
|
||||
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();
|
||||
#else
|
||||
#ifdef OLED_DISPLAY_HAS_RST_PIN
|
||||
@@ -106,7 +118,7 @@ void displaySetup() {
|
||||
#endif
|
||||
|
||||
#if defined(TTGO_T_Beam_S3_SUPREME_V3)
|
||||
if (!display.begin(0x3c, false)) {
|
||||
if (display.begin(0x3c, false)) {
|
||||
displayFound = true;
|
||||
if (Config.display.turn180) display.setRotation(2);
|
||||
display.clearDisplay();
|
||||
@@ -157,7 +169,6 @@ void displayToggle(bool toggle) {
|
||||
digitalWrite(TFT_BL, LOW);
|
||||
#else
|
||||
#ifdef HAS_EPAPER
|
||||
display.printCenter("Enabled EPAPER Display...");
|
||||
display.update();
|
||||
#else
|
||||
#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.pushSprite(0,0);
|
||||
sprite.pushSprite(0, 0);
|
||||
#else
|
||||
#ifdef HAS_EPAPER
|
||||
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.pushSprite(0,0);
|
||||
sprite.pushSprite(0, 0);
|
||||
#else
|
||||
#ifdef HAS_EPAPER
|
||||
lastEpaperText = header + line1 + line2 + line3 + line4 + line5 + line6;
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
* along with LoRa APRS iGate. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <APRSPacketLib.h>
|
||||
#include <TinyGPS++.h>
|
||||
#include <WiFi.h>
|
||||
#include "configuration.h"
|
||||
@@ -42,70 +43,6 @@ namespace GPS_Utils {
|
||||
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() {
|
||||
if (Config.callsign.indexOf("NOCALL-10") != 0 && !Utils::checkValidCallsign(Config.callsign)) {
|
||||
displayShow("***** ERROR ******", "CALLSIGN = NOT VALID!", "", "Only Rx Mode Active", 3000);
|
||||
@@ -116,9 +53,17 @@ namespace GPS_Utils {
|
||||
Config.digi.mode = 0;
|
||||
Config.backupDigiMode = false;
|
||||
}
|
||||
generateBeaconFirstPart();
|
||||
String encodedGPS = encodeGPS(Config.beacon.latitude, Config.beacon.longitude, Config.beacon.overlay, Config.beacon.symbol);
|
||||
String beaconPacket = APRSPacketLib::generateBasePacket(Config.callsign, "APLRG1", Config.beacon.path);
|
||||
String encodedGPS = APRSPacketLib::encodeGPSIntoBase91(Config.beacon.latitude, Config.beacon.longitude, 0, 0, Config.beacon.symbol, false, 0, true, Config.beacon.ambiguityLevel);
|
||||
|
||||
iGateBeaconPacket = beaconPacket;
|
||||
iGateBeaconPacket += ",qAC:!";
|
||||
iGateBeaconPacket += Config.beacon.overlay;
|
||||
iGateBeaconPacket += encodedGPS;
|
||||
|
||||
iGateLoRaBeaconPacket = beaconPacket;
|
||||
iGateLoRaBeaconPacket += ":=";
|
||||
iGateLoRaBeaconPacket += Config.beacon.overlay;
|
||||
iGateLoRaBeaconPacket += encodedGPS;
|
||||
}
|
||||
|
||||
@@ -126,47 +71,40 @@ namespace GPS_Utils {
|
||||
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) {
|
||||
int indexOfExclamation = packet.indexOf(":!");
|
||||
int indexOfEqual = packet.indexOf(":=");
|
||||
|
||||
const uint8_t OFFSET = 3; // Offset for encoded data in the packet
|
||||
String GPSPacket;
|
||||
String infoGPS;
|
||||
if (indexOfExclamation > 10) {
|
||||
GPSPacket = packet.substring(indexOfExclamation + OFFSET);
|
||||
infoGPS = packet.substring(indexOfExclamation + OFFSET);
|
||||
} else if (indexOfEqual > 10) {
|
||||
GPSPacket = packet.substring(indexOfEqual + OFFSET);
|
||||
infoGPS = packet.substring(indexOfEqual + OFFSET);
|
||||
}
|
||||
|
||||
String encodedLatitude = GPSPacket.substring(0,4);
|
||||
int Y1 = encodedLatitude[0] - 33;
|
||||
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);
|
||||
float decodedLatitude = APRSPacketLib::decodeBase91EncodedLatitude(infoGPS.substring(0,4));
|
||||
float decodedLongitude = APRSPacketLib::decodeBase91EncodedLongitude(infoGPS.substring(4,8));
|
||||
|
||||
String encodedLongitude = GPSPacket.substring(4,8);
|
||||
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;
|
||||
return buildDistanceAndComment(decodedLatitude, decodedLongitude, infoGPS.substring(12));
|
||||
}
|
||||
|
||||
String getReceivedGPS(const String& packet) {
|
||||
@@ -195,49 +133,42 @@ namespace GPS_Utils {
|
||||
convertedLongitude += Longitude.substring(Longitude.indexOf(".") + 1, Longitude.indexOf(".") + 3).toFloat() / (60*100);
|
||||
if (Longitude.endsWith("W")) convertedLongitude = -convertedLongitude; // Handle Western Hemisphere
|
||||
|
||||
distance = String(calculateDistanceTo(convertedLatitude, convertedLongitude),1);
|
||||
|
||||
String decodedGPS = String(convertedLatitude,5);
|
||||
decodedGPS += "N / ";
|
||||
decodedGPS += String(convertedLongitude,5);
|
||||
decodedGPS += "E / ";
|
||||
decodedGPS += distance;
|
||||
decodedGPS += "km";
|
||||
|
||||
String comment = infoGPS.substring(19);
|
||||
if (comment != "") {
|
||||
decodedGPS += " / ";
|
||||
decodedGPS += comment;
|
||||
}
|
||||
return decodedGPS;
|
||||
return buildDistanceAndComment(convertedLatitude, convertedLongitude, infoGPS.substring(19));
|
||||
}
|
||||
|
||||
String getDistanceAndComment(const String& packet) {
|
||||
int indexOfAt = packet.indexOf(":@");
|
||||
if (indexOfAt > 10) {
|
||||
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 (indexOfAt > 10) return getReceivedGPS(packet);
|
||||
|
||||
if (encodedBytePosition != 0) {
|
||||
char currentChar = packet[encodedBytePosition];
|
||||
if (currentChar == 'G' || currentChar == 'Q' || currentChar == '[' || currentChar == 'H' || currentChar == 'X') {
|
||||
return decodeEncodedGPS(packet); // If valid encoded data position is found, decode it
|
||||
} else {
|
||||
return getReceivedGPS(packet);
|
||||
}
|
||||
} else {
|
||||
return " _ / _ / _ ";
|
||||
}
|
||||
const uint8_t nonEncondedLatitudeOffset = 9; // "N" / "S"
|
||||
const uint8_t nonEncondedLongitudeOffset = 19; // "E" / "W"
|
||||
const uint8_t encondedByteOffset = 14;
|
||||
|
||||
int indexOfExclamation = packet.indexOf(":!");
|
||||
int indexOfEqual = packet.indexOf(":=");
|
||||
int baseIndex = - 1;
|
||||
if (indexOfExclamation > 10) {
|
||||
baseIndex = indexOfExclamation;
|
||||
} else if (indexOfEqual > 10) {
|
||||
baseIndex = indexOfEqual;
|
||||
}
|
||||
if (baseIndex == -1) return " _ / _ / _ ";
|
||||
|
||||
int latitudeIndex = baseIndex + nonEncondedLatitudeOffset;
|
||||
int longitudeIndex = baseIndex + nonEncondedLongitudeOffset;
|
||||
int encondedByteIndex = baseIndex + encondedByteOffset;
|
||||
int packetLength = packet.length();
|
||||
|
||||
if (latitudeIndex >= packetLength || longitudeIndex >= packetLength || encondedByteIndex >= packetLength) return " _ / _ / _ ";
|
||||
|
||||
char latChar = packet[latitudeIndex];
|
||||
char lngChar = packet[longitudeIndex];
|
||||
if ((latChar == 'N' || latChar == 'S') && (lngChar == 'E' || lngChar == 'W')) return getReceivedGPS(packet);
|
||||
|
||||
char byteChar = packet[encondedByteIndex];
|
||||
if (byteChar == 'G' || byteChar == 'Q' || byteChar == '[' || byteChar == 'H' || byteChar == 'X' || byteChar == '3') return decodeEncodedGPS(packet);
|
||||
|
||||
return " _ / _ / _ ";
|
||||
}
|
||||
|
||||
void setup() {
|
||||
|
||||
@@ -93,6 +93,16 @@ namespace LoRa_Utils {
|
||||
#if defined(HAS_SX1278) || defined(HAS_SX1276)
|
||||
radio.setDio0Action(setFlag, RISING);
|
||||
#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.setCodingRate(Config.loramodule.rxCodingRate4);
|
||||
float signalBandwidth = Config.loramodule.rxSignalBandwidth/1000;
|
||||
@@ -103,6 +113,11 @@ namespace LoRa_Utils {
|
||||
radio.setRfSwitchPins(RADIO_RXEN, RADIO_TXEN);
|
||||
#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)
|
||||
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)?
|
||||
@@ -120,6 +135,13 @@ namespace LoRa_Utils {
|
||||
radio.setRxBoostedGainMode(true);
|
||||
#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) {
|
||||
Utils::println("init : LoRa Module ... done!");
|
||||
} else {
|
||||
@@ -129,7 +151,7 @@ namespace LoRa_Utils {
|
||||
}
|
||||
|
||||
void changeFreqTx() {
|
||||
delay(500);
|
||||
delay(300);
|
||||
float freq = (float)Config.loramodule.txFreq / 1000000;
|
||||
radio.setFrequency(freq);
|
||||
radio.setSpreadingFactor(Config.loramodule.txSpreadingFactor);
|
||||
@@ -138,7 +160,7 @@ namespace LoRa_Utils {
|
||||
}
|
||||
|
||||
void changeFreqRx() {
|
||||
delay(500);
|
||||
delay(300);
|
||||
float freq = (float)Config.loramodule.rxFreq / 1000000;
|
||||
radio.setFrequency(freq);
|
||||
radio.setSpreadingFactor(Config.loramodule.rxSpreadingFactor);
|
||||
@@ -150,7 +172,7 @@ namespace LoRa_Utils {
|
||||
if (!Config.loramodule.txActive) return;
|
||||
|
||||
if (Config.loramodule.txFreq != Config.loramodule.rxFreq) {
|
||||
if (!packetIsBeacon || (packetIsBeacon && !Config.digi.beaconOnRxFreq)) {
|
||||
if (!packetIsBeacon || (packetIsBeacon && Config.beacon.beaconFreq == 1)) {
|
||||
changeFreqTx();
|
||||
}
|
||||
}
|
||||
@@ -174,7 +196,7 @@ namespace LoRa_Utils {
|
||||
if (Config.digi.ecoMode != 1) digitalWrite(INTERNAL_LED_PIN, LOW); // disabled in Ultra Eco Mode
|
||||
#endif
|
||||
if (Config.loramodule.txFreq != Config.loramodule.rxFreq) {
|
||||
if (!packetIsBeacon || (packetIsBeacon && !Config.digi.beaconOnRxFreq)) {
|
||||
if (!packetIsBeacon || (packetIsBeacon && Config.beacon.beaconFreq == 1)) {
|
||||
changeFreqRx();
|
||||
}
|
||||
}
|
||||
@@ -204,7 +226,7 @@ namespace LoRa_Utils {
|
||||
if (packet != "") {
|
||||
|
||||
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();
|
||||
snr = radio.getSNR();
|
||||
freqError = radio.getFrequencyError();
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
extern Configuration Config;
|
||||
|
||||
WiFiUDP ntpUDP;
|
||||
NTPClient timeClient(ntpUDP, Config.ntp.server.c_str(), 0, 15 * 60 * 1000); // Update interval 15 min
|
||||
NTPClient* timeClient;
|
||||
|
||||
|
||||
namespace NTP_Utils {
|
||||
@@ -35,17 +35,17 @@ namespace NTP_Utils {
|
||||
void setup() {
|
||||
if (WiFi.status() == WL_CONNECTED && Config.digi.ecoMode == 0 && Config.callsign != "NOCALL-10") {
|
||||
int gmt = Config.ntp.gmtCorrection * 3600;
|
||||
timeClient.setTimeOffset(gmt);
|
||||
timeClient.begin();
|
||||
timeClient = new NTPClient(ntpUDP, Config.ntp.server.c_str(), gmt, 15 * 60 * 1000); // Update interval 15 min
|
||||
timeClient->begin();
|
||||
}
|
||||
}
|
||||
|
||||
void update() {
|
||||
if (WiFi.status() == WL_CONNECTED && Config.digi.ecoMode == 0 && Config.callsign != "NOCALL-10") timeClient.update();
|
||||
if (WiFi.status() == WL_CONNECTED && Config.digi.ecoMode == 0 && Config.callsign != "NOCALL-10") timeClient->update();
|
||||
}
|
||||
|
||||
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";
|
||||
}
|
||||
|
||||
|
||||
@@ -49,19 +49,19 @@ namespace POWER_Utils {
|
||||
|
||||
#ifdef VEXT_CTRL
|
||||
void vext_ctrl_ON() {
|
||||
#if defined(HELTEC_WIRELESS_TRACKER) || defined(HELTEC_V3)
|
||||
#if defined(HELTEC_WIRELESS_TRACKER) || defined(HELTEC_V3) || defined(HELTEC_VM_E290)
|
||||
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)
|
||||
#if defined(HELTEC_WP_V1) || defined(HELTEC_WP_V1_2) || defined(HELTEC_WS) || defined(HELTEC_V3_2) || defined(HELTEC_WSL_V3)
|
||||
digitalWrite(VEXT_CTRL, Config.digi.ecoMode == 1 ? HIGH : LOW);
|
||||
#endif
|
||||
}
|
||||
|
||||
void vext_ctrl_OFF() {
|
||||
#if defined(HELTEC_WIRELESS_TRACKER) || defined(HELTEC_V3)
|
||||
#if defined(HELTEC_WIRELESS_TRACKER) || defined(HELTEC_V3) || defined(HELTEC_VM_E290)
|
||||
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)
|
||||
#if defined(HELTEC_WP_V1) || defined(HELTEC_WP_V1_2) || defined(HELTEC_WS) || defined(HELTEC_V3_2) || defined(HELTEC_WSL_V3)
|
||||
digitalWrite(VEXT_CTRL, Config.digi.ecoMode == 1 ? LOW : HIGH);
|
||||
#endif
|
||||
}
|
||||
@@ -70,19 +70,19 @@ namespace POWER_Utils {
|
||||
|
||||
#ifdef ADC_CTRL
|
||||
void adc_ctrl_ON() {
|
||||
#if defined(HELTEC_WIRELESS_TRACKER) || defined(HELTEC_V3_2)
|
||||
#if defined(HELTEC_WIRELESS_TRACKER) || defined(HELTEC_V3_2) || defined(HELTEC_VM_E290)
|
||||
digitalWrite(ADC_CTRL, HIGH);
|
||||
#endif
|
||||
#if defined(HELTEC_V3) || defined(HELTEC_V2) || defined(HELTEC_WSL_V3) || defined(HELTEC_WP_V1)
|
||||
#if defined(HELTEC_V3) || defined(HELTEC_V2) || defined(HELTEC_WSL_V3) || defined(HELTEC_WP_V1) || defined(HELTEC_WP_V1_2)
|
||||
digitalWrite(ADC_CTRL, LOW);
|
||||
#endif
|
||||
}
|
||||
|
||||
void adc_ctrl_OFF() {
|
||||
#if defined(HELTEC_WIRELESS_TRACKER) || defined(HELTEC_V3_2)
|
||||
#if defined(HELTEC_WIRELESS_TRACKER) || defined(HELTEC_V3_2) || defined(HELTEC_VM_E290)
|
||||
digitalWrite(ADC_CTRL, LOW);
|
||||
#endif
|
||||
#if defined(HELTEC_V3) || defined(HELTEC_V2) || defined(HELTEC_WSL_V3) || defined(HELTEC_WP_V1)
|
||||
#if defined(HELTEC_V3) || defined(HELTEC_V2) || defined(HELTEC_WSL_V3) || defined(HELTEC_WP_V1) || defined(HELTEC_WP_V1_2)
|
||||
digitalWrite(ADC_CTRL, HIGH);
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -57,7 +57,7 @@ bool packetIsBeacon = false;
|
||||
|
||||
namespace STATION_Utils {
|
||||
|
||||
std::vector<String> loadCallSignList(const String& list) {
|
||||
std::vector<String> loadCallsignList(const String& list) {
|
||||
std::vector<String> loadedList;
|
||||
|
||||
String callsigns = list;
|
||||
@@ -77,12 +77,12 @@ namespace STATION_Utils {
|
||||
}
|
||||
|
||||
void loadBlacklistAndManagers() {
|
||||
blacklist = loadCallSignList(Config.blacklist);
|
||||
managers = loadCallSignList(Config.remoteManagement.managers);
|
||||
blacklist = loadCallsignList(Config.blacklist);
|
||||
managers = loadCallsignList(Config.remoteManagement.managers);
|
||||
}
|
||||
|
||||
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("*");
|
||||
if (wildcardIndex >= 0) {
|
||||
String wildcard = list[i].substring(0, wildcardIndex);
|
||||
|
||||
@@ -122,7 +122,7 @@ namespace TELEMETRY_Utils {
|
||||
telemetryCounter++;
|
||||
if (telemetryCounter == 1000) telemetryCounter = 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 += "|";
|
||||
return telemetry;
|
||||
}
|
||||
|
||||
@@ -21,12 +21,15 @@
|
||||
#include "configuration.h"
|
||||
#include "station_utils.h"
|
||||
#include "kiss_protocol.h"
|
||||
#include "aprs_is_utils.h"
|
||||
#include "kiss_utils.h"
|
||||
#include "tnc_utils.h"
|
||||
#include "utils.h"
|
||||
|
||||
|
||||
extern Configuration Config;
|
||||
extern Configuration Config;
|
||||
extern WiFiClient aprsIsClient;
|
||||
extern bool passcodeValid;
|
||||
|
||||
#define MAX_CLIENTS 4
|
||||
#define INPUT_BUFFER_SIZE (2 + MAX_CLIENTS)
|
||||
@@ -94,7 +97,8 @@ namespace TNC_Utils {
|
||||
String sender = frame.substring(0,frame.indexOf(">"));
|
||||
|
||||
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 {
|
||||
Utils::println("Ignored own frame from KISS");
|
||||
}
|
||||
@@ -131,8 +135,8 @@ namespace TNC_Utils {
|
||||
}
|
||||
}
|
||||
|
||||
void sendToClients(const String& packet) {
|
||||
String cleanPacket = packet.substring(3);
|
||||
void sendToClients(const String& packet, bool stripBytes) {
|
||||
String cleanPacket = stripBytes ? packet.substring(3): packet;
|
||||
|
||||
const String kissEncoded = encodeKISS(cleanPacket);
|
||||
|
||||
@@ -152,8 +156,8 @@ namespace TNC_Utils {
|
||||
Utils::println(cleanPacket);
|
||||
}
|
||||
|
||||
void sendToSerial(const String& packet) {
|
||||
String cleanPacket = packet.substring(3);
|
||||
void sendToSerial(const String& packet, bool stripBytes) {
|
||||
String cleanPacket = stripBytes ? packet.substring(3): packet;
|
||||
Serial.print(encodeKISS(cleanPacket));
|
||||
Serial.flush();
|
||||
}
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
* along with LoRa APRS iGate. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <APRSPacketLib.h>
|
||||
#include <TinyGPS++.h>
|
||||
#include <WiFi.h>
|
||||
#include "telemetry_utils.h"
|
||||
@@ -71,12 +72,8 @@ String secondaryBeaconPacket;
|
||||
namespace Utils {
|
||||
|
||||
void processStatus() {
|
||||
String status = Config.callsign;
|
||||
status.concat(">APLRG1");
|
||||
if (Config.beacon.path.indexOf("WIDE") == 0) {
|
||||
status.concat(",");
|
||||
status.concat(Config.beacon.path);
|
||||
}
|
||||
String status = APRSPacketLib::generateBasePacket(Config.callsign, "APLRG1", Config.beacon.path);
|
||||
|
||||
if (WiFi.status() == WL_CONNECTED && Config.aprs_is.active && Config.beacon.sendViaAPRSIS) {
|
||||
delay(1000);
|
||||
status.concat(",qAC:>");
|
||||
@@ -167,10 +164,18 @@ namespace Utils {
|
||||
if (Config.beacon.gpsActive && Config.digi.ecoMode == 0) {
|
||||
GPS_Utils::getData();
|
||||
if (gps.location.isUpdated() && gps.location.lat() != 0.0 && gps.location.lng() != 0.0) {
|
||||
GPS_Utils::generateBeaconFirstPart();
|
||||
String encodedGPS = GPS_Utils::encodeGPS(gps.location.lat(), gps.location.lng(), Config.beacon.overlay, Config.beacon.symbol);
|
||||
beaconPacket = iGateBeaconPacket + encodedGPS;
|
||||
secondaryBeaconPacket = iGateLoRaBeaconPacket + encodedGPS;
|
||||
String basePacket = APRSPacketLib::generateBasePacket(Config.callsign, "APLRG1", Config.beacon.path);
|
||||
String encodedGPS = APRSPacketLib::encodeGPSIntoBase91(gps.location.lat(),gps.location.lng(), 0, 0, Config.beacon.symbol, false, 0, true, Config.beacon.ambiguityLevel);
|
||||
|
||||
beaconPacket = basePacket;
|
||||
beaconPacket += ",qAC:!";
|
||||
beaconPacket += Config.beacon.overlay;
|
||||
beaconPacket += encodedGPS;
|
||||
|
||||
secondaryBeaconPacket = basePacket;
|
||||
secondaryBeaconPacket += ":=";
|
||||
secondaryBeaconPacket += Config.beacon.overlay;
|
||||
secondaryBeaconPacket += encodedGPS;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -284,6 +289,7 @@ namespace Utils {
|
||||
Serial.println("Tx Freq less than 125kHz from Rx Freq ---> NOT VALID");
|
||||
displayShow("Tx Freq is less than ", "125kHz from Rx Freq", "device will autofix", "and then reboot", 1000);
|
||||
Config.loramodule.txFreq = Config.loramodule.rxFreq; // Inform about that but then change the TX QRG to RX QRG and reset the device
|
||||
Config.beacon.beaconFreq = 1; // return to LoRa Tx Beacon Freq
|
||||
Config.writeFile();
|
||||
ESP.restart();
|
||||
}
|
||||
@@ -401,6 +407,7 @@ namespace Utils {
|
||||
cleanCallsign = callsign.substring(0, callsign.indexOf("-"));
|
||||
String ssid = callsign.substring(callsign.indexOf("-") + 1);
|
||||
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++) {
|
||||
if (!isAlphaNumeric(ssid[i])) return false;
|
||||
}
|
||||
|
||||
@@ -177,6 +177,7 @@ namespace WEB_Utils {
|
||||
Config.beacon.interval = getParamIntSafe("beacon.interval", Config.beacon.interval);
|
||||
Config.beacon.sendViaAPRSIS = request->hasParam("beacon.sendViaAPRSIS", true);
|
||||
Config.beacon.sendViaRF = request->hasParam("beacon.sendViaRF", true);
|
||||
Config.beacon.beaconFreq = getParamIntSafe("beacon.beaconFreq", Config.beacon.beaconFreq);
|
||||
Config.beacon.latitude = getParamDoubleSafe("beacon.latitude", Config.beacon.latitude);
|
||||
Config.beacon.longitude = getParamDoubleSafe("beacon.longitude", Config.beacon.longitude);
|
||||
Config.beacon.comment = getParamStringSafe("beacon.comment", Config.beacon.comment);
|
||||
@@ -190,7 +191,7 @@ namespace WEB_Utils {
|
||||
}
|
||||
|
||||
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);
|
||||
|
||||
@@ -198,9 +199,8 @@ namespace WEB_Utils {
|
||||
|
||||
Config.digi.mode = getParamIntSafe("digi.mode", Config.digi.mode);
|
||||
Config.digi.ecoMode = getParamIntSafe("digi.ecoMode", Config.digi.ecoMode);
|
||||
Config.digi.beaconOnRxFreq = request->hasParam("digi.beaconOnRxFreq", true);
|
||||
|
||||
|
||||
|
||||
Config.loramodule.rxActive = request->hasParam("lora.rxActive", true);
|
||||
Config.loramodule.rxFreq = getParamIntSafe("lora.rxFreq", Config.loramodule.rxFreq);
|
||||
Config.loramodule.rxSpreadingFactor = getParamIntSafe("lora.rxSpreadingFactor", Config.loramodule.rxSpreadingFactor);
|
||||
@@ -228,6 +228,9 @@ namespace WEB_Utils {
|
||||
}
|
||||
|
||||
Config.battery.sendExternalVoltage = request->hasParam("battery.sendExternalVoltage", true);
|
||||
if (Config.battery.sendExternalVoltage) {
|
||||
Config.battery.useExternalI2CSensor = request->hasParam("battery.useExternalI2CSensor", true);
|
||||
}
|
||||
if (Config.battery.sendExternalVoltage) {
|
||||
Config.battery.externalVoltagePin = getParamIntSafe("battery.externalVoltagePin", Config.battery.externalVoltagePin);
|
||||
Config.battery.voltageDividerR1 = getParamFloatSafe("battery.voltageDividerR1", Config.battery.voltageDividerR1);
|
||||
@@ -259,6 +262,7 @@ namespace WEB_Utils {
|
||||
Config.tnc.enableServer = request->hasParam("tnc.enableServer", true);
|
||||
Config.tnc.enableSerial = request->hasParam("tnc.enableSerial", 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);
|
||||
|
||||
@@ -60,7 +60,7 @@ namespace WIFI_Utils {
|
||||
Serial.print(millis());
|
||||
Serial.println("Reconnecting to WiFi...");
|
||||
WiFi.disconnect();
|
||||
WIFI_Utils::startWiFi();//WiFi.reconnect();
|
||||
WIFI_Utils::startWiFi();
|
||||
previousWiFiMillis = millis();
|
||||
|
||||
if (Config.backupDigiMode) {
|
||||
@@ -132,7 +132,7 @@ namespace WIFI_Utils {
|
||||
digitalWrite(INTERNAL_LED_PIN,LOW);
|
||||
#endif
|
||||
if (WiFi.status() == WL_CONNECTED) {
|
||||
Serial.print("Connected as ");
|
||||
Serial.print("\nConnected as ");
|
||||
Serial.print(WiFi.localIP());
|
||||
Serial.print(" / MAC Address: ");
|
||||
Serial.println(WiFi.macAddress());
|
||||
|
||||
@@ -42,6 +42,7 @@ float newHum, newTemp, newPress, newGas;
|
||||
|
||||
|
||||
Adafruit_BME280 bme280;
|
||||
Adafruit_AHTX0 aht20;
|
||||
#if defined(HELTEC_V3) || defined(HELTEC_V3_2)
|
||||
Adafruit_BMP280 bmp280(&Wire1);
|
||||
Adafruit_Si7021 si7021 = Adafruit_Si7021();
|
||||
@@ -119,15 +120,19 @@ namespace WX_Utils {
|
||||
Serial.println("BMP280 sensor found");
|
||||
wxModuleType = 2;
|
||||
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()) {
|
||||
Serial.println("Si7021 sensor found");
|
||||
wxModuleType = 4;
|
||||
wxModuleFound = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
#ifdef LIGHTGATEWAY_PLUS_1_0
|
||||
else if (wxModuleAddress == 0x70) {
|
||||
if (shtc3.begin()) {
|
||||
@@ -265,15 +270,27 @@ namespace WX_Utils {
|
||||
newPress = 0;
|
||||
break;
|
||||
case 5: // SHTC3
|
||||
#ifdef LIGHTGATEWAY_PLUS_1_0
|
||||
sensors_event_t humidity, temp;
|
||||
shtc3.getEvent(&humidity, &temp);
|
||||
newTemp = temp.temperature;
|
||||
newHum = humidity.relative_humidity;
|
||||
newPress = 0;
|
||||
#endif
|
||||
{
|
||||
#ifdef LIGHTGATEWAY_PLUS_1_0
|
||||
sensors_event_t humidity, temp;
|
||||
shtc3.getEvent(&humidity, &temp);
|
||||
newTemp = temp.temperature;
|
||||
newHum = humidity.relative_humidity;
|
||||
newPress = 0;
|
||||
#endif
|
||||
}
|
||||
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)) {
|
||||
Serial.println("BME/BMP/Si7021 Module data failed");
|
||||
@@ -281,16 +298,16 @@ namespace WX_Utils {
|
||||
return ".../...g...t...";
|
||||
} else {
|
||||
String tempStr = generateTempString(((newTemp + Config.wxsensor.temperatureCorrection) * 1.8) + 32);
|
||||
|
||||
|
||||
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);
|
||||
} else if (wxModuleType == 2) {
|
||||
humStr = "..";
|
||||
}
|
||||
|
||||
|
||||
String presStr = (wxModuleType == 4 || wxModuleType == 5)
|
||||
? "....."
|
||||
? "....."
|
||||
: generatePresString(newPress + getAltitudeCorrection() / CORRECTION_FACTOR);
|
||||
|
||||
fifthLine = "BME-> ";
|
||||
|
||||
@@ -4,6 +4,9 @@ board_build.mcu = esp32c3
|
||||
build_flags =
|
||||
${common.build_flags}
|
||||
${common.usb_flags}
|
||||
-D RADIOLIB_EXCLUDE_LR11X0=1
|
||||
-D RADIOLIB_EXCLUDE_SX127X=1
|
||||
-D RADIOLIB_EXCLUDE_SX128X=1
|
||||
-D ESP32_C3_OctopusLab_LoRa
|
||||
lib_deps =
|
||||
${common.lib_deps}
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
// LoRa Radio
|
||||
#define HAS_SX1268
|
||||
#define HAS_1W_LORA
|
||||
#define HAS_TCXO
|
||||
#define RADIO_SCLK_PIN 18
|
||||
#define RADIO_MISO_PIN 19
|
||||
#define RADIO_MOSI_PIN 23
|
||||
|
||||
@@ -2,6 +2,9 @@
|
||||
board = esp32dev
|
||||
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
|
||||
lib_deps =
|
||||
${common.lib_deps}
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
// LoRa Radio
|
||||
#define HAS_SX1262
|
||||
#define HAS_1W_LORA
|
||||
#define HAS_TCXO
|
||||
#define RADIO_SCLK_PIN 18
|
||||
#define RADIO_MISO_PIN 19
|
||||
#define RADIO_MOSI_PIN 23
|
||||
|
||||
@@ -2,6 +2,9 @@
|
||||
board = esp32dev
|
||||
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
|
||||
lib_deps =
|
||||
${common.lib_deps}
|
||||
|
||||
@@ -2,6 +2,9 @@
|
||||
board = esp32dev
|
||||
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
|
||||
lib_deps =
|
||||
${common.lib_deps}
|
||||
|
||||
@@ -2,6 +2,9 @@
|
||||
board = esp32dev
|
||||
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
|
||||
lib_deps =
|
||||
${common.lib_deps}
|
||||
|
||||
@@ -2,6 +2,9 @@
|
||||
board = esp32dev
|
||||
build_flags =
|
||||
${common.build_flags}
|
||||
-D RADIOLIB_EXCLUDE_LR11X0=1
|
||||
-D RADIOLIB_EXCLUDE_SX126X=1
|
||||
-D RADIOLIB_EXCLUDE_SX128X=1
|
||||
-D ESP32_DIY_LoRa
|
||||
lib_deps =
|
||||
${common.lib_deps}
|
||||
|
||||
@@ -2,6 +2,9 @@
|
||||
board = esp32dev
|
||||
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
|
||||
lib_deps =
|
||||
${common.lib_deps}
|
||||
|
||||
@@ -2,6 +2,9 @@
|
||||
board = esp32dev
|
||||
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
|
||||
lib_deps =
|
||||
${common.lib_deps}
|
||||
|
||||
@@ -2,6 +2,9 @@
|
||||
board = esp32dev
|
||||
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
|
||||
lib_deps =
|
||||
${common.lib_deps}
|
||||
|
||||
@@ -2,6 +2,9 @@
|
||||
board = esp32dev
|
||||
build_flags =
|
||||
${common.build_flags}
|
||||
-D RADIOLIB_EXCLUDE_LR11X0=1
|
||||
-D RADIOLIB_EXCLUDE_SX126X=1
|
||||
-D RADIOLIB_EXCLUDE_SX128X=1
|
||||
-D LoRaHAM_V2
|
||||
lib_deps =
|
||||
${common.lib_deps}
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
// LoRa Radio
|
||||
#define HAS_SX1268
|
||||
#define HAS_1W_LORA
|
||||
#define HAS_TCXO
|
||||
#define RADIO_SCLK_PIN 18
|
||||
#define RADIO_MISO_PIN 19
|
||||
#define RADIO_MOSI_PIN 23
|
||||
|
||||
@@ -2,6 +2,9 @@
|
||||
board = esp32dev
|
||||
build_flags =
|
||||
${common.build_flags}
|
||||
-D RADIOLIB_EXCLUDE_LR11X0=1
|
||||
-D RADIOLIB_EXCLUDE_SX127X=1
|
||||
-D RADIOLIB_EXCLUDE_SX128X=1
|
||||
-D OE5HWN_MeshCom
|
||||
lib_deps =
|
||||
${common.lib_deps}
|
||||
|
||||
@@ -4,6 +4,9 @@ board_build.mcu = esp32s3
|
||||
build_flags =
|
||||
${common.build_flags}
|
||||
${common.usb_flags}
|
||||
-D RADIOLIB_EXCLUDE_LR11X0=1
|
||||
-D RADIOLIB_EXCLUDE_SX127X=1
|
||||
-D RADIOLIB_EXCLUDE_SX128X=1
|
||||
-D LIGHTGATEWAY_1_0
|
||||
lib_deps =
|
||||
${common.lib_deps}
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
// LoRa Radio
|
||||
#define HAS_SX1268
|
||||
#define HAS_1W_LORA
|
||||
#define HAS_TCXO
|
||||
#define RADIO_VCC_PIN 21
|
||||
#define RADIO_SCLK_PIN 12
|
||||
#define RADIO_MISO_PIN 13
|
||||
|
||||
@@ -4,6 +4,9 @@ board_build.mcu = esp32s3
|
||||
build_flags =
|
||||
${common.build_flags}
|
||||
${common.usb_flags}
|
||||
-D RADIOLIB_EXCLUDE_LR11X0=1
|
||||
-D RADIOLIB_EXCLUDE_SX127X=1
|
||||
-D RADIOLIB_EXCLUDE_SX128X=1
|
||||
-D LIGHTGATEWAY_PLUS_1_0
|
||||
lib_deps =
|
||||
${common.lib_deps}
|
||||
|
||||
@@ -2,6 +2,9 @@
|
||||
board = esp32dev
|
||||
build_flags =
|
||||
${common.build_flags}
|
||||
-D RADIOLIB_EXCLUDE_LR11X0=1
|
||||
-D RADIOLIB_EXCLUDE_SX126X=1
|
||||
-D RADIOLIB_EXCLUDE_SX128X=1
|
||||
-D TROY_LoRa_APRS
|
||||
lib_deps =
|
||||
${common.lib_deps}
|
||||
|
||||
@@ -2,6 +2,9 @@
|
||||
board = wemos_d1_uno32
|
||||
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
|
||||
lib_deps =
|
||||
${common.lib_deps}
|
||||
|
||||
@@ -2,6 +2,9 @@
|
||||
board = lolin32
|
||||
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
|
||||
lib_deps =
|
||||
${common.lib_deps}
|
||||
|
||||
@@ -2,6 +2,9 @@
|
||||
board = lolin_s2_mini
|
||||
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
|
||||
lib_deps =
|
||||
${common.lib_deps}
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
|
||||
// LoRa Radio
|
||||
#define HAS_SX1262
|
||||
#define HAS_TCXO
|
||||
#define RADIO_SCLK_PIN 7
|
||||
#define RADIO_MISO_PIN 8
|
||||
#define RADIO_MOSI_PIN 9
|
||||
|
||||
@@ -3,6 +3,9 @@ board = seeed_xiao_esp32s3
|
||||
build_flags =
|
||||
${common.build_flags}
|
||||
${common.usb_flags}
|
||||
-D RADIOLIB_EXCLUDE_LR11X0=1
|
||||
-D RADIOLIB_EXCLUDE_SX127X=1
|
||||
-D RADIOLIB_EXCLUDE_SX128X=1
|
||||
-D XIAO_ESP32S3_LORA
|
||||
lib_deps =
|
||||
${common.lib_deps}
|
||||
@@ -22,6 +22,7 @@
|
||||
// LoRa Radio
|
||||
#define HAS_SX1268
|
||||
#define HAS_1W_LORA
|
||||
#define HAS_TCXO
|
||||
#define RADIO_SCLK_PIN 8
|
||||
#define RADIO_MISO_PIN 9
|
||||
#define RADIO_MOSI_PIN 10
|
||||
|
||||
@@ -4,6 +4,9 @@ board_build.mcu = esp32c3
|
||||
build_flags =
|
||||
${common.build_flags}
|
||||
${common.usb_flags}
|
||||
-D RADIOLIB_EXCLUDE_LR11X0=1
|
||||
-D RADIOLIB_EXCLUDE_SX127X=1
|
||||
-D RADIOLIB_EXCLUDE_SX128X=1
|
||||
-D ESP32C3_DIY_1W_LoRa
|
||||
lib_deps =
|
||||
${common.lib_deps}
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
// LoRa Radio
|
||||
#define HAS_SX1262
|
||||
#define HAS_1W_LORA
|
||||
#define HAS_TCXO
|
||||
#define RADIO_SCLK_PIN 8
|
||||
#define RADIO_MISO_PIN 9
|
||||
#define RADIO_MOSI_PIN 10
|
||||
|
||||
@@ -4,6 +4,9 @@ board_build.mcu = esp32c3
|
||||
build_flags =
|
||||
${common.build_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
|
||||
lib_deps =
|
||||
${common.lib_deps}
|
||||
|
||||
@@ -2,6 +2,9 @@
|
||||
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
|
||||
lib_deps =
|
||||
${common.lib_deps}
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
|
||||
// LoRa Radio
|
||||
#define HAS_SX1262
|
||||
#define HAS_TCXO
|
||||
#define RADIO_SCLK_PIN 10
|
||||
#define RADIO_MISO_PIN 6
|
||||
#define RADIO_MOSI_PIN 7
|
||||
|
||||
@@ -3,6 +3,9 @@ board = esp32-c3-devkitm-1
|
||||
board_build.mcu = esp32c3
|
||||
build_flags =
|
||||
${common.build_flags}
|
||||
-D RADIOLIB_EXCLUDE_LR11X0=1
|
||||
-D RADIOLIB_EXCLUDE_SX127X=1
|
||||
-D RADIOLIB_EXCLUDE_SX128X=1
|
||||
-D HELTEC_HTCT62
|
||||
lib_deps =
|
||||
${common.lib_deps}
|
||||
|
||||
56
variants/heltec_vision_master_e290/board_pinout.h
Normal file
@@ -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_
|
||||
|
||||
// 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 VEXT_CTRL 18
|
||||
|
||||
#endif
|
||||
13
variants/heltec_vision_master_e290/platformio.ini
Normal file
@@ -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
|
||||
@@ -21,6 +21,7 @@
|
||||
|
||||
// LoRa Radio
|
||||
#define HAS_SX1262
|
||||
#define HAS_TCXO
|
||||
#define RADIO_SCLK_PIN 9
|
||||
#define RADIO_MISO_PIN 11
|
||||
#define RADIO_MOSI_PIN 10
|
||||
|
||||
@@ -3,6 +3,9 @@ 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_V3
|
||||
lib_deps =
|
||||
${common.lib_deps}
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
|
||||
// LoRa Radio
|
||||
#define HAS_SX1262
|
||||
#define HAS_TCXO
|
||||
#define RADIO_SCLK_PIN 9
|
||||
#define RADIO_MISO_PIN 11
|
||||
#define RADIO_MOSI_PIN 10
|
||||
|
||||
@@ -3,6 +3,9 @@ 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_V3_2
|
||||
lib_deps =
|
||||
${common.lib_deps}
|
||||
|
||||
@@ -2,6 +2,9 @@
|
||||
board = esp32dev
|
||||
build_flags =
|
||||
${common.build_flags}
|
||||
-D RADIOLIB_EXCLUDE_LR11X0=1
|
||||
-D RADIOLIB_EXCLUDE_SX126X=1
|
||||
-D RADIOLIB_EXCLUDE_SX128X=1
|
||||
-D HELTEC_WIRELESS_BRIDGE
|
||||
lib_deps =
|
||||
${common.lib_deps}
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
|
||||
// LoRa Radio
|
||||
#define HAS_SX1262
|
||||
#define HAS_TCXO
|
||||
#define RADIO_SCLK_PIN 9
|
||||
#define RADIO_MISO_PIN 11
|
||||
#define RADIO_MOSI_PIN 10
|
||||
|
||||
@@ -3,6 +3,9 @@ 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
|
||||
-D WIRELESS_PAPER
|
||||
lib_deps =
|
||||
|
||||
56
variants/heltec_wireless_paper_v1_2/board_pinout.h
Normal file
@@ -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_
|
||||
|
||||
// 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 VEXT_CTRL 45
|
||||
|
||||
#endif
|
||||