mirror of
https://github.com/MarekZegare4/MeshCore-Solo.git
synced 2026-10-09 19:26:40 +00:00
Seeed Wio Tracker L2 (ESP32-S3R8 16MB/8MB PSRAM, SX1262, NV3031B 320x240 QSPI LCD + GT911 touch + LP5814 backlight, TCA9535 expander gating every rail, ADS1115 battery ADC, AW35615 USB-C, L76K GNSS). Board layer ported from meshcore-dev/MeshCore PR #3381 (Hacuchino-hash), kept at the same paths for an easy upstream merge. Differences: - display: dropped the UIColor theme (not adopted in this fork) - GpsTap diagnostics wrapper omitted; GNSS reads Serial1 directly - nv3031b ODR fix dropped: LovyanGFX >= 1.2.30 (now pinned) defines Panel_NV3031B::init_cmds itself -- the fix became a duplicate symbol - MESH_DEBUG_PRINTLN with a non-literal format fixed (broke MESH_DEBUG builds) - upload_speed 115200: baud is virtual on native USB; skips the switch solo/wio-tracker-l2 adds Wio_Tracker_L2_companion_solo_bringup: ui-new zoomed 2x, BOOT button only, no touch -- a hardware smoke test, not a release target (deliberately not *_solo_dual, so CI doesn't publish it). The real UI for this board will be a new LVGL frontend. Verified on hardware: boot, display, radio, GPS, battery, BLE app link. First boot takes tens of seconds while SPIFFS formats its 3.4 MB partition. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
35 lines
951 B
C++
35 lines
951 B
C++
#include <Arduino.h>
|
|
#include "target.h"
|
|
|
|
WioTrackerL2Board board;
|
|
|
|
static SPIClass spi;
|
|
RADIO_CLASS radio = new Module(P_LORA_NSS, P_LORA_DIO_1, P_LORA_RESET, P_LORA_BUSY, spi);
|
|
|
|
WRAPPER_CLASS radio_driver(radio, board);
|
|
|
|
ESP32RTCClock fallback_clock;
|
|
AutoDiscoverRTCClock rtc_clock(fallback_clock);
|
|
MicroNMEALocationProvider gps(Serial1, &rtc_clock);
|
|
EnvironmentSensorManager sensors(gps);
|
|
|
|
#ifdef DISPLAY_CLASS
|
|
DISPLAY_CLASS display;
|
|
MomentaryButton user_btn(PIN_USER_BTN, 1000, true, true);
|
|
#endif
|
|
|
|
bool radio_init() {
|
|
MESH_DEBUG_PRINTLN("radio_init: rtc + sx1262 init");
|
|
fallback_clock.begin();
|
|
rtc_clock.begin(Wire); // Wire already running on 47/48 from board.begin()
|
|
|
|
bool ok = radio.std_init(&spi);
|
|
MESH_DEBUG_PRINTLN("radio_init: SX1262 %s", ok ? "OK" : "FAILED");
|
|
return ok;
|
|
}
|
|
|
|
mesh::LocalIdentity radio_new_identity() {
|
|
RadioNoiseListener rng(radio);
|
|
return mesh::LocalIdentity(&rng); // create new random identity
|
|
}
|