mirror of
https://github.com/MarekZegare4/MeshCore-Solo.git
synced 2026-09-14 23:26:38 +00:00
feat(heltec): solo dual-transport builds for Heltec V3/V4
Port the Wio Tracker L1 solo firmware (full on-device UI, dual BLE/USB companion transport) to Heltec V3 and V4 OLED boards. Neither board has a joystick or CardKB on-board, so each new env wires up both as optional peripherals with default pins from what the board leaves free, gated behind the existing UI_HAS_JOYSTICK/ENV_PIN_SDA+SCL flags. DUAL_SERIAL was nRF52-only; added an ESP32 helpers/esp32/DualSerialInterface.h counterpart so the flag isn't silently ignored on these boards. On V4's native USB CDC, isClientConnected() also honours (bool)Serial (real DTR), same as the nRF52 version; V3 has no native CDC so it stays BLE-only there. Screen (SDA 17/SCL 18) and CardKB (SDA 3/SCL 4) confirmed working on real V4 hardware. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -41,6 +41,9 @@ static uint32_t _atoi(const char* sp) {
|
||||
#ifndef TCP_PORT
|
||||
#define TCP_PORT 5000
|
||||
#endif
|
||||
#elif defined(DUAL_SERIAL)
|
||||
#include <helpers/esp32/DualSerialInterface.h>
|
||||
DualSerialInterface serial_interface;
|
||||
#elif defined(BLE_PIN_CODE)
|
||||
#include <helpers/esp32/SerialBLEInterface.h>
|
||||
SerialBLEInterface serial_interface;
|
||||
@@ -220,6 +223,8 @@ void setup() {
|
||||
|
||||
WiFi.begin(WIFI_SSID, WIFI_PWD);
|
||||
serial_interface.begin(TCP_PORT);
|
||||
#elif defined(DUAL_SERIAL)
|
||||
serial_interface.begin(BLE_NAME_PREFIX, the_mesh.getNodePrefs()->node_name, the_mesh.getBLEPin(), Serial);
|
||||
#elif defined(BLE_PIN_CODE)
|
||||
serial_interface.begin(BLE_NAME_PREFIX, the_mesh.getNodePrefs()->node_name, the_mesh.getBLEPin());
|
||||
#elif defined(SERIAL_RX)
|
||||
|
||||
@@ -13,6 +13,13 @@
|
||||
#ifndef AUTO_OFF_MILLIS
|
||||
#define AUTO_OFF_MILLIS 15000 // 15 seconds
|
||||
#endif
|
||||
// Upstream MeshCore version, shown on the splash screen. Most variants set it in
|
||||
// their platformio.ini; the ones that don't used to fail to compile this file
|
||||
// outright rather than fall back, which quietly made every ui-new env on those
|
||||
// boards unbuildable (heltec v3/v4, thinknode m1/m5, mesh pocket, techo).
|
||||
#ifndef MESHCORE_VERSION
|
||||
#define MESHCORE_VERSION "1.16"
|
||||
#endif
|
||||
#define BOOT_SCREEN_MILLIS 3000 // 3 seconds
|
||||
|
||||
#ifdef PIN_STATUS_LED
|
||||
|
||||
Reference in New Issue
Block a user