mirror of
https://github.com/MarekZegare4/MeshCore-Solo.git
synced 2026-09-14 15:16:40 +00:00
Adopts hardware Channel Activity Detection (wired into RadioLibWrapper::isChannelActive() alongside our RSSI-threshold check and RX duty-cycle power-save), MCU temperature telemetry, LR2021 standby workaround, DISPLAY_SCALE/FLIP overrides, NRF52Board shutdownPeripherals() refactor, and misc upstream fixes. Declines upstream's ConfigSerializer-based NodePrefs rewrite, MultiSerialInterface/interface_manager, and UIColor palette system — each would have broken large parts of the Solo-specific feature set (NodePrefs fields, per-variant single serial_interface, enum-based DisplayDriver::Color). Flagged as candidate follow-up migrations, not permanent no's. Also fixes several pre-existing bugs surfaced while chasing silent merge breaks (stale newMsg() override signature in ui-tiny/ui-orig, dead UIEventType::newContactMessage case, missing ContactsIterator init), bumps FIRMWARE_VERSION/MESHCORE_VERSION to 1.17, and fixes a missing <cstdlib> include that broke the native ConfigSerializer unit tests. Verified via 13+ pio run builds across ESP32/nRF52, all 3 companion UI variants, and 7 display drivers, plus the full native unit test suite (33/33 passing). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
54 lines
1.4 KiB
C++
54 lines
1.4 KiB
C++
#pragma once
|
|
|
|
#include <MeshCore.h>
|
|
#include <Arduino.h>
|
|
#include <helpers/NRF52Board.h>
|
|
|
|
// ============================================================
|
|
// T-Echo Lite battery pins — hardcoded from LilyGo t_echo_lite_config.h
|
|
// NOT using any defines from variant.h for battery measurement
|
|
// ============================================================
|
|
#define PIN_VBAT_READ _PINNUM(0, 2) // BATTERY_ADC_DATA
|
|
#define PIN_VBAT_MEAS_EN _PINNUM(0, 31) // BATTERY_MEASUREMENT_CONTROL
|
|
|
|
class TechoBoard : public NRF52BoardDCDC {
|
|
public:
|
|
TechoBoard() : NRF52Board("TECHO_OTA") {}
|
|
void begin();
|
|
uint16_t getBattMilliVolts() override;
|
|
|
|
const char* getManufacturerName() const override {
|
|
return "LilyGo T-Echo Lite";
|
|
}
|
|
|
|
#if defined(P_LORA_TX_LED)
|
|
void onBeforeTransmit() override {
|
|
digitalWrite(P_LORA_TX_LED, LOW); // turn TX LED on
|
|
}
|
|
|
|
void onAfterTransmit() override {
|
|
digitalWrite(P_LORA_TX_LED, HIGH); // turn TX LED off
|
|
}
|
|
#endif
|
|
|
|
void shutdownPeripherals() override {
|
|
NRF52Board::shutdownPeripherals();
|
|
|
|
digitalWrite(PIN_VBAT_MEAS_EN, LOW);
|
|
#ifdef LED_RED
|
|
digitalWrite(LED_RED, LOW);
|
|
#endif
|
|
#ifdef LED_GREEN
|
|
digitalWrite(LED_GREEN, LOW);
|
|
#endif
|
|
#ifdef LED_BLUE
|
|
digitalWrite(LED_BLUE, LOW);
|
|
#endif
|
|
#ifdef DISP_BACKLIGHT
|
|
digitalWrite(DISP_BACKLIGHT, LOW);
|
|
#endif
|
|
#ifdef PIN_PWR_EN
|
|
digitalWrite(PIN_PWR_EN, LOW);
|
|
#endif
|
|
}
|
|
}; |