Repeaters, room servers and sensors already let the battery ADC multiplier be tuned with 'set adc.multiplier' (CommonCLI). The companion firmware had no equivalent, so a board whose divider differs from the build default (common on DIY ProMicro / Faketec boards) always reported a wrong battery voltage.
Adds the same command to the companion CLI. The value is stored in the companion prefs (comp.adc_mult, 0 = board default) and applied at startup via MainBoard::setAdcMultiplier().
The room server gated its filesystem paths on NRF52_PLATFORM only, so an
STM32 build fell through to the ESP32 branch and failed to compile:
MyMesh.cpp:147: no matching function for call to
'Adafruit_LittleFS::open(const char*&, const char [2], bool)'
main.cpp:69: 'store' was not declared in this scope
STM32 uses the same InternalFS / Adafruit_LittleFS API as nRF52, including
append semantics (FILE_O_WRITE opens LFS_O_RDWR|LFS_O_CREAT and then seeks
to the end), so the nRF52 branch is already correct for it. Add
STM32_PLATFORM alongside NRF52_PLATFORM in the four remaining gates;
saveIdentity() already did this.
This unblocks the room_server example on the existing STM32WL boards
(wio-e5-mini, wio-e5-dev, rak3x72, tiny_relay) as well as new ones.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Use GxEPD2's busy callback to run the mesh, interface and sensor loops
(loopCore(), shared with loop()) while the panel refreshes, instead of
blocking the main loop. Covers the partial refresh in endFrame(), the
full wipe in startFrame(), and the sleep icon / blank refresh on turnOff().
CMD_SEND_CHANNEL_TXT_MSG reads txt_type, channel_idx and a 4 byte timestamp, so
the frame needs 7 bytes before the text starts, and the branch had no length
guard. For a shorter frame "len - i" is computed in size_t, wraps, and reaches
sendGroupMessage() as a negative int. The clamp there tests
"text_len + prefix_len > MAX_TEXT_LEN", which a negative value passes, and the
following memcpy() converts the length back to a size_t: a 3 byte frame asks for
4294967292 bytes into a 197 byte stack buffer.
Two guards, because there are two mistakes. The branch now states its minimum
like most other branches of handleCmdFrame do, so a frame below 7 bytes is
answered through the existing path instead of being parsed. And
sendGroupMessage() refuses a negative length the way sendGroupData() in the same
file already does, which protects every other caller.
A frame of exactly 7 bytes keeps working and sends an empty message, as before.
Evidence. On a T-Echo running dev 428a95c6, built with
FIRMWARE_BUILD_DATE "f1-dev" and confirmed by "ver => v1.18.0 (Build: f1-dev)":
CH_TXT len=7 -> RESP_CODE_OK
GET_STATS core -> uptime=78s
CH_TXT len=3 -> NO REPLY
DEVICE_QUERY -> NO REPLY (three times over 8 s, node never came back)
'get tz.offset' printed one decimal, so a UTC+5:45 offset (5.75)
read back as 5.8. Print two decimals when the offset is on a quarter
hour (x.25 / x.75); everything else keeps one decimal.
The AGC interval is set in 4 s steps, matching MeshCore's
agc.reset.interval, so the old 30 s default could not be restored by a
host: setting 30 gives 28. Found on hardware. Use 32 s, the nearest
multiple of 4 above it.