fix(ui): the chip's temperature when no sensor reads one

The telemetry reply adds the MCU temperature, the screens read only the
sensors: on a board without a temperature sensor (the L1) the app showed
a temperature and the clock field '--'. The clock, Status and the L2's
Home now fall back to the chip's, like the reply. The bot's !temp and
{temp} still read only the sensors.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Jakub
2026-10-23 22:33:52 +02:00
co-authored by Claude Opus 5.5
parent 467d64af40
commit d2e1f086e2
4 changed files with 21 additions and 4 deletions
+2 -2
View File
@@ -102,7 +102,7 @@ static void formatDashVal(uint8_t field, char* val, int val_len, uint16_t batt_m
if (telemetry::isSensor(field)) {
if (!lpp) {
static CayenneLPP s_lpp(200); s_lpp.reset();
{ CardKBBusLock bus_lock; sensors.querySensors(0xFF, s_lpp); }
{ CardKBBusLock bus_lock; telemetry::querySensors(sensors, board.getMCUTemperature(), s_lpp); }
lpp = &s_lpp;
}
in.lpp = lpp->getBuffer();
@@ -650,7 +650,7 @@ class HomeScreen : public UIScreen {
sensors_lpp.reset();
sensors_nb = 0;
sensors_lpp.addVoltage(TELEM_CHANNEL_SELF, (float)board.getBattMilliVolts() / 1000.0f);
{ CardKBBusLock bus_lock; sensors.querySensors(0xFF, sensors_lpp); }
{ CardKBBusLock bus_lock; telemetry::querySensors(sensors, board.getMCUTemperature(), sensors_lpp); }
LPPReader reader (sensors_lpp.getBuffer(), sensors_lpp.getSize());
uint8_t channel, type;
while(reader.readHeader(channel, type)) {