mirror of
https://github.com/meshtastic/firmware.git
synced 2025-08-12 08:19:39 +00:00
Screen for voltage / current (#1547)
* Add voltage + current measurements * mA instead of amp
This commit is contained in:
parent
5462d84bfc
commit
d7d574e0a7
@ -196,11 +196,13 @@ void EnvironmentTelemetryModule::drawFrame(OLEDDisplay *display, OLEDDisplayUiSt
|
|||||||
}
|
}
|
||||||
display->drawString(x, y += fontHeight(FONT_MEDIUM) - 2, "From: " + String(lastSender) + "(" + String(agoSecs) + "s)");
|
display->drawString(x, y += fontHeight(FONT_MEDIUM) - 2, "From: " + String(lastSender) + "(" + String(agoSecs) + "s)");
|
||||||
display->drawString(x, y += fontHeight(FONT_SMALL) - 2,
|
display->drawString(x, y += fontHeight(FONT_SMALL) - 2,
|
||||||
"Temp/Hum: " + last_temp + " / " +
|
"Temp/Hum: " + last_temp + " / " + String(lastMeasurement.variant.environment_metrics.relative_humidity, 0) + "%");
|
||||||
String(lastMeasurement.variant.environment_metrics.relative_humidity, 0) + "%");
|
|
||||||
if (lastMeasurement.variant.environment_metrics.barometric_pressure != 0)
|
if (lastMeasurement.variant.environment_metrics.barometric_pressure != 0)
|
||||||
display->drawString(x, y += fontHeight(FONT_SMALL),
|
display->drawString(x, y += fontHeight(FONT_SMALL),
|
||||||
"Press: " + String(lastMeasurement.variant.environment_metrics.barometric_pressure, 0) + "hPA");
|
"Press: " + String(lastMeasurement.variant.environment_metrics.barometric_pressure, 0) + "hPA");
|
||||||
|
if (lastMeasurement.variant.environment_metrics.voltage != 0)
|
||||||
|
display->drawString(x, y += fontHeight(FONT_SMALL),
|
||||||
|
"Volt/Cur: " + String(lastMeasurement.variant.environment_metrics.voltage, 0) + "V / " + String(lastMeasurement.variant.environment_metrics.current, 0) + "mA");
|
||||||
}
|
}
|
||||||
|
|
||||||
bool EnvironmentTelemetryModule::handleReceivedProtobuf(const MeshPacket &mp, Telemetry *t)
|
bool EnvironmentTelemetryModule::handleReceivedProtobuf(const MeshPacket &mp, Telemetry *t)
|
||||||
|
Loading…
Reference in New Issue
Block a user