From 19cc68f0bce371029ff5327d4d597ad94d332f1c Mon Sep 17 00:00:00 2001 From: mikecarper Date: Tue, 6 Oct 2026 11:05:05 -0700 Subject: [PATCH] Clarify charger battery ratings and keep host checks portable --- docs/charge_voltage.md | 2 ++ docs/cli_commands.md | 6 +++--- test/test_battery_charge_cli.py | 5 ++++- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/docs/charge_voltage.md b/docs/charge_voltage.md index 65a9e7d26..c1e94ae11 100644 --- a/docs/charge_voltage.md +++ b/docs/charge_voltage.md @@ -37,6 +37,8 @@ is failing, but it avoids silently resetting a saved lower target to 4.2 V. | LilyGo T-Beam SX1262 or SX1276 | AXP2101 | 4.00, 4.10, 4.20, 4.35, 4.40 | | LilyGo T-Beam S3 Supreme SX1262 | AXP2101 | 4.00, 4.10, 4.20, 4.35, 4.40 | +Targets above 4.2 V require batteries rated for the selected charge voltage. + The classic T-Beam driver detects the fitted AXP192 or AXP2101. Radio type does not determine which PMU is present. T-Beam 1W uses a different power design and does not support this setting. diff --git a/docs/cli_commands.md b/docs/cli_commands.md index 8746c7d9a..a0bdc91f4 100644 --- a/docs/cli_commands.md +++ b/docs/cli_commands.md @@ -435,9 +435,9 @@ remain available. ### Switch the OTA release channel (observer builds) -- `ota branch` — shows the selected channel, the channel this build was made for, and the manifest base `ota check`/`ota update` will use. -- `ota branch prod` (alias `stable`) / `ota branch beta` (alias `dev`) — pull future `ota update`s from that channel. The selection is saved; run `ota update` to switch. -- `ota branch default` — follow the channel this build was made for. +- `ota branch` - shows the selected channel, the channel this build was made for, and the manifest base `ota check`/`ota update` will use. +- `ota branch prod` (alias `stable`) / `ota branch beta` (alias `dev`) - pull future `ota update`s from that channel. The selection is saved; run `ota update` to switch. +- `ota branch default` - follow the channel this build was made for. The selector is saved only after the preferences transaction succeeds. A queued `ota update` keeps the channel it checked, even if `ota branch` is changed before diff --git a/test/test_battery_charge_cli.py b/test/test_battery_charge_cli.py index 8b2389693..3fe29e5fc 100644 --- a/test/test_battery_charge_cli.py +++ b/test/test_battery_charge_cli.py @@ -2,11 +2,14 @@ """Run the production charger CLI with hardware/storage failure fixtures.""" from pathlib import Path +import os import subprocess import tempfile import unittest ROOT = Path(__file__).resolve().parents[1] +SANITIZER_FLAGS = [] if os.name == "nt" else [ + "-fsanitize=address,undefined", "-fno-omit-frame-pointer", "-fno-pie", "-no-pie"] class BatteryChargeCliTest(unittest.TestCase): @@ -119,7 +122,7 @@ int main() { (path / "test.cpp").write_text(source, encoding="ascii") binary = path / "test" subprocess.run(["c++", "-std=c++11", "-Wall", "-Wextra", - "-fsanitize=address,undefined", "-fno-omit-frame-pointer", + *SANITIZER_FLAGS, "-I", str(ROOT / "src"), str(path / "test.cpp"), "-o", str(binary)], check=True, capture_output=True) subprocess.run([str(binary)], check=True)