feat: sensor placeholders in messages and keyboard picker

expandMsg now expands {temp}, {hum}, {pres}, {batt}, {alt}, {lux}, {dist},
{co2} from live sensor readings. The [{}] picker in the on-screen keyboard
shows only sensors currently detected by SensorManager and scrolls when
more than 3 items fit the overlay.

New SensorPlaceholders.h helper keeps sensor-to-keyboard wiring out of
UITask.cpp. MsgExpand.h handles all expansion logic centrally; MyMeshBot
and QuickMsgScreen pass &sensors and batt_volts to each call.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Jakub
2026-05-14 00:12:07 +02:00
co-authored by Claude Sonnet 4.6
parent 26d3d7ab00
commit 42b51935b1
6 changed files with 200 additions and 32 deletions
@@ -175,6 +175,8 @@ public:
max = sizeof(_prefs->bot_reply_ch) - 1;
}
_kb.begin(initial, max);
if (_sel != 2) // trigger field doesn't support sensor placeholders
kbAddSensorPlaceholders(_kb, &sensors);
return true;
}
return false;