Move RAK9154 to variants, fix json

This commit is contained in:
beegee-tokyo
2024-06-16 19:45:17 +08:00
parent 5e01b4251f
commit 85d621d9c6
6 changed files with 36 additions and 32 deletions
+23
View File
@@ -0,0 +1,23 @@
#ifdef HAS_RAKPROT
#ifndef _RAK9154SENSOR_H
#define _RAK9154SENSOR_H 1
#include "../mesh/generated/meshtastic/telemetry.pb.h"
#include "../modules/Telemetry/Sensor/TelemetrySensor.h"
#include "../modules/Telemetry/Sensor/VoltageSensor.h"
class RAK9154Sensor : public TelemetrySensor, VoltageSensor
{
private:
protected:
virtual void setup() override;
public:
RAK9154Sensor();
virtual int32_t runOnce() override;
virtual bool getMetrics(meshtastic_Telemetry *measurement) override;
virtual uint16_t getBusVoltageMv() override;
int getBusBatteryPercent();
bool isCharging();
};
#endif // _RAK9154SENSOR_H
#endif // HAS_RAKPROT