mirror of
https://github.com/MarekZegare4/MeshCore-Solo.git
synced 2026-11-02 10:51:57 +00:00
fix(bot): !temp and {temp} fall back to the chip's temperature
Same gap as the screens had: the bot reply, a typed message's {temp} and
the placeholder lists read only the sensors, so a board without one (the
L1) answered !temp with n/a while its telemetry carried a temperature.
The fallback moves to LocalSensors.h, shared by the screens, expandMsg()
and sensorPlaceholders(); the latter now takes the chip's temperature.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -12,7 +12,7 @@ static int s_edit = -1; // quick message being edited
|
||||
|
||||
static void collect() {
|
||||
s_ph_n = 0;
|
||||
msgtext::placeholders(&sensors, [](const char* ph, void*) { if (s_ph_n < PH_MAX) s_ph[s_ph_n++] = ph; }, nullptr);
|
||||
msgtext::placeholders(&sensors, board.getMCUTemperature(), [](const char* ph, void*) { if (s_ph_n < PH_MAX) s_ph[s_ph_n++] = ph; }, nullptr);
|
||||
}
|
||||
|
||||
// The placeholders as small buttons; `cb` gets the index as user data.
|
||||
|
||||
Reference in New Issue
Block a user