mirror of
https://github.com/MarekZegare4/MeshCore-Solo.git
synced 2026-08-07 20:56:11 +00:00
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>
42 lines
1.1 KiB
C
42 lines
1.1 KiB
C
#pragma once
|
|
|
|
#define RADIOLIB_STATIC_ONLY 1
|
|
#include <RadioLib.h>
|
|
#include <helpers/radiolib/RadioLibWrappers.h>
|
|
#include <HeltecV4Board.h>
|
|
#include <helpers/radiolib/CustomSX1262Wrapper.h>
|
|
#include <helpers/AutoDiscoverRTCClock.h>
|
|
#include <helpers/SensorManager.h>
|
|
#include <helpers/sensors/EnvironmentSensorManager.h>
|
|
#ifdef DISPLAY_CLASS
|
|
#ifdef HELTEC_LORA_V4_OLED
|
|
#include <helpers/ui/SSD1306Display.h>
|
|
#elif defined(HELTEC_LORA_V4_TFT)
|
|
#include <helpers/ui/ST7789LCDDisplay.h>
|
|
#endif
|
|
#include <helpers/ui/MomentaryButton.h>
|
|
#endif
|
|
|
|
extern HeltecV4Board board;
|
|
extern WRAPPER_CLASS radio_driver;
|
|
extern AutoDiscoverRTCClock rtc_clock;
|
|
extern EnvironmentSensorManager sensors;
|
|
|
|
#ifdef DISPLAY_CLASS
|
|
extern DISPLAY_CLASS display;
|
|
extern MomentaryButton user_btn;
|
|
#if UI_HAS_JOYSTICK
|
|
extern MomentaryButton joystick_left;
|
|
extern MomentaryButton joystick_right;
|
|
extern MomentaryButton back_btn;
|
|
#if UI_HAS_JOYSTICK_UPDOWN
|
|
extern MomentaryButton joystick_up;
|
|
extern MomentaryButton joystick_down;
|
|
#endif
|
|
#endif
|
|
#endif
|
|
|
|
bool radio_init();
|
|
mesh::LocalIdentity radio_new_identity();
|
|
|