Initial air quality telemetry feature

This commit is contained in:
Ben Meadors
2023-02-04 13:07:14 -06:00
parent 22500a6c34
commit d83a0b1818
13 changed files with 301 additions and 19 deletions

View File

@@ -118,6 +118,16 @@ int32_t EnvironmentTelemetryModule::runOnce()
#endif
}
bool EnvironmentTelemetryModule::wantUIFrame()
{
return moduleConfig.telemetry.environment_screen_enabled;
}
float EnvironmentTelemetryModule::CelsiusToFahrenheit(float c)
{
return (c * 9) / 5 + 32;
}
uint32_t GetTimeSinceMeshPacket(const meshtastic_MeshPacket *mp)
{
uint32_t now = getTime();
@@ -130,16 +140,6 @@ uint32_t GetTimeSinceMeshPacket(const meshtastic_MeshPacket *mp)
return delta;
}
bool EnvironmentTelemetryModule::wantUIFrame()
{
return moduleConfig.telemetry.environment_screen_enabled;
}
float EnvironmentTelemetryModule::CelsiusToFahrenheit(float c)
{
return (c * 9) / 5 + 32;
}
void EnvironmentTelemetryModule::drawFrame(OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y)
{
display->setTextAlignment(TEXT_ALIGN_LEFT);