mirror of
https://github.com/meshtastic/firmware.git
synced 2025-06-08 06:02:05 +00:00
More detailed IAQ Levels for hazardous environments
This commit is contained in:
parent
7bc473ed99
commit
9a57a774f6
@ -398,13 +398,19 @@ void EnvironmentTelemetryModule::drawFrame(OLEDDisplay *display, OLEDDisplayUiSt
|
|||||||
entries.push_back("Hum: " + String(m.relative_humidity, 0) + "%");
|
entries.push_back("Hum: " + String(m.relative_humidity, 0) + "%");
|
||||||
if (m.barometric_pressure != 0)
|
if (m.barometric_pressure != 0)
|
||||||
entries.push_back("Prss: " + String(m.barometric_pressure, 0) + " hPa");
|
entries.push_back("Prss: " + String(m.barometric_pressure, 0) + " hPa");
|
||||||
if (m.iaq != 0) {
|
if (m.iaq != 0) {
|
||||||
String aqi = "IAQ: " + String(m.iaq);
|
String aqi = "IAQ: " + String(m.iaq);
|
||||||
if (m.iaq < 50) aqi += " (Good)";
|
|
||||||
else if (m.iaq < 100) aqi += " (Moderate)";
|
if (m.iaq <= 50) aqi += " (Good)";
|
||||||
else aqi += " (!)";
|
else if (m.iaq <= 100) aqi += " (Moderate)";
|
||||||
entries.push_back(aqi);
|
else if (m.iaq <= 150) aqi += " (Poor)";
|
||||||
}
|
else if (m.iaq <= 200) aqi += " (Unhealthy)";
|
||||||
|
else if (m.iaq <= 250) aqi += " (Very Unhealthy)";
|
||||||
|
else if (m.iaq <= 350) aqi += " (Hazardous)";
|
||||||
|
else aqi += " (Extreme)";
|
||||||
|
|
||||||
|
entries.push_back(aqi);
|
||||||
|
}
|
||||||
if (m.voltage != 0 || m.current != 0)
|
if (m.voltage != 0 || m.current != 0)
|
||||||
entries.push_back(String(m.voltage, 1) + "V / " + String(m.current, 0) + "mA");
|
entries.push_back(String(m.voltage, 1) + "V / " + String(m.current, 0) + "mA");
|
||||||
if (m.lux != 0)
|
if (m.lux != 0)
|
||||||
|
Loading…
Reference in New Issue
Block a user