Compare commits
31 Commits
| Author | SHA1 | Date |
|---|---|---|
|
|
d26eb28cca | |
|
|
d3a39ddd1e | |
|
|
c5726dda28 | |
|
|
d19f1e8937 | |
|
|
904d022f40 | |
|
|
87ceb9b5a4 | |
|
|
ae4d5baac2 | |
|
|
b4bdd75be9 | |
|
|
e87cf9a44d | |
|
|
647791fd8c | |
|
|
26f8d03fa5 | |
|
|
848eee0da5 | |
|
|
49ef5c03a8 | |
|
|
9530ca43fe | |
|
|
0bfef12d99 | |
|
|
3842e32784 | |
|
|
371317c352 | |
|
|
2026dd2ed2 | |
|
|
418caf2f02 | |
|
|
31ea736a70 | |
|
|
2d52d03276 | |
|
|
029be298e1 | |
|
|
74e06883ed | |
|
|
c53fb354cb | |
|
|
ea25d35c30 | |
|
|
ac1754eace | |
|
|
18fe686b2d | |
|
|
c425a9adc5 | |
|
|
9eaa7164ea | |
|
|
bcc86d058d | |
|
|
1d2511944d |
|
|
@ -37,6 +37,10 @@ jobs:
|
|||
chip: esp32s3
|
||||
- name: heltec_wifi_lora_32_v3_TNC
|
||||
chip: esp32s3
|
||||
- name: heltec_wifi_lora_32_v3_2_GPS
|
||||
chip: esp32s3
|
||||
- name: heltec_wifi_lora_32_v3_2_TNC
|
||||
chip: esp32s3
|
||||
- name: heltec_wireless_stick_lite_v3_GPS_display
|
||||
chip: esp32s3
|
||||
- name: heltec-lora32-v2_GPS
|
||||
|
|
@ -77,6 +81,8 @@ jobs:
|
|||
chip: esp32c3
|
||||
- name: QRPLabs_LightTracker_Plus_1_0
|
||||
chip: esp32s3
|
||||
- name: TROY_LoRa_APRS
|
||||
chip: esp32
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
|
|
|
|||
|
|
@ -23,9 +23,9 @@ ____________________________________________________
|
|||
- Read, Write and Delete Messages (with I2C Keyboard or Phone).
|
||||
- Asking Weather Report.
|
||||
- Listening to other Trackers arround.
|
||||
- Changing Display Eco Mode (turn off after 4 seg) and Screen Brightness.
|
||||
- Changing Display Eco Mode (turn off after 4 seconds) and Screen Brightness.
|
||||
- Processor from 240Mhz to 80MHz to save almost 20% power consumption.
|
||||
- All GPS beacons/packet are encoded for less time on RF/LoRa Tx.
|
||||
- All GPS beacons/packets are encoded for less time on RF/LoRa Tx.
|
||||
- Oled Screen shows Altitude+Speed+Course or BME280 Wx Data or Number of New Messages Received.
|
||||
- Oled Screen shows Recent Heard Trackers/Station/iGates Tx.
|
||||
- Bluetooth capabilities to connect (Android + APRSDroid) or (iPhone + APRS.fi app) and use it as TNC.
|
||||
|
|
@ -53,6 +53,10 @@ ____________________________________________________
|
|||
____________________________________________________
|
||||
## Timeline (Versions):
|
||||
|
||||
- 2025.02.09 Now Bluetooth connections lets you decide to use BLE/BT Classic and KISS/TNC.
|
||||
- 2025.01.11 Added HELTEC V3.2 board support.
|
||||
- 2025.01.07 TROY_LoRa_APRS board added.
|
||||
- 2025.01.02 Buttons added for DIY Boards and Boards without buttons.
|
||||
- 2024.11.13 Added Heltec Wireless Stick Lite V3 + GPS + Oled Display support for another DIY ESP32 Tracker.
|
||||
- 2024.11.13 T-Deck Joystick and Button Pressing Fix for smother operation.
|
||||
- 2024.10.24 Added QRP Labs LightTracker Plus1.0 support.
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ lib_deps =
|
|||
mikalhart/TinyGPSPlus @ 1.0.3
|
||||
paulstoffregen/Time @ 1.6.1
|
||||
peterus/esp-logger @ 1.0.0
|
||||
richonguzman/APRSPacketLib @ 0.0.6
|
||||
richonguzman/APRSPacketLib @ 0.0.7
|
||||
shaggydog/OneButton @ 1.5.0
|
||||
display_libs =
|
||||
adafruit/Adafruit GFX Library @ 1.11.9
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@
|
|||
},
|
||||
"battery": {
|
||||
"sendVoltage": false,
|
||||
"voltageAsTelemetry": true,
|
||||
"voltageAsTelemetry": false,
|
||||
"sendVoltageAlways": false,
|
||||
"monitorVoltage": false,
|
||||
"sleepVoltage": 2.9
|
||||
|
|
@ -104,8 +104,10 @@
|
|||
}
|
||||
],
|
||||
"bluetooth": {
|
||||
"type": 1,
|
||||
"active": false
|
||||
"active": false,
|
||||
"deviceName": "LoRaTracker",
|
||||
"useBLE": false,
|
||||
"useKISS": false
|
||||
},
|
||||
"pttTrigger": {
|
||||
"active": false,
|
||||
|
|
|
|||
|
|
@ -134,7 +134,7 @@
|
|||
<label
|
||||
for="simplifiedTrackerMode"
|
||||
class="form-label"
|
||||
>Simplified Tracker Mode<small> (Only Gps Beacon Tx/No User Menu)</small></label
|
||||
>Simplified Tracker Mode<small> (Only GPS Beacon Tx/No User Menu)</small></label
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -393,7 +393,7 @@
|
|||
</svg>
|
||||
LoRa
|
||||
</h5>
|
||||
<small>Remember to macht your boards posible Frequencies, SF, CR4.</small>
|
||||
<small>Remember to match your boards posible Frequencies, SF, CR4.</small>
|
||||
</div>
|
||||
<div
|
||||
id="lora-settings"
|
||||
|
|
@ -419,7 +419,7 @@
|
|||
</svg>
|
||||
Wx Telemetry
|
||||
</h5>
|
||||
<small>Define Wx Telemetry (Wx Data will only be sended when Station doesn't move for at least 15 min)</small>
|
||||
<small>Define Wx Telemetry (Wx Data will only be sent when Station doesn't move for at least 15 min)</small>
|
||||
</div>
|
||||
<div class="col-9 mt-2">
|
||||
<div class="row">
|
||||
|
|
@ -515,16 +515,49 @@
|
|||
<label
|
||||
for="bluetooth.active"
|
||||
class="form-label"
|
||||
>Enable bluetooth</label
|
||||
>Enable Bluetooth</label
|
||||
>
|
||||
</div>
|
||||
<div class="col-6 mt-1">
|
||||
<label for="bluetooth.type" class="form-label">Bluetooth Type</label>
|
||||
<select name="bluetooth.type" id="bluetooth.type" class="form-control">
|
||||
<option value="0">BLE for iPhone</option>
|
||||
<option value="1">BT Classic</option>
|
||||
<option value="2">BLE for Android</option>
|
||||
</select>
|
||||
<div class="col-12">
|
||||
<label
|
||||
for="bluetooth.deviceName"
|
||||
class="form-label"
|
||||
>Bluetooth Device Name</label>
|
||||
<input
|
||||
name="bluetooth.deviceName"
|
||||
id="bluetooth.deviceName"
|
||||
class="form-control"
|
||||
placeholder="LoRaTracker"
|
||||
value="LoRaTracker"
|
||||
/>
|
||||
</div>
|
||||
<div class="col-12 mt-3">
|
||||
<div class="form-check form-switch">
|
||||
<input
|
||||
type="checkbox"
|
||||
name="bluetooth.useBLE"
|
||||
id="bluetooth.useBLE"
|
||||
class="form-check-input"
|
||||
/>
|
||||
<label
|
||||
for="bluetooth.useBLE"
|
||||
class="form-label"
|
||||
>Enable: use BLE / Disable: use BT Classic</label
|
||||
>
|
||||
</div>
|
||||
<div class="form-check form-switch">
|
||||
<input
|
||||
type="checkbox"
|
||||
name="bluetooth.useKISS"
|
||||
id="bluetooth.useKISS"
|
||||
class="form-check-input"
|
||||
/>
|
||||
<label
|
||||
for="bluetooth.useKISS"
|
||||
class="form-label"
|
||||
>Enable: use KISS / Disable: use TNC2</label
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -246,7 +246,9 @@ function loadSettings(settings) {
|
|||
|
||||
// BLUETOOTH
|
||||
document.getElementById("bluetooth.active").checked = settings.bluetooth.active;
|
||||
document.getElementById("bluetooth.type").value = settings.bluetooth.type;
|
||||
document.getElementById("bluetooth.deviceName").value = settings.bluetooth.deviceName;
|
||||
document.getElementById("bluetooth.useBLE").checked = settings.bluetooth.useBLE;
|
||||
document.getElementById("bluetooth.useKISS").checked = settings.bluetooth.useKISS;
|
||||
|
||||
// PTT Trigger
|
||||
document.getElementById("ptt.active").checked = settings.pttTrigger.active;
|
||||
|
|
|
|||
|
|
@ -91,8 +91,10 @@ public:
|
|||
|
||||
class BLUETOOTH {
|
||||
public:
|
||||
byte type;
|
||||
bool active;
|
||||
String deviceName;
|
||||
bool useBLE;
|
||||
bool useKISS;
|
||||
};
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -394,6 +394,23 @@ static const unsigned char dogSymbol[] PROGMEM = {
|
|||
0b00110000, 0b00011000
|
||||
};
|
||||
|
||||
static const unsigned char wxSymbol[] PROGMEM = {
|
||||
0b00000000, 0b00000000,
|
||||
0b00000000, 0b00000000,
|
||||
0b10001000, 0b10000000,
|
||||
0b10001000, 0b10000000,
|
||||
0b10001000, 0b10000000,
|
||||
0b10001000, 0b10000000,
|
||||
0b01010101, 0b00100010,
|
||||
0b01010101, 0b00010100,
|
||||
0b01010101, 0b00001000,
|
||||
0b01010101, 0b00010100,
|
||||
0b00100010, 0b00100010,
|
||||
0b00000000, 0b00000000,
|
||||
0b00000000, 0b00000000,
|
||||
0b00000000, 0b00000000
|
||||
};
|
||||
|
||||
/*static const unsigned char noSymbol[] PROGMEM = {
|
||||
0b00000000, 0b00000000,
|
||||
0b00000000, 0b00000000,
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ TinyGPSPlus gps;
|
|||
BluetoothSerial SerialBT;
|
||||
#endif
|
||||
|
||||
String versionDate = "2024.12.19";
|
||||
String versionDate = "2025.02.09";
|
||||
|
||||
uint8_t myBeaconsIndex = 0;
|
||||
int myBeaconsSize = Config.beacons.size();
|
||||
|
|
@ -76,6 +76,7 @@ uint32_t refreshDisplayTime = millis();
|
|||
|
||||
bool sendUpdate = true;
|
||||
|
||||
bool bluetoothActive = Config.bluetooth.active;
|
||||
bool bluetoothConnected = false;
|
||||
|
||||
uint32_t lastTx = 0.0;
|
||||
|
|
@ -136,12 +137,14 @@ void setup() {
|
|||
WiFi.mode(WIFI_OFF);
|
||||
logger.log(logging::LoggerLevel::LOGGER_LEVEL_DEBUG, "Main", "WiFi controller stopped");
|
||||
|
||||
if (Config.bluetooth.type == 0 || Config.bluetooth.type == 2) {
|
||||
BLE_Utils::setup();
|
||||
} else {
|
||||
#ifdef HAS_BT_CLASSIC
|
||||
BLUETOOTH_Utils::setup();
|
||||
#endif
|
||||
if (bluetoothActive) {
|
||||
if (Config.bluetooth.useBLE) {
|
||||
BLE_Utils::setup();
|
||||
} else {
|
||||
#ifdef HAS_BT_CLASSIC
|
||||
BLUETOOTH_Utils::setup();
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
if (!Config.simplifiedTrackerMode) {
|
||||
|
|
@ -200,14 +203,16 @@ void loop() {
|
|||
MSG_Utils::processOutputBuffer();
|
||||
MSG_Utils::clean15SegBuffer();
|
||||
|
||||
if (Config.bluetooth.type == 0 || Config.bluetooth.type == 2) {
|
||||
BLE_Utils::sendToPhone(packet.text.substring(3));
|
||||
BLE_Utils::sendToLoRa();
|
||||
} else {
|
||||
#ifdef HAS_BT_CLASSIC
|
||||
BLUETOOTH_Utils::sendToPhone(packet.text.substring(3));
|
||||
BLUETOOTH_Utils::sendToLoRa();
|
||||
#endif
|
||||
if (bluetoothActive) {
|
||||
if (Config.bluetooth.useBLE) {
|
||||
BLE_Utils::sendToPhone(packet.text.substring(3));
|
||||
BLE_Utils::sendToLoRa();
|
||||
} else {
|
||||
#ifdef HAS_BT_CLASSIC
|
||||
BLUETOOTH_Utils::sendToPhone(packet.text.substring(3));
|
||||
BLUETOOTH_Utils::sendToLoRa();
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
MSG_Utils::ledNotification();
|
||||
|
|
|
|||
|
|
@ -15,23 +15,23 @@
|
|||
#define CHARACTERISTIC_UUID_RX_0 "00000002-ba2a-46c9-ae49-01b0961f68bb"
|
||||
|
||||
// ANDROID - BLE Terminal app (Serial Bluetooth Terminal from Playstore)
|
||||
#define SERVICE_UUID_2 "6E400001-B5A3-F393-E0A9-E50E24DCCA9E"
|
||||
#define CHARACTERISTIC_UUID_TX_2 "6E400002-B5A3-F393-E0A9-E50E24DCCA9E"
|
||||
#define CHARACTERISTIC_UUID_RX_2 "6E400003-B5A3-F393-E0A9-E50E24DCCA9E"
|
||||
#define SERVICE_UUID_1 "6E400001-B5A3-F393-E0A9-E50E24DCCA9E"
|
||||
#define CHARACTERISTIC_UUID_TX_1 "6E400002-B5A3-F393-E0A9-E50E24DCCA9E"
|
||||
#define CHARACTERISTIC_UUID_RX_1 "6E400003-B5A3-F393-E0A9-E50E24DCCA9E"
|
||||
|
||||
BLEServer *pServer;
|
||||
BLECharacteristic *pCharacteristicTx;
|
||||
BLECharacteristic *pCharacteristicRx;
|
||||
BLEServer *pServer;
|
||||
BLECharacteristic *pCharacteristicTx;
|
||||
BLECharacteristic *pCharacteristicRx;
|
||||
|
||||
extern Configuration Config;
|
||||
extern Beacon *currentBeacon;
|
||||
extern logging::Logger logger;
|
||||
extern bool bluetoothConnected;
|
||||
extern bool bluetoothActive;
|
||||
|
||||
bool shouldSendBLEtoLoRa = false;
|
||||
String BLEToLoRaPacket = "";
|
||||
|
||||
String kissSerialBuffer = "";
|
||||
String kissSerialBuffer = "";
|
||||
|
||||
|
||||
class MyServerCallbacks : public NimBLEServerCallbacks {
|
||||
|
|
@ -52,7 +52,7 @@ class MyServerCallbacks : public NimBLEServerCallbacks {
|
|||
|
||||
class MyCallbacks : public NimBLECharacteristicCallbacks {
|
||||
void onWrite(NimBLECharacteristic *pCharacteristic) {
|
||||
if (Config.bluetooth.type == 0) { // AX25 KISS
|
||||
if (Config.bluetooth.useKISS) { // KISS (AX.25)
|
||||
std::string receivedData = pCharacteristic->getValue();
|
||||
delay(100);
|
||||
for (int i = 0; i < receivedData.length(); i++) {
|
||||
|
|
@ -72,7 +72,7 @@ class MyCallbacks : public NimBLECharacteristicCallbacks {
|
|||
}
|
||||
}
|
||||
}
|
||||
} else if (Config.bluetooth.type == 2) { // TNC2
|
||||
} else { // TNC2
|
||||
std::string receivedData = pCharacteristic->getValue();
|
||||
String receivedString = "";
|
||||
for (int i = 0; i < receivedData.length(); i++) receivedString += receivedData[i];
|
||||
|
|
@ -90,22 +90,21 @@ namespace BLE_Utils {
|
|||
}
|
||||
|
||||
void setup() {
|
||||
String id = currentBeacon->callsign;
|
||||
String BLEid = id.substring(0, id.indexOf("-")) + "-BLE";
|
||||
BLEDevice::init(BLEid.c_str());
|
||||
String BLEid = Config.bluetooth.deviceName;
|
||||
BLEDevice::init(BLEid.c_str());
|
||||
pServer = BLEDevice::createServer();
|
||||
pServer->setCallbacks(new MyServerCallbacks());
|
||||
|
||||
BLEService *pService = nullptr;
|
||||
|
||||
if (Config.bluetooth.type == 0) {
|
||||
if (Config.bluetooth.useKISS) { // KISS (AX.25)
|
||||
pService = pServer->createService(SERVICE_UUID_0);
|
||||
pCharacteristicTx = pService->createCharacteristic(CHARACTERISTIC_UUID_TX_0, NIMBLE_PROPERTY::READ | NIMBLE_PROPERTY::NOTIFY);
|
||||
pCharacteristicRx = pService->createCharacteristic(CHARACTERISTIC_UUID_RX_0, NIMBLE_PROPERTY::WRITE | NIMBLE_PROPERTY::WRITE_NR);
|
||||
} else if (Config.bluetooth.type == 2) {
|
||||
pService = pServer->createService(SERVICE_UUID_2);
|
||||
pCharacteristicTx = pService->createCharacteristic(CHARACTERISTIC_UUID_TX_2, NIMBLE_PROPERTY::READ | NIMBLE_PROPERTY::NOTIFY);
|
||||
pCharacteristicRx = pService->createCharacteristic(CHARACTERISTIC_UUID_RX_2, NIMBLE_PROPERTY::WRITE | NIMBLE_PROPERTY::WRITE_NR);
|
||||
} else { // TNC2
|
||||
pService = pServer->createService(SERVICE_UUID_1);
|
||||
pCharacteristicTx = pService->createCharacteristic(CHARACTERISTIC_UUID_TX_1, NIMBLE_PROPERTY::READ | NIMBLE_PROPERTY::NOTIFY);
|
||||
pCharacteristicRx = pService->createCharacteristic(CHARACTERISTIC_UUID_RX_1, NIMBLE_PROPERTY::WRITE | NIMBLE_PROPERTY::WRITE_NR);
|
||||
}
|
||||
|
||||
if (pService != nullptr) {
|
||||
|
|
@ -114,10 +113,10 @@ namespace BLE_Utils {
|
|||
|
||||
BLEAdvertising* pAdvertising = BLEDevice::getAdvertising();
|
||||
|
||||
if (Config.bluetooth.type == 0) {
|
||||
if (Config.bluetooth.useKISS) {
|
||||
pAdvertising->addServiceUUID(SERVICE_UUID_0);
|
||||
} else if (Config.bluetooth.type == 2) {
|
||||
pAdvertising->addServiceUUID(SERVICE_UUID_2);
|
||||
} else {
|
||||
pAdvertising->addServiceUUID(SERVICE_UUID_1);
|
||||
}
|
||||
pServer->getAdvertising()->setScanResponse(true);
|
||||
pServer->getAdvertising()->setMinPreferred(0x06);
|
||||
|
|
@ -125,7 +124,7 @@ namespace BLE_Utils {
|
|||
pAdvertising->start();
|
||||
logger.log(logging::LoggerLevel::LOGGER_LEVEL_DEBUG, "BLE", "%s", "Waiting for BLE central to connect...");
|
||||
} else {
|
||||
logger.log(logging::LoggerLevel::LOGGER_LEVEL_ERROR, "BLE", "Failed to create BLE service. Invalid bluetoothType: %d", Config.bluetooth.type);
|
||||
logger.log(logging::LoggerLevel::LOGGER_LEVEL_ERROR, "BLE", "Failed to create BLE service");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -155,7 +154,7 @@ namespace BLE_Utils {
|
|||
}
|
||||
|
||||
void txToPhoneOverBLE(const String& frame) {
|
||||
if (Config.bluetooth.type == 0) { // AX25 KISS
|
||||
if (Config.bluetooth.useKISS) { // KISS (AX.25)
|
||||
const String kissEncodedFrame = KISS_Utils::encodeKISS(frame);
|
||||
|
||||
const char* t = kissEncodedFrame.c_str();
|
||||
|
|
@ -171,7 +170,7 @@ namespace BLE_Utils {
|
|||
delete[] chunk;
|
||||
delay(200);
|
||||
}
|
||||
} else { // TNC2
|
||||
} else { // TNC2
|
||||
for (int n = 0; n < frame.length(); n++) txBLE(frame[n]);
|
||||
txBLE('\n');
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,16 +14,14 @@ extern BluetoothSerial SerialBT;
|
|||
extern logging::Logger logger;
|
||||
extern TinyGPSPlus gps;
|
||||
extern bool bluetoothConnected;
|
||||
|
||||
bool bluetoothActive;
|
||||
extern bool bluetoothActive;
|
||||
|
||||
namespace BLUETOOTH_Utils {
|
||||
String serialReceived;
|
||||
bool shouldSendToLoRa = false;
|
||||
bool useKiss = false;
|
||||
bool useKiss = Config.bluetooth.useKISS? true : false;
|
||||
|
||||
void setup() {
|
||||
bluetoothActive = Config.bluetooth.active;
|
||||
if (!bluetoothActive) {
|
||||
btStop();
|
||||
esp_bt_controller_disable();
|
||||
|
|
@ -36,8 +34,7 @@ namespace BLUETOOTH_Utils {
|
|||
SerialBT.register_callback(BLUETOOTH_Utils::bluetoothCallback);
|
||||
SerialBT.onData(BLUETOOTH_Utils::getData); // callback instead of while to avoid RX buffer limit when NMEA data received
|
||||
|
||||
String id = currentBeacon->callsign;
|
||||
String BTid = id.substring(0, id.indexOf("-")) + "-BT";
|
||||
String BTid = Config.bluetooth.deviceName;
|
||||
|
||||
if (!SerialBT.begin(String(BTid))) {
|
||||
logger.log(logging::LoggerLevel::LOGGER_LEVEL_ERROR, "Bluetooth", "Starting Bluetooth failed!");
|
||||
|
|
@ -46,14 +43,13 @@ namespace BLUETOOTH_Utils {
|
|||
delay(1000);
|
||||
}
|
||||
}
|
||||
logger.log(logging::LoggerLevel::LOGGER_LEVEL_INFO, "Bluetooth", "Bluetooth init done!");
|
||||
logger.log(logging::LoggerLevel::LOGGER_LEVEL_INFO, "Bluetooth", "Bluetooth Classic init done!");
|
||||
}
|
||||
|
||||
void bluetoothCallback(esp_spp_cb_event_t event, esp_spp_cb_param_t *param) {
|
||||
if (event == ESP_SPP_SRV_OPEN_EVT) {
|
||||
logger.log(logging::LoggerLevel::LOGGER_LEVEL_INFO, "Bluetooth", "Client connected !");
|
||||
bluetoothConnected = true;
|
||||
useKiss = false;
|
||||
} else if (event == ESP_SPP_CLOSE_EVT) {
|
||||
logger.log(logging::LoggerLevel::LOGGER_LEVEL_INFO, "Bluetooth", "Client disconnected !");
|
||||
bluetoothConnected = false;
|
||||
|
|
@ -63,9 +59,7 @@ namespace BLUETOOTH_Utils {
|
|||
}
|
||||
|
||||
void getData(const uint8_t *buffer, size_t size) {
|
||||
if (size == 0) {
|
||||
return;
|
||||
}
|
||||
if (size == 0) return;
|
||||
shouldSendToLoRa = false;
|
||||
serialReceived.clear();
|
||||
bool isNmea = buffer[0] == '$';
|
||||
|
|
@ -111,7 +105,7 @@ namespace BLUETOOTH_Utils {
|
|||
}
|
||||
|
||||
void sendToPhone(const String& packet) {
|
||||
if (!packet.isEmpty() && bluetoothActive) {
|
||||
if (!packet.isEmpty()) {
|
||||
if (useKiss) {
|
||||
logger.log(logging::LoggerLevel::LOGGER_LEVEL_DEBUG, "BT RX Kiss", "%s", serialReceived.c_str());
|
||||
SerialBT.println(KISS_Utils::encodeKISS(packet));
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
#include <ArduinoJson.h>
|
||||
#include <SPIFFS.h>
|
||||
#include "configuration.h"
|
||||
#include "board_pinout.h"
|
||||
#include "display.h"
|
||||
#include "logger.h"
|
||||
|
||||
|
|
@ -75,8 +76,14 @@ void Configuration::writeFile() {
|
|||
data["pttTrigger"]["postDelay"] = ptt.postDelay;
|
||||
data["pttTrigger"]["reverse"] = ptt.reverse;
|
||||
|
||||
data["bluetooth"]["type"] = bluetooth.type;
|
||||
data["bluetooth"]["active"] = bluetooth.active;
|
||||
data["bluetooth"]["deviceName"] = bluetooth.deviceName;
|
||||
#ifdef HAS_BT_CLASSIC
|
||||
data["bluetooth"]["useBLE"] = bluetooth.useBLE;
|
||||
#else
|
||||
data["bluetooth"]["useBLE"] = true; // fixed as BLE
|
||||
#endif
|
||||
data["bluetooth"]["useKISS"] = bluetooth.useKISS;
|
||||
|
||||
data["other"]["simplifiedTrackerMode"] = simplifiedTrackerMode;
|
||||
data["other"]["sendCommentAfterXBeacons"] = sendCommentAfterXBeacons;
|
||||
|
|
@ -175,8 +182,15 @@ bool Configuration::readFile() {
|
|||
ptt.postDelay = data["pttTrigger"]["postDelay"] | 0;
|
||||
ptt.reverse = data["pttTrigger"]["reverse"] | false;
|
||||
|
||||
bluetooth.type = data["bluetooth"]["type"] | 1;
|
||||
bluetooth.active = data["bluetooth"]["active"] | false;
|
||||
bluetooth.deviceName = data["bluetooth"]["deviceName"] | "LoRaTracker";
|
||||
#ifdef HAS_BT_CLASSIC
|
||||
bluetooth.useBLE = data["bluetooth"]["useBLE"] | false;
|
||||
bluetooth.useKISS = data["bluetooth"]["useKISS"] | false;
|
||||
#else
|
||||
bluetooth.useBLE = true; // fixed as BLE
|
||||
bluetooth.useKISS = data["bluetooth"]["useKISS"] | true; // true=KISS, false=TNC2
|
||||
#endif
|
||||
|
||||
simplifiedTrackerMode = data["other"]["simplifiedTrackerMode"] | false;
|
||||
sendCommentAfterXBeacons = data["other"]["sendCommentAfterXBeacons"] | 10;
|
||||
|
|
@ -299,9 +313,16 @@ void Configuration::init() {
|
|||
ptt.postDelay = 0;
|
||||
ptt.reverse = false;
|
||||
|
||||
bluetooth.type = 1;
|
||||
bluetooth.active = false;
|
||||
|
||||
bluetooth.deviceName = "LoRaTracker";
|
||||
#ifdef HAS_BT_CLASSIC
|
||||
bluetooth.useBLE = false;
|
||||
bluetooth.useKISS = false;
|
||||
#else
|
||||
bluetooth.useBLE = true; // fixed as BLE
|
||||
bluetooth.useKISS = true;
|
||||
#endif
|
||||
|
||||
simplifiedTrackerMode = false;
|
||||
sendCommentAfterXBeacons = 10;
|
||||
path = "WIDE1-1";
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@
|
|||
#endif
|
||||
#if defined(TTGO_T_DECK_GPS) || defined(TTGO_T_DECK_PLUS)
|
||||
#define color1 TFT_BLACK
|
||||
#define color2 0x0249
|
||||
#define color2 0x0249
|
||||
#define green 0x1B08
|
||||
|
||||
#define bigSizeFont 4
|
||||
|
|
@ -48,7 +48,7 @@
|
|||
#if defined(TTGO_T_Beam_S3_SUPREME_V3)
|
||||
#undef ssd1306
|
||||
#endif
|
||||
#if defined(HELTEC_V3_GPS) || defined(HELTEC_V3_TNC)
|
||||
#if defined(HELTEC_V3_GPS) || defined(HELTEC_V3_TNC) || defined(HELTEC_V3_2_GPS) || defined(HELTEC_V3_2_TNC)
|
||||
#define OLED_DISPLAY_HAS_RST_PIN
|
||||
#endif
|
||||
|
||||
|
|
@ -70,12 +70,12 @@ extern int menuDisplay;
|
|||
extern bool bluetoothConnected;
|
||||
|
||||
const char* symbolArray[] = { "[", ">", "j", "b", "<", "s", "u", "R", "v", "(", ";", "-", "k",
|
||||
"C", "a", "Y", "O", "'", "=", "y", "U", "p"};
|
||||
"C", "a", "Y", "O", "'", "=", "y", "U", "p", "_"};
|
||||
int symbolArraySize = sizeof(symbolArray)/sizeof(symbolArray[0]);
|
||||
const uint8_t *symbolsAPRS[] = {runnerSymbol, carSymbol, jeepSymbol, bikeSymbol, motorcycleSymbol, shipSymbol,
|
||||
truck18Symbol, recreationalVehicleSymbol, vanSymbol, carsateliteSymbol, tentSymbol,
|
||||
houseSymbol, truckSymbol, canoeSymbol, ambulanceSymbol, yatchSymbol, baloonSymbol,
|
||||
aircraftSymbol, trainSymbol, yagiSymbol, busSymbol, dogSymbol};
|
||||
aircraftSymbol, trainSymbol, yagiSymbol, busSymbol, dogSymbol, wxSymbol};
|
||||
// T-Beams bought with soldered OLED Screen comes with only 4 pins (VCC, GND, SDA, SCL)
|
||||
// If your board didn't come with 4 pins OLED Screen and comes with 5 and one of them is RST...
|
||||
// Uncomment Next Line (Remember ONLY if your OLED Screen has a RST pin). This is to avoid memory issues.
|
||||
|
|
@ -88,7 +88,7 @@ bool symbolAvailable = true;
|
|||
extern logging::Logger logger;
|
||||
|
||||
|
||||
#if defined(HAS_TFT) && (defined(TTGO_T_DECK_PLUS) || defined(TTGO_T_DECK_GPS))
|
||||
#if defined(HAS_TFT) && (defined(TTGO_T_DECK_GPS) || defined(TTGO_T_DECK_PLUS))
|
||||
void drawButton(int xPos, int yPos, int wide, int height, String buttonText, int color) {
|
||||
uint16_t baseColor, lightColor, darkColor;
|
||||
switch (color) {
|
||||
|
|
@ -318,10 +318,12 @@ void displaySetup() {
|
|||
} else {
|
||||
tft.setRotation(1);
|
||||
}
|
||||
analogWrite(BOARD_BL_PIN, brightnessValues[tftBrightness]);
|
||||
pinMode(TFT_BL, OUTPUT);
|
||||
digitalWrite(TFT_BL, HIGH);
|
||||
//analogWrite(BOARD_BL_PIN, brightnessValues[tftBrightness]);
|
||||
tft.setTextFont(0);
|
||||
tft.fillScreen(TFT_BLACK);
|
||||
#if defined(TTGO_T_DECK_PLUS) || defined(TTGO_T_DECK_GPS)
|
||||
#if defined(TTGO_T_DECK_GPS) || defined(TTGO_T_DECK_PLUS)
|
||||
sprite.createSprite(320,240);
|
||||
#else
|
||||
sprite.createSprite(160,80);
|
||||
|
|
@ -331,7 +333,7 @@ void displaySetup() {
|
|||
grays[i] = tft.color565(co, co, co);
|
||||
co = co - 20;
|
||||
}
|
||||
#else
|
||||
#else
|
||||
#ifdef OLED_DISPLAY_HAS_RST_PIN
|
||||
pinMode(OLED_RST, OUTPUT);
|
||||
digitalWrite(OLED_RST, LOW);
|
||||
|
|
@ -343,14 +345,12 @@ void displaySetup() {
|
|||
#ifdef ssd1306
|
||||
if (!display.begin(SSD1306_SWITCHCAPVCC, 0x3c, false, false)) {
|
||||
logger.log(logging::LoggerLevel::LOGGER_LEVEL_ERROR, "SSD1306", "allocation failed!");
|
||||
while (true) {
|
||||
}
|
||||
while (true) {}
|
||||
}
|
||||
#else
|
||||
if (!display.begin(0x3c, false)) {
|
||||
logger.log(logging::LoggerLevel::LOGGER_LEVEL_ERROR, "SH1106", "allocation failed!");
|
||||
while (true) {
|
||||
}
|
||||
while (true) {}
|
||||
}
|
||||
#endif
|
||||
if (Config.display.turn180) display.setRotation(2);
|
||||
|
|
@ -398,7 +398,7 @@ void displayToggle(bool toggle) {
|
|||
|
||||
void displayShow(const String& header, const String& line1, const String& line2, int wait) {
|
||||
#ifdef HAS_TFT
|
||||
#if defined(TTGO_T_DECK_PLUS) || defined(TTGO_T_DECK_GPS)
|
||||
#if defined(TTGO_T_DECK_GPS) || defined(TTGO_T_DECK_PLUS)
|
||||
draw_T_DECK_Top();
|
||||
String tftLine1, tftLine2, tftLine3, tftLine4;
|
||||
if (line1.length() > 22 && line2.length() > 22) {
|
||||
|
|
@ -438,7 +438,7 @@ void displayShow(const String& header, const String& line1, const String& line2,
|
|||
sprite.setTextColor(TFT_WHITE, TFT_BLACK);
|
||||
|
||||
for (int i = 0; i < 2; i++) {
|
||||
sprite.drawString(*lines[i], 3,(lineSpacing * (2 + i)) - 2);
|
||||
sprite.drawString(*lines[i], 3, (lineSpacing * (2 + i)) - 2);
|
||||
}
|
||||
#endif
|
||||
sprite.pushSprite(0,0);
|
||||
|
|
@ -489,8 +489,8 @@ void drawSymbol(int symbolIndex, bool bluetoothActive) {
|
|||
|
||||
void displayShow(const String& header, const String& line1, const String& line2, const String& line3, const String& line4, const String& line5, int wait) {
|
||||
#ifdef HAS_TFT
|
||||
#if defined(TTGO_T_DECK_PLUS)
|
||||
draw_T_DECK_Top();//header, line1, line2);
|
||||
#if defined(TTGO_T_DECK_GPS) || defined(TTGO_T_DECK_PLUS)
|
||||
draw_T_DECK_Top();
|
||||
draw_T_DECK_Body(header, line1, line2, line3, line4, line5);
|
||||
#endif
|
||||
#if defined(HELTEC_WIRELESS_TRACKER)
|
||||
|
|
@ -507,7 +507,7 @@ void displayShow(const String& header, const String& line1, const String& line2,
|
|||
sprite.setTextColor(TFT_WHITE, TFT_BLACK);
|
||||
|
||||
for (int i = 0; i < 5; i++) {
|
||||
sprite.drawString(*lines[i], 3,(lineSpacing * (2 + i)) - 2);
|
||||
sprite.drawString(*lines[i], 3, (lineSpacing * (2 + i)) - 2);
|
||||
}
|
||||
#endif
|
||||
if (menuDisplay == 0 && Config.display.showSymbol) {
|
||||
|
|
@ -583,7 +583,7 @@ void displayShow(const String& header, const String& line1, const String& line2,
|
|||
} else if (bluetoothConnected) { // TODO In this case, the text symbol stay displayed due to symbolAvailable false in menu_utils
|
||||
drawSymbol(symbol, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
display.display();
|
||||
#endif
|
||||
delay(wait);
|
||||
|
|
@ -628,5 +628,5 @@ void displayMessage(const String& sender, const String& message, const int& line
|
|||
} else {
|
||||
displayShow("< MSG Rx >", "From --> " + sender, "", fillMessageLine(messageLine1, lineLength) , fillMessageLine(messageLine2, lineLength), fillMessageLine(messageLine3, lineLength), wait);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -270,7 +270,7 @@ namespace KEYBOARD_Utils {
|
|||
statusState = true;
|
||||
statusTime = millis();
|
||||
winlinkCommentState = false;
|
||||
displayShow("__ INFO __", "", " CHANGING CALLSIGN!", "", "-----> " + Config.beacons[myBeaconsIndex].callsign, "", 2000);
|
||||
displayShow(" INFO", "", " CHANGING CALLSIGN!", "", "-----> " + Config.beacons[myBeaconsIndex].callsign, "", 2000);
|
||||
STATION_Utils::saveIndex(0, myBeaconsIndex);
|
||||
sendStartTelemetry = true;
|
||||
if (menuDisplay == 200) menuDisplay = 20;
|
||||
|
|
@ -321,25 +321,25 @@ namespace KEYBOARD_Utils {
|
|||
} else if (menuDisplay == 220) {
|
||||
if (!displayEcoMode) {
|
||||
displayEcoMode = true;
|
||||
displayShow("_DISPLAY__", "", " ECO MODE -> ON", 1000);
|
||||
displayShow(" DISPLAY", "", " ECO MODE -> ON", 1000);
|
||||
} else {
|
||||
displayEcoMode = false;
|
||||
displayShow("_DISPLAY__", "", " ECO MODE -> OFF", 1000);
|
||||
displayShow(" DISPLAY", "", " ECO MODE -> OFF", 1000);
|
||||
}
|
||||
} else if (menuDisplay == 221) {
|
||||
if (screenBrightness ==1) {
|
||||
displayShow("_SCREEN___", "", "SCREEN BRIGHTNESS MAX", 1000);
|
||||
displayShow(" SCREEN", "", "SCREEN BRIGHTNESS MAX", 1000);
|
||||
screenBrightness = 255;
|
||||
} else {
|
||||
displayShow("_SCREEN___", "", "SCREEN BRIGHTNESS MIN", 1000);
|
||||
displayShow(" SCREEN", "", "SCREEN BRIGHTNESS MIN", 1000);
|
||||
screenBrightness = 1;
|
||||
}
|
||||
} else if (menuDisplay == 240) {
|
||||
displayShow("_STATUS___", "", "WRITE STATUS","STILL IN DEVELOPMENT!", "", "", 2000); /////////////////////////
|
||||
displayShow(" STATUS", "", "WRITE STATUS","STILL IN DEVELOPMENT!", "", "", 2000); /////////////////////////
|
||||
} else if (menuDisplay == 241) {
|
||||
displayShow("_STATUS___", "", "SELECT STATUS","STILL IN DEVELOPMENT!", "", "", 2000); /////////////////////////
|
||||
displayShow(" STATUS", "", "SELECT STATUS","STILL IN DEVELOPMENT!", "", "", 2000); /////////////////////////
|
||||
} else if (menuDisplay == 250) {
|
||||
displayShow("_NOTIFIC__", "", "NOTIFICATIONS","STILL IN DEVELOPMENT!", "", "", 2000); /////////////////////////
|
||||
displayShow(" NOTIFIC", "", "NOTIFICATIONS","STILL IN DEVELOPMENT!", "", "", 2000); /////////////////////////
|
||||
}
|
||||
|
||||
else if (menuDisplay == 4) {
|
||||
|
|
@ -368,10 +368,10 @@ namespace KEYBOARD_Utils {
|
|||
} else if (menuDisplay == 53) {
|
||||
if (winlinkCommentState) {
|
||||
winlinkCommentState = false;
|
||||
displayShow("_WINLINK_>", "", " WLNK COMMENTs OFF!", 2000);
|
||||
displayShow(" WINLINK>", "", " WLNK COMMENTs OFF!", 2000);
|
||||
} else {
|
||||
winlinkCommentState = true;
|
||||
displayShow("_WINLINK_>", "", " WLNK COMMENTs ON!", 2000);
|
||||
displayShow(" WINLINK>", "", " WLNK COMMENTs ON!", 2000);
|
||||
}
|
||||
} else if (menuDisplay == 5000) {
|
||||
MSG_Utils::addToOutputBuffer(1, "WLNK-1", "L");
|
||||
|
|
@ -438,32 +438,32 @@ namespace KEYBOARD_Utils {
|
|||
} else if (menuDisplay == 60) {
|
||||
if (Config.notification.ledFlashlight) {
|
||||
if (flashlight) {
|
||||
displayShow("__EXTRAS__", ""," Flashlight"," Status --> OFF", "", "", 2000);
|
||||
displayShow(" EXTRAS", ""," Flashlight"," Status --> OFF", "", "", 2000);
|
||||
flashlight = false;
|
||||
} else {
|
||||
displayShow("__EXTRAS__", ""," Flashlight"," Status --> ON", "", "", 2000);
|
||||
displayShow(" EXTRAS", ""," Flashlight"," Status --> ON", "", "", 2000);
|
||||
flashlight = true;
|
||||
}
|
||||
} else {
|
||||
displayShow("__EXTRAS__", ""," Flashlight","NOT ACTIVE IN CONFIG!", "", "", 2000);
|
||||
displayShow(" EXTRAS", ""," Flashlight","NOT ACTIVE IN CONFIG!", "", "", 2000);
|
||||
}
|
||||
} else if (menuDisplay == 61) {
|
||||
if (digipeaterActive) {
|
||||
displayShow("__EXTRAS__", ""," Digipeater"," Status --> OFF", "", "", 2000);
|
||||
displayShow(" EXTRAS", ""," Digipeater"," Status --> OFF", "", "", 2000);
|
||||
logger.log(logging::LoggerLevel::LOGGER_LEVEL_WARN, "Main", "%s", "Digipeater OFF");
|
||||
digipeaterActive = false;
|
||||
} else {
|
||||
displayShow("__EXTRAS__", ""," Digipeater"," Status --> ON","", "", 2000);
|
||||
displayShow(" EXTRAS", ""," Digipeater"," Status --> ON","", "", 2000);
|
||||
logger.log(logging::LoggerLevel::LOGGER_LEVEL_WARN, "Main", "%s", "Digipeater ON");
|
||||
digipeaterActive = true;
|
||||
}
|
||||
} else if (menuDisplay == 62) {
|
||||
if (sosActive) {
|
||||
displayShow("__EXTRAS__", ""," S.O.S."," Status --> OFF", "", "", 2000);
|
||||
displayShow(" EXTRAS", ""," S.O.S."," Status --> OFF", "", "", 2000);
|
||||
logger.log(logging::LoggerLevel::LOGGER_LEVEL_WARN, "Main", "%s", "S.O.S Mode OFF");
|
||||
sosActive = false;
|
||||
} else {
|
||||
displayShow("__EXTRAS__", ""," S.O.S."," Status --> ON", "", "", 2000);
|
||||
displayShow(" EXTRAS", ""," S.O.S."," Status --> ON", "", "", 2000);
|
||||
logger.log(logging::LoggerLevel::LOGGER_LEVEL_WARN, "Main", "%s", "S.O.S Mode ON");
|
||||
sosActive = true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -63,15 +63,10 @@ uint8_t lowBatteryPercent = 21;
|
|||
namespace MENU_Utils {
|
||||
|
||||
const String checkBTType() {
|
||||
switch (Config.bluetooth.type) {
|
||||
case 0:
|
||||
return "BLE iPhone";
|
||||
case 1:
|
||||
return "BT Android";
|
||||
case 2:
|
||||
return "BLE Text";
|
||||
default:
|
||||
return "no BT";
|
||||
if (Config.bluetooth.useBLE) {
|
||||
return "BLE";
|
||||
} else {
|
||||
return "BT Classic";
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -403,7 +398,7 @@ namespace MENU_Utils {
|
|||
displayShow(" WINLINK>", "" , "Login Initiation ...", "Challenge -> waiting", "" , "");
|
||||
break;
|
||||
case 501: // 5.Winlink ---> Login
|
||||
displayShow(" WINLINK>", "" , "Login Initiation ...", "Challenge -> sended", "" , "");
|
||||
displayShow(" WINLINK>", "" , "Login Initiation ...", "Challenge -> sent", "" , "");
|
||||
break;
|
||||
case 502: // 5.Winlink ---> Login
|
||||
displayShow(" WINLINK>", "" , "Login Initiation ...", "Challenge -> ack ...", "" , "");
|
||||
|
|
@ -657,8 +652,8 @@ namespace MENU_Utils {
|
|||
if (POWER_Utils::getBatteryInfoIsConnected()) {
|
||||
String batteryVoltage = POWER_Utils::getBatteryInfoVoltage();
|
||||
String batteryCharge = POWER_Utils::getBatteryInfoCurrent();
|
||||
#if defined(TTGO_T_Beam_V0_7) || defined(TTGO_T_LORA32_V2_1_GPS) || defined(TTGO_T_LORA32_V2_1_GPS_915) || defined(TTGO_T_LORA32_V2_1_TNC) || defined(TTGO_T_LORA32_V2_1_TNC_915) || defined(HELTEC_V3_GPS) || defined(HELTEC_V3_TNC) || defined(HELTEC_WIRELESS_TRACKER) || defined(HELTEC_WSL_V3_GPS_DISPLAY) || defined(TTGO_T_DECK_GPS) || defined(TTGO_T_DECK_PLUS)
|
||||
sixthRowMainMenu = "Battery: ";
|
||||
#if defined(TTGO_T_Beam_V0_7) || defined(TTGO_T_LORA32_V2_1_GPS) || defined(TTGO_T_LORA32_V2_1_GPS_915) || defined(TTGO_T_LORA32_V2_1_TNC) || defined(TTGO_T_LORA32_V2_1_TNC_915) || defined(HELTEC_V3_GPS) || defined(HELTEC_V3_TNC) || defined(HELTEC_V3_2_GPS) || defined(HELTEC_V3_2_TNC) || defined(HELTEC_WIRELESS_TRACKER) || defined(HELTEC_WSL_V3_GPS_DISPLAY) || defined(TTGO_T_DECK_GPS) || defined(TTGO_T_DECK_PLUS) || defined(LIGHTTRACKER_PLUS_1_0)
|
||||
sixthRowMainMenu = "Battery: ";
|
||||
sixthRowMainMenu += batteryVoltage;
|
||||
sixthRowMainMenu += "V ";
|
||||
sixthRowMainMenu += BATTERY_Utils::getPercentVoltageBattery(batteryVoltage.toFloat());
|
||||
|
|
|
|||
|
|
@ -491,7 +491,7 @@ namespace MSG_Utils {
|
|||
menuDisplay = 500;
|
||||
} else if ((winlinkStatus >= 1 || winlinkStatus <= 3) &&lastReceivedPacket.payload.indexOf("Login [") == 0) {
|
||||
WINLINK_Utils::processWinlinkChallenge(lastReceivedPacket.payload.substring(lastReceivedPacket.payload.indexOf("[")+1,lastReceivedPacket.payload.indexOf("]")));
|
||||
logger.log(logging::LoggerLevel::LOGGER_LEVEL_INFO, "Winlink","---> Challenge Received/Processed/Sended");
|
||||
logger.log(logging::LoggerLevel::LOGGER_LEVEL_INFO, "Winlink","---> Challenge Received/Processed/Sent");
|
||||
lastMsgRxTime = millis();
|
||||
winlinkStatus = 3;
|
||||
menuDisplay = 501;
|
||||
|
|
@ -504,13 +504,13 @@ namespace MSG_Utils {
|
|||
logger.log(logging::LoggerLevel::LOGGER_LEVEL_INFO, "Winlink","---> Login Succesfull");
|
||||
lastMsgRxTime = millis();
|
||||
winlinkStatus = 5;
|
||||
displayShow("_WINLINK_>", "", " LOGGED !!!!", 2000);
|
||||
displayShow(" WINLINK>", "", " LOGGED !!!!", 2000);
|
||||
cleanOutputAckRequestBuffer("WLNK-1");
|
||||
menuDisplay = 5000;
|
||||
} else if (winlinkStatus == 5 && lastReceivedPacket.payload.indexOf("Log off successful") == 0 ) {
|
||||
logger.log(logging::LoggerLevel::LOGGER_LEVEL_INFO, "Winlink","---> Log Out");
|
||||
lastMsgRxTime = millis();
|
||||
displayShow("_WINLINK_>", "", " LOG OUT !!!", 2000);
|
||||
displayShow(" WINLINK>", "", " LOG OUT !!!", 2000);
|
||||
cleanOutputAckRequestBuffer("WLNK-1");
|
||||
lastChallengeTime = 0;
|
||||
winlinkStatus = 0;
|
||||
|
|
|
|||
|
|
@ -56,16 +56,16 @@ namespace POWER_Utils {
|
|||
#else
|
||||
#ifdef BATTERY_PIN
|
||||
#ifdef ADC_CTRL
|
||||
#ifdef HELTEC_WIRELESS_TRACKER
|
||||
#if defined(HELTEC_WIRELESS_TRACKER) || defined(HELTEC_V3_2_GPS) || defined(HELTEC_V3_2_TNC)
|
||||
digitalWrite(ADC_CTRL, HIGH);
|
||||
#endif
|
||||
#if defined(HELTEC_V3_GPS) || defined(HELTEC_V3_TNC)|| defined(HELTEC_V2_GPS) || defined(HELTEC_V2_GPS_915) || defined(HELTEC_V2_TNC) || defined(HELTEC_WSL_V3_GPS_DISPLAY)
|
||||
#if defined(HELTEC_V3_GPS) || defined(HELTEC_V3_TNC) || defined(HELTEC_V2_GPS) || defined(HELTEC_V2_GPS_915) || defined(HELTEC_V2_TNC) || defined(HELTEC_WSL_V3_GPS_DISPLAY)
|
||||
digitalWrite(ADC_CTRL, LOW);
|
||||
#endif
|
||||
#endif
|
||||
int adc_value = analogRead(BATTERY_PIN);
|
||||
#ifdef ADC_CTRL
|
||||
#ifdef HELTEC_WIRELESS_TRACKER
|
||||
#if defined(HELTEC_WIRELESS_TRACKER) || defined(HELTEC_V3_2_GPS) || defined(HELTEC_V3_2_TNC)
|
||||
digitalWrite(ADC_CTRL, LOW);
|
||||
#endif
|
||||
#if defined(HELTEC_V3_GPS) || defined(HELTEC_V3_TNC) || defined(HELTEC_V2_GPS) || defined(HELTEC_V2_GPS_915) || defined(HELTEC_V2_TNC) || defined(HELTEC_WSL_V3_GPS_DISPLAY)
|
||||
|
|
@ -73,14 +73,17 @@ namespace POWER_Utils {
|
|||
#endif
|
||||
batteryMeasurmentTime = millis();
|
||||
#endif
|
||||
double voltage = (adc_value * 3.3 ) / 4095.0;
|
||||
|
||||
double voltage = (adc_value * 3.3 ) / 4095.0;
|
||||
|
||||
#ifdef LIGHTTRACKER_PLUS_1_0
|
||||
return voltage * 6.783;
|
||||
double inputDivider = (1.0 / (560.0 + 100.0)) * 100.0; // The voltage divider is a 560k + 100k resistor in series, 100k on the low side.
|
||||
return (voltage / inputDivider) + 0.1;
|
||||
#endif
|
||||
#if defined(TTGO_T_Beam_V0_7) || defined(TTGO_T_LORA32_V2_1_GPS) || defined(TTGO_T_LORA32_V2_1_GPS_915) || defined(TTGO_T_LORA32_V2_1_TNC) || defined(TTGO_T_LORA32_V2_1_TNC_915) || defined(ESP32_DIY_LoRa_GPS) || defined(ESP32_DIY_LoRa_GPS_915) || defined(ESP32_DIY_1W_LoRa_GPS) || defined(ESP32_DIY_1W_LoRa_GPS_915) || defined(ESP32_DIY_1W_LoRa_GPS_LLCC68) || defined(OE5HWN_MeshCom) || defined(TTGO_T_DECK_GPS) || defined(TTGO_T_DECK_PLUS) || defined(ESP32S3_DIY_LoRa_GPS) || defined(ESP32S3_DIY_LoRa_GPS_915)
|
||||
#if defined(TTGO_T_Beam_V0_7) || defined(TTGO_T_LORA32_V2_1_GPS) || defined(TTGO_T_LORA32_V2_1_GPS_915) || defined(TTGO_T_LORA32_V2_1_TNC) || defined(TTGO_T_LORA32_V2_1_TNC_915) || defined(ESP32_DIY_LoRa_GPS) || defined(ESP32_DIY_LoRa_GPS_915) || defined(ESP32_DIY_1W_LoRa_GPS) || defined(ESP32_DIY_1W_LoRa_GPS_915) || defined(ESP32_DIY_1W_LoRa_GPS_LLCC68) || defined(OE5HWN_MeshCom) || defined(TTGO_T_DECK_GPS) || defined(TTGO_T_DECK_PLUS) || defined(ESP32S3_DIY_LoRa_GPS) || defined(ESP32S3_DIY_LoRa_GPS_915) || defined(TROY_LoRa_APRS)
|
||||
return (2 * (voltage + 0.1)) * (1 + (lora32BatReadingCorr/100)); // (2 x 100k voltage divider) 2 x voltage divider/+0.1 because ESP32 nonlinearity ~100mV ADC offset/extra correction
|
||||
#endif
|
||||
#if defined(HELTEC_V3_GPS) || defined(HELTEC_V3_TNC)|| defined(HELTEC_WIRELESS_TRACKER) || defined(HELTEC_WSL_V3_GPS_DISPLAY) || defined(ESP32_C3_DIY_LoRa_GPS) || defined(ESP32_C3_DIY_LoRa_GPS_915) || defined(WEMOS_ESP32_Bat_LoRa_GPS)
|
||||
#if defined(HELTEC_V3_GPS) || defined(HELTEC_V3_TNC) || defined(HELTEC_V3_2_GPS) || defined(HELTEC_V3_2_TNC) || defined(HELTEC_WIRELESS_TRACKER) || defined(HELTEC_WSL_V3_GPS_DISPLAY) || defined(ESP32_C3_DIY_LoRa_GPS) || defined(ESP32_C3_DIY_LoRa_GPS_915) || defined(WEMOS_ESP32_Bat_LoRa_GPS)
|
||||
double inputDivider = (1.0 / (390.0 + 100.0)) * 100.0; // The voltage divider is a 390k + 100k resistor in series, 100k on the low side.
|
||||
return (voltage / inputDivider) + 0.285; // Yes, this offset is excessive, but the ADC on the ESP32s3 is quite inaccurate and noisy. Adjust to own measurements.
|
||||
#endif
|
||||
|
|
@ -417,8 +420,13 @@ namespace POWER_Utils {
|
|||
#endif
|
||||
|
||||
#ifdef VEXT_CTRL
|
||||
pinMode(VEXT_CTRL,OUTPUT); // this is for GPS and TFT screen on Wireless_Tracker and only for Oled in Heltec V3
|
||||
digitalWrite(VEXT_CTRL, HIGH);
|
||||
pinMode(VEXT_CTRL,OUTPUT);
|
||||
#if defined(HELTEC_V3_GPS) || defined(HELTEC_V3_TNC) || defined(HELTEC_WIRELESS_TRACKER) || defined(HELTEC_WSL_V3_GPS_DISPLAY)
|
||||
digitalWrite(VEXT_CTRL, HIGH); // HWT needs this for GPS and TFT Screen
|
||||
#endif
|
||||
#if defined(HELTEC_V3_2_GPS) || defined(HELTEC_V3_2_TNC)
|
||||
digitalWrite(VEXT_CTRL, LOW);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef ADC_CTRL
|
||||
|
|
@ -429,7 +437,7 @@ namespace POWER_Utils {
|
|||
Wire.begin(BOARD_I2C_SDA, BOARD_I2C_SCL);
|
||||
#endif
|
||||
|
||||
#if defined(HELTEC_V3_GPS) || defined(HELTEC_V3_TNC) || defined(HELTEC_WSL_V3_GPS_DISPLAY)
|
||||
#if defined(HELTEC_V3_GPS) || defined(HELTEC_V3_TNC) || defined(HELTEC_V3_2_GPS) || defined(HELTEC_V3_2_TNC) || defined(HELTEC_WSL_V3_GPS_DISPLAY)
|
||||
Wire1.begin(BOARD_I2C_SDA, BOARD_I2C_SCL);
|
||||
#endif
|
||||
|
||||
|
|
@ -466,18 +474,23 @@ namespace POWER_Utils {
|
|||
PMU.shutdown();
|
||||
#else
|
||||
|
||||
if (Config.bluetooth.type == 0 || Config.bluetooth.type == 2) {
|
||||
if (Config.bluetooth.useBLE) {
|
||||
BLE_Utils::stop();
|
||||
} else {
|
||||
// turn off BT classic ???
|
||||
}
|
||||
|
||||
#ifdef VEXT_CTRL
|
||||
digitalWrite(VEXT_CTRL, LOW);
|
||||
#if defined(HELTEC_V3_GPS) || defined(HELTEC_V3_TNC) || defined(HELTEC_WIRELESS_TRACKER) || defined(HELTEC_WSL_V3_GPS_DISPLAY)
|
||||
digitalWrite(VEXT_CTRL, LOW);
|
||||
#endif
|
||||
#if defined(HELTEC_V3_2_GPS) || defined(HELTEC_V3_2_TNC)
|
||||
digitalWrite(VEXT_CTRL, HIGH);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef ADC_CTRL
|
||||
#ifdef HELTEC_WIRELESS_TRACKER
|
||||
#if defined(HELTEC_WIRELESS_TRACKER) || defined(HELTEC_V3_2_GPS) || defined(HELTEC_V3_2_TNC)
|
||||
digitalWrite(ADC_CTRL, LOW);
|
||||
#endif
|
||||
#if defined(HELTEC_V3_GPS) || defined(HELTEC_V3_TNC) || defined(HELTEC_WSL_V3_GPS_DISPLAY)
|
||||
|
|
|
|||
|
|
@ -287,7 +287,7 @@ namespace STATION_Utils {
|
|||
displayShow("<<< TX >>>", "", packet, 100);
|
||||
LoRa_Utils::sendNewPacket(packet);
|
||||
|
||||
if (Config.bluetooth.type == 0 || Config.bluetooth.type == 2) BLE_Utils::sendToPhone(packet); // send Tx packets to Phone too
|
||||
if (Config.bluetooth.useBLE) BLE_Utils::sendToPhone(packet); // send Tx packets to Phone too
|
||||
|
||||
if (shouldSleepLowVoltage) {
|
||||
delay(3000);
|
||||
|
|
|
|||
|
|
@ -127,7 +127,7 @@ namespace Utils {
|
|||
uint8_t err, addr;
|
||||
if (Config.wxsensor.active) {
|
||||
for (addr = 1; addr < 0x7F; addr++) {
|
||||
#ifdef HELTEC_V3_GPS
|
||||
#if defined(HELTEC_V3_GPS) || defined(HELTEC_V3_2_GPS)
|
||||
Wire1.beginTransmission(addr);
|
||||
err = Wire1.endTransmission();
|
||||
#else
|
||||
|
|
|
|||
|
|
@ -179,7 +179,9 @@ namespace WEB_Utils {
|
|||
|
||||
// Bluetooth
|
||||
Config.bluetooth.active = request->hasParam("bluetooth.active", true);
|
||||
Config.bluetooth.type = request->getParam("bluetooth.type", true)->value().toInt();
|
||||
Config.bluetooth.deviceName = request->getParam("bluetooth.deviceName", true)->value();
|
||||
Config.bluetooth.useBLE = request->hasParam("bluetooth.useBLE", true);
|
||||
Config.bluetooth.useKISS = request->hasParam("bluetooth.useKISS", true);
|
||||
|
||||
// PTT Trigger
|
||||
Config.ptt.active = request->hasParam("ptt.active", true);
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ namespace WINLINK_Utils {
|
|||
String number = String(winlinkInteger[i]);
|
||||
int digit = number.toInt();
|
||||
if (digit > Config.winlink.password.length()) {
|
||||
displayShow("__WINLINK_", "" , "PASS Length<REQUIRED", "", "" , "", 2000);
|
||||
displayShow(" WINLINK", "" , "PASS Length<REQUIRED", "", "" , "", 2000);
|
||||
challengeAnswer += Config.winlink.password[0];
|
||||
} else {
|
||||
challengeAnswer += Config.winlink.password[digit - 1];
|
||||
|
|
@ -50,7 +50,7 @@ namespace WINLINK_Utils {
|
|||
|
||||
void login() {
|
||||
logger.log(logging::LoggerLevel::LOGGER_LEVEL_INFO, "Winlink","---> Start Login");
|
||||
displayShow("__WINLINK_", "" , "Login Initiation ...", "", "" , "<Back");
|
||||
displayShow(" WINLINK", "" , "Login Initiation ...", "", "" , "<Back");
|
||||
if (winlinkStatus == 5) {
|
||||
menuDisplay = 5000;
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ bool wxModuleFound = false;
|
|||
|
||||
|
||||
Adafruit_BME280 bme280;
|
||||
#ifdef HELTEC_V3_GPS
|
||||
#if defined(HELTEC_V3_GPS) || defined(HELTEC_V3_TNC) || defined(HELTEC_V3_2_GPS) || defined(HELTEC_V3_2_TNC)
|
||||
Adafruit_BMP280 bmp280(&Wire1);
|
||||
#else
|
||||
Adafruit_BMP280 bmp280;
|
||||
|
|
@ -47,9 +47,11 @@ namespace WX_Utils {
|
|||
while (1) delay(1);
|
||||
}
|
||||
logger.log(logging::LoggerLevel::LOGGER_LEVEL_INFO, "BME", " SHTC3 sensor found");
|
||||
wxModuleFound = true;
|
||||
wxModuleType = 4;
|
||||
#else
|
||||
if (wxModuleAddress != 0x00) {
|
||||
#ifdef HELTEC_V3_GPS
|
||||
#if defined(HELTEC_V3_GPS) || defined(HELTEC_V3_TNC) || defined(HELTEC_V3_2_GPS) || defined(HELTEC_V3_2_TNC)
|
||||
if (bme280.begin(wxModuleAddress, &Wire1)) {
|
||||
logger.log(logging::LoggerLevel::LOGGER_LEVEL_INFO, "BME", " BME280 sensor found");
|
||||
wxModuleType = 1;
|
||||
|
|
@ -99,7 +101,7 @@ namespace WX_Utils {
|
|||
logger.log(logging::LoggerLevel::LOGGER_LEVEL_INFO, "BMP", " BMP280 Module init done!");
|
||||
break;
|
||||
case 3:
|
||||
#ifndef HELTEC_V3_GPS
|
||||
#if !defined(HELTEC_V3_GPS) && !defined(HELTEC_V3_TNC) && !defined(HELTEC_V3_2_GPS) && !defined(HELTEC_V3_2_TNC)
|
||||
bme680.setTemperatureOversampling(BME680_OS_1X);
|
||||
bme680.setHumidityOversampling(BME680_OS_1X);
|
||||
bme680.setPressureOversampling(BME680_OS_1X);
|
||||
|
|
@ -226,7 +228,7 @@ namespace WX_Utils {
|
|||
newHum = 0;
|
||||
break;
|
||||
case 3: // BME680
|
||||
#ifndef HELTEC_V3_GPS
|
||||
#if !defined(HELTEC_V3_GPS) && !defined(HELTEC_V3_TNC) && !defined(HELTEC_V3_2_GPS) && !defined(HELTEC_V3_2_TNC)
|
||||
bme680.performReading();
|
||||
delay(50);
|
||||
if (bme680.endReading()) {
|
||||
|
|
|
|||
|
|
@ -23,7 +23,8 @@
|
|||
#define GPS_RX 12
|
||||
#define GPS_TX 34
|
||||
|
||||
// OTHER
|
||||
// OTHER
|
||||
#define BUTTON_PIN 15
|
||||
#define BATTERY_PIN 35 //LoRa32 Battery PIN 100k/100k
|
||||
|
||||
#endif
|
||||
|
|
@ -23,7 +23,8 @@
|
|||
#define GPS_RX 12
|
||||
#define GPS_TX 34
|
||||
|
||||
// OTHER
|
||||
// OTHER
|
||||
#define BUTTON_PIN 15
|
||||
#define BATTERY_PIN 35 //LoRa32 Battery PIN 100k/100k
|
||||
|
||||
#endif
|
||||
|
|
@ -27,9 +27,9 @@
|
|||
#define GPS_RX 17
|
||||
#define GPS_TX 16
|
||||
|
||||
// OTHER
|
||||
#define BATTERY_PIN 35
|
||||
// OTHER
|
||||
#define BUTTON_PIN 15
|
||||
#define BATTERY_PIN 35
|
||||
|
||||
#define HAS_BT_CLASSIC
|
||||
|
||||
|
|
|
|||
|
|
@ -27,9 +27,9 @@
|
|||
#define GPS_RX 17
|
||||
#define GPS_TX 16
|
||||
|
||||
// OTHER
|
||||
#define BATTERY_PIN 35
|
||||
// OTHER
|
||||
#define BUTTON_PIN 15
|
||||
#define BATTERY_PIN 35
|
||||
|
||||
#define HAS_BT_CLASSIC
|
||||
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@
|
|||
#define GPS_RX 17
|
||||
#define GPS_TX 16
|
||||
|
||||
// OTHER
|
||||
// OTHER
|
||||
#define BUTTON_PIN 15
|
||||
#define BATTERY_PIN 35
|
||||
|
||||
|
|
|
|||
|
|
@ -23,7 +23,8 @@
|
|||
#define GPS_RX 12
|
||||
#define GPS_TX 34
|
||||
|
||||
// OTHER
|
||||
// OTHER
|
||||
#define BUTTON_PIN 15
|
||||
#define BATTERY_PIN 35 //LoRa32 Battery PIN 100k/100k
|
||||
|
||||
#define HAS_BT_CLASSIC
|
||||
|
|
|
|||
|
|
@ -23,7 +23,8 @@
|
|||
#define GPS_RX 12
|
||||
#define GPS_TX 34
|
||||
|
||||
// OTHER
|
||||
// OTHER
|
||||
#define BUTTON_PIN 15
|
||||
#define BATTERY_PIN 35 //LoRa32 Battery PIN 100k/100k
|
||||
|
||||
#define HAS_BT_CLASSIC
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@
|
|||
#define GPS_RX 17
|
||||
#define GPS_TX 16
|
||||
|
||||
// OTHER
|
||||
// OTHER
|
||||
#define BUTTON_PIN 12
|
||||
#define BATTERY_PIN 35
|
||||
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@
|
|||
#define GPS_TX 18
|
||||
#define GPS_VCC 33 //#define LED_PIN 16
|
||||
|
||||
// OTHER
|
||||
// OTHER
|
||||
#define BUTTON_PIN 0
|
||||
#define BATTERY_PIN 1
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,31 @@
|
|||
#ifndef BOARD_PINOUT_H_
|
||||
#define BOARD_PINOUT_H_
|
||||
|
||||
// LoRa Radio
|
||||
#define HAS_SX1278
|
||||
#define RADIO_SCLK_PIN 5
|
||||
#define RADIO_MISO_PIN 19
|
||||
#define RADIO_MOSI_PIN 27
|
||||
#define RADIO_CS_PIN 18
|
||||
#define RADIO_RST_PIN 23
|
||||
#define RADIO_BUSY_PIN 26
|
||||
|
||||
// Display
|
||||
#undef OLED_SDA
|
||||
#undef OLED_SCL
|
||||
#undef OLED_RST
|
||||
|
||||
#define OLED_SDA 21
|
||||
#define OLED_SCL 22
|
||||
#define OLED_RST -1
|
||||
|
||||
// GPS
|
||||
#define GPS_RX 12
|
||||
#define GPS_TX 34
|
||||
|
||||
// OTHER
|
||||
#define BUTTON_PIN 4
|
||||
|
||||
#define HAS_BT_CLASSIC
|
||||
|
||||
#endif
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
[env:TROY_LoRa_APRS]
|
||||
extends = env:esp32
|
||||
board = esp32dev
|
||||
build_flags =
|
||||
${common.build_flags}
|
||||
-D TROY_LoRa_APRS
|
||||
lib_deps =
|
||||
${common.lib_deps}
|
||||
${common.display_libs}
|
||||
adafruit/Adafruit SH110X @ 2.1.10
|
||||
|
|
@ -24,7 +24,7 @@
|
|||
#define GPS_RX 4
|
||||
#define GPS_TX 17
|
||||
|
||||
// OTHER
|
||||
// OTHER
|
||||
#define BUTTON_PIN 15
|
||||
#define BATTERY_PIN 35
|
||||
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@
|
|||
#define GPS_RX 20
|
||||
#define GPS_TX 21
|
||||
|
||||
// OTHER
|
||||
// OTHER
|
||||
#define BATTERY_PIN 1
|
||||
|
||||
#endif
|
||||
|
|
@ -23,7 +23,7 @@
|
|||
#define GPS_RX 20
|
||||
#define GPS_TX 21
|
||||
|
||||
// OTHER
|
||||
// OTHER
|
||||
#define BATTERY_PIN 1
|
||||
|
||||
#endif
|
||||
|
|
@ -24,7 +24,7 @@
|
|||
#define GPS_RX 12
|
||||
#define GPS_TX 34
|
||||
|
||||
// OTHER
|
||||
// OTHER
|
||||
#define BATTERY_PIN 37
|
||||
#define BUTTON_PIN 0
|
||||
#define ADC_CTRL 21
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@
|
|||
#define GPS_RX 12
|
||||
#define GPS_TX 34
|
||||
|
||||
// OTHER
|
||||
// OTHER
|
||||
#define BATTERY_PIN 37
|
||||
#define BUTTON_PIN 0
|
||||
#define ADC_CTRL 21
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@
|
|||
#define GPS_RX -1
|
||||
#define GPS_TX -1
|
||||
|
||||
// OTHER
|
||||
// OTHER
|
||||
#define BATTERY_PIN 37
|
||||
#define BUTTON_PIN 0
|
||||
#define ADC_CTRL 21
|
||||
|
|
|
|||
|
|
@ -0,0 +1,36 @@
|
|||
#ifndef BOARD_PINOUT_H_
|
||||
#define BOARD_PINOUT_H_
|
||||
|
||||
// LoRa Radio
|
||||
#define HAS_SX1262
|
||||
#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
|
||||
|
||||
// Display
|
||||
#undef OLED_SDA
|
||||
#undef OLED_SCL
|
||||
#undef OLED_RST
|
||||
|
||||
#define OLED_SDA 17
|
||||
#define OLED_SCL 18
|
||||
#define OLED_RST 21
|
||||
|
||||
// GPS
|
||||
#define GPS_RX 47
|
||||
#define GPS_TX 48
|
||||
|
||||
// OTHER
|
||||
#define BUTTON_PIN 0
|
||||
#define BATTERY_PIN 1
|
||||
#define VEXT_CTRL 36
|
||||
#define ADC_CTRL 37
|
||||
|
||||
#define BOARD_I2C_SDA 41
|
||||
#define BOARD_I2C_SCL 42
|
||||
|
||||
#endif
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
[env:heltec_wifi_lora_32_v3_2_GPS]
|
||||
extends = env:esp32
|
||||
board = heltec_wifi_lora_32_V3
|
||||
board_build.mcu = esp32s3
|
||||
build_flags =
|
||||
${common.build_flags}
|
||||
${common.usb_flags}
|
||||
-D HELTEC_V3_2_GPS
|
||||
lib_deps =
|
||||
${common.lib_deps}
|
||||
${common.display_libs}
|
||||
|
|
@ -0,0 +1,37 @@
|
|||
#ifndef BOARD_PINOUT_H_
|
||||
#define BOARD_PINOUT_H_
|
||||
|
||||
// LoRa Radio
|
||||
#define HAS_SX1262
|
||||
#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
|
||||
|
||||
// Display
|
||||
#undef OLED_SDA
|
||||
#undef OLED_SCL
|
||||
#undef OLED_RST
|
||||
|
||||
#define OLED_SDA 17
|
||||
#define OLED_SCL 18
|
||||
#define OLED_RST 21
|
||||
|
||||
// GPS
|
||||
#define HAS_NO_GPS
|
||||
#define GPS_RX -1
|
||||
#define GPS_TX -1
|
||||
|
||||
// OTHER
|
||||
#define BUTTON_PIN 0
|
||||
#define BATTERY_PIN 1
|
||||
#define VEXT_CTRL 36
|
||||
#define ADC_CTRL 37 // Heltec V3 needs ADC_CTRL = LOW powers the voltage divider to read BatteryPin
|
||||
|
||||
#define BOARD_I2C_SDA 41
|
||||
#define BOARD_I2C_SCL 42
|
||||
|
||||
#endif
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
[env:heltec_wifi_lora_32_v3_2_TNC]
|
||||
extends = env:esp32
|
||||
board = heltec_wifi_lora_32_V3
|
||||
board_build.mcu = esp32s3
|
||||
build_flags =
|
||||
${common.build_flags}
|
||||
${common.usb_flags}
|
||||
-D HELTEC_V3_2_TNC
|
||||
lib_deps =
|
||||
${common.lib_deps}
|
||||
${common.display_libs}
|
||||
|
|
@ -24,11 +24,11 @@
|
|||
#define GPS_RX 47
|
||||
#define GPS_TX 48
|
||||
|
||||
// OTHER
|
||||
// OTHER
|
||||
#define BUTTON_PIN 0
|
||||
#define BATTERY_PIN 1
|
||||
#define VEXT_CTRL 36
|
||||
#define ADC_CTRL 37 // Heltec V3 needs ADC_CTRL = LOW powers the voltage divider to read BatteryPin
|
||||
#define ADC_CTRL 37
|
||||
|
||||
#define BOARD_I2C_SDA 41
|
||||
#define BOARD_I2C_SCL 42
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@
|
|||
#define GPS_RX -1
|
||||
#define GPS_TX -1
|
||||
|
||||
// OTHER
|
||||
// OTHER
|
||||
#define BUTTON_PIN 0
|
||||
#define BATTERY_PIN 1
|
||||
#define VEXT_CTRL 36
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@
|
|||
#define GPS_RX 47
|
||||
#define GPS_TX 48
|
||||
|
||||
// OTHER
|
||||
// OTHER
|
||||
#define BUTTON_PIN 0
|
||||
#define BATTERY_PIN 1
|
||||
#define VEXT_CTRL 36
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@
|
|||
#define GPS_RESET 35
|
||||
#define GPS_BAUDRATE 115200
|
||||
|
||||
// OTHER
|
||||
// OTHER
|
||||
#define BUTTON_PIN 0
|
||||
#define WAKEUP_BUTTON GPIO_NUM_0
|
||||
#define BATTERY_PIN 1
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@
|
|||
#define GPS_RX 15
|
||||
#define GPS_TX 12
|
||||
|
||||
// OTHER
|
||||
// OTHER
|
||||
#define BUTTON_PIN 39 // The middle button GPIO on the T-Beam
|
||||
#define BATTERY_PIN 35
|
||||
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@
|
|||
#define GPS_RX 12
|
||||
#define GPS_TX 34
|
||||
|
||||
// OTHER
|
||||
// OTHER
|
||||
#define BUTTON_PIN 38 // The middle button GPIO on the T-Beam
|
||||
|
||||
#define HAS_AXP192
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@
|
|||
#define GPS_RX 12
|
||||
#define GPS_TX 34
|
||||
|
||||
// OTHER
|
||||
// OTHER
|
||||
#define BUTTON_PIN 38 // The middle button GPIO on the T-Beam
|
||||
|
||||
#define HAS_AXP2101
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@
|
|||
#define GPS_RX 12
|
||||
#define GPS_TX 34
|
||||
|
||||
// OTHER
|
||||
// OTHER
|
||||
#define BUTTON_PIN 38 // The middle button GPIO on the T-Beam
|
||||
|
||||
#define HAS_AXP2101
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@
|
|||
#define GPS_RX 12
|
||||
#define GPS_TX 34
|
||||
|
||||
// OTHER
|
||||
// OTHER
|
||||
#define BUTTON_PIN 38 // The middle button GPIO on the T-Beam
|
||||
|
||||
#define HAS_AXP2101
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@
|
|||
#define GPS_RX 12
|
||||
#define GPS_TX 34
|
||||
|
||||
// OTHER
|
||||
// OTHER
|
||||
#define BUTTON_PIN 38 // The middle button GPIO on the T-Beam
|
||||
|
||||
#define HAS_AXP192
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@
|
|||
#define GPS_RX 12
|
||||
#define GPS_TX 34
|
||||
|
||||
// OTHER
|
||||
// OTHER
|
||||
#define BUTTON_PIN 38 // The middle button GPIO on the T-Beam
|
||||
|
||||
#define HAS_AXP192
|
||||
|
|
|
|||
|
|
@ -23,7 +23,8 @@
|
|||
#define GPS_RX 12
|
||||
#define GPS_TX 34
|
||||
|
||||
// OTHER
|
||||
// OTHER
|
||||
#define BUTTON_PIN 15
|
||||
#define BATTERY_PIN 35
|
||||
|
||||
#define HAS_BT_CLASSIC
|
||||
|
|
|
|||
|
|
@ -23,7 +23,8 @@
|
|||
#define GPS_RX 12
|
||||
#define GPS_TX 34
|
||||
|
||||
// OTHER
|
||||
// OTHER
|
||||
#define BUTTON_PIN 15
|
||||
#define BATTERY_PIN 35
|
||||
|
||||
#define HAS_BT_CLASSIC
|
||||
|
|
|
|||
|
|
@ -24,7 +24,8 @@
|
|||
#define GPS_RX -1
|
||||
#define GPS_TX -1
|
||||
|
||||
// OTHER
|
||||
// OTHER
|
||||
#define BUTTON_PIN 15
|
||||
#define BATTERY_PIN 35
|
||||
|
||||
#define HAS_BT_CLASSIC
|
||||
|
|
|
|||
|
|
@ -24,7 +24,8 @@
|
|||
#define GPS_RX -1
|
||||
#define GPS_TX -1
|
||||
|
||||
// OTHER
|
||||
// OTHER
|
||||
#define BUTTON_PIN 15
|
||||
#define BATTERY_PIN 35
|
||||
|
||||
#define HAS_BT_CLASSIC
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@
|
|||
#define GPS_RX 8
|
||||
#define GPS_TX 9
|
||||
|
||||
// OTHER
|
||||
// OTHER
|
||||
#define BUTTON_PIN 0
|
||||
|
||||
#define HAS_AXP2101
|
||||
|
|
|
|||
|
|
@ -21,9 +21,8 @@
|
|||
// GPS
|
||||
#define GPS_RX 43
|
||||
#define GPS_TX 44
|
||||
#define GPS_BAUDRATE 38400
|
||||
|
||||
// OTHER
|
||||
// OTHER
|
||||
#define BATTERY_PIN 4
|
||||
|
||||
#define BOARD_POWERON 10
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@
|
|||
#define GPS_TX 44
|
||||
#define GPS_BAUDRATE 38400
|
||||
|
||||
// OTHER
|
||||
// OTHER
|
||||
#define BATTERY_PIN 4
|
||||
|
||||
#define BOARD_POWERON 10
|
||||
|
|
|
|||
Loading…
Reference in New Issue