mirror of
https://github.com/MarekZegare4/MeshCore-Solo.git
synced 2026-11-02 19:02:00 +00:00
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:
@@ -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)) {
|
||||
|
||||
Reference in New Issue
Block a user