Added (excluded) Dropzone Module for more comprehensive module example (#4098)

* DropzoneModule hello world

* Buttoning things up

* Exclude by default

* Upstream refs

* Cleanup

* Add modules folder to path

* Case and path matters

* Exclude from header

* Guard
This commit is contained in:
Ben Meadors
2024-06-14 16:27:49 -05:00
committed by GitHub
parent 1a5227c826
commit 8b8e056b7b
7 changed files with 178 additions and 0 deletions

View File

@@ -1,3 +1,7 @@
#pragma once
#ifndef _MT_DFROBOTLARKSENSOR_H
#define _MT_DFROBOTLARKSENSOR_H
#include "configuration.h"
#if !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR
@@ -21,4 +25,5 @@ class DFRobotLarkSensor : public TelemetrySensor
virtual bool getMetrics(meshtastic_Telemetry *measurement) override;
};
#endif
#endif

View File

@@ -0,0 +1,21 @@
#include "UnitConversions.h"
float UnitConversions::CelsiusToFahrenheit(float celcius)
{
return (celcius * 9) / 5 + 32;
}
float UnitConversions::MetersPerSecondToKnots(float metersPerSecond)
{
return metersPerSecond * 1.94384;
}
float UnitConversions::MetersPerSecondToMilesPerHour(float metersPerSecond)
{
return metersPerSecond * 2.23694;
}
float UnitConversions::HectoPascalToInchesOfMercury(float hectoPascal)
{
return hectoPascal * 0.029529983071445;
}

View File

@@ -0,0 +1,10 @@
#pragma once
class UnitConversions
{
public:
static float CelsiusToFahrenheit(float celcius);
static float MetersPerSecondToKnots(float metersPerSecond);
static float MetersPerSecondToMilesPerHour(float metersPerSecond);
static float HectoPascalToInchesOfMercury(float hectoPascal);
};