Scope native SolarXiao power controls to qualified repeater targets

This commit is contained in:
mikecarper committed 2026-10-21 15:32:23 -07:00
1 parent 2dcc1caccb
commit 70b8db9388
6 files changed
+6 -23

No files matched your search

+3 -3
View File
@@ -1,8 +1,8 @@
# SolarXiao MPPT and battery controls
SolarXiao firmware includes a native INA260 battery monitor and LTC4162 charger
interface in Full and Reduced Repeater, Room Server and Companion builds. Use
USB CLI or the role's authenticated administrator CLI over LoRa. Ship mode and
SolarXiao Repeater firmware includes a native INA260 battery monitor and LTC4162
charger interface in Full and Reduced builds. Use USB CLI or the authenticated
administrator CLI over LoRa. Ship mode and
saved-policy reset require local USB. Commands do not change RF settings.
Start with:
-4
View File
@@ -1,5 +1,4 @@
#include <helpers/RegulatorSettings.h>
#include <helpers/sensors/SolarXiaoPower.h>
#include <helpers/LedSettings.h>
#include <helpers/ui/DisplayPowerSettings.h>
#if defined(OLED_AUTO_DETECT) && OLED_AUTO_DETECT && defined(DISPLAY_CLASS)
@@ -10772,9 +10771,6 @@ bool MyMesh::handleCommand(const char* command, uint32_t sender_timestamp,
}
if (mesh::power::handleRegulatorCommand(command, reply, reply_capacity)) return true;
#if defined(MESH_SOLARXIAO_POWER) && MESH_SOLARXIAO_POWER
if (mesh::solar::handleCommand(command, reply, reply_capacity, sender_timestamp == 0)) return true;
#endif
#if defined(WIO_E5_MINI_HEADLESS_COMPANION_UI)
if (handleCompactLedCommand(command, reply, reply_capacity)) return true;
#else
-7
View File
@@ -1,5 +1,4 @@
#include <helpers/RegulatorSettings.h>
#include <helpers/sensors/SolarXiaoPower.h>
#include <helpers/LedSettings.h>
#include <Arduino.h> // needed for PlatformIO
#include <helpers/ui/StartupScreen.h>
@@ -3641,9 +3640,6 @@ void setup() {
#endif
#if !defined(WIO_E5_MINI_HEADLESS_COMPANION_UI)
mesh::leds::beginSettings(board, regulator_prefs_fs);
#if defined(MESH_SOLARXIAO_POWER) && MESH_SOLARXIAO_POWER
mesh::solar::beginSettings(regulator_prefs_fs);
#endif
#endif
if (!mesh::power::beginRegulatorSettings(board, radio_driver, regulator_prefs_fs)) {
MESH_DEBUG_PRINTLN("Regulator selection could not be applied");
@@ -4273,9 +4269,6 @@ void loop() {
#endif
rtc_clock.tick();
mesh::power::serviceRegulatorSettings();
#if defined(MESH_SOLARXIAO_POWER) && MESH_SOLARXIAO_POWER
mesh::solar::service();
#endif
board.loop();
if (mesh::serviceUsbLoggingWatchdog(usbLoggingRecoverySafe)) board.reboot();
#ifdef TBEAM_1W
-7
View File
@@ -1,5 +1,4 @@
#include <helpers/RegulatorSettings.h>
#include <helpers/sensors/SolarXiaoPower.h>
#include <helpers/LedSettings.h>
#include <Arduino.h> // needed for PlatformIO
#include <Mesh.h>
@@ -148,9 +147,6 @@ void setup() {
if (volatile_primary_fs) regulator_prefs_fs = nullptr;
#endif
mesh::leds::beginSettings(board, regulator_prefs_fs);
#if defined(MESH_SOLARXIAO_POWER) && MESH_SOLARXIAO_POWER
mesh::solar::beginSettings(regulator_prefs_fs);
#endif
if (!mesh::power::beginRegulatorSettings(board, radio_driver, regulator_prefs_fs)) {
MESH_DEBUG_PRINTLN("Regulator selection could not be applied");
}
@@ -411,9 +407,6 @@ void loop() {
#endif
rtc_clock.tick();
mesh::power::serviceRegulatorSettings();
#if defined(MESH_SOLARXIAO_POWER) && MESH_SOLARXIAO_POWER
mesh::solar::service();
#endif
board.loop();
if (mesh::serviceUsbLoggingWatchdog(usbLoggingRecoverySafe)) board.reboot();
#if MESH_USB_CONSOLE_COOPERATIVE
+2 -1
View File
@@ -23,7 +23,8 @@ public:
while (Wire.available()) Wire.read();
return false;
}
const uint8_t first=Wire.read(), second=Wire.read();
const int first=Wire.read(), second=Wire.read();
if (first<0 || second<0) return false;
// LTC4162 SMBus words are little endian; INA260 registers are big endian.
value=address==0x68 ? uint16_t(first)|(uint16_t(second)<<8)
: (uint16_t(first)<<8)|second;
+1 -1
View File
@@ -180,7 +180,6 @@ build_flags = ${Xiao_nrf52.build_flags}
-D PIN_BOARD_SDA=PIN_NFC1
-D PIN_BOARD_SCL=PIN_NFC2
-D TELEM_INA260_ADDRESS=0x40
-D MESH_SOLARXIAO_POWER=1
-D MANUFACTURER_STRING='"SolarXiao 30S"'
[env:solarxiao_30S_companion_radio_ble]
@@ -248,6 +247,7 @@ board_build.ldscript = boards/nrf52840_s140_v7_xiao_bootloader_ota.ld
board_upload.maximum_size = 757760
build_flags =
${solarxiao.build_flags}
-D MESH_SOLARXIAO_POWER=1
${nrf52_qspi_ota.build_flags}
-D OTA_QSPI_BOOTLOADER_UPDATE=1
-D ADVERT_NAME='"SolarXiao 30S Repeater"'