kopia lustrzana https://github.com/meshtastic/firmware
add MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR exclusion to RCWL9620
rodzic
0afe2d459f
commit
2c30923e3e
|
@ -1,7 +1,10 @@
|
||||||
|
#include "configuration.h"
|
||||||
|
|
||||||
|
#if !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR
|
||||||
|
|
||||||
#include "RCWL9620Sensor.h"
|
#include "RCWL9620Sensor.h"
|
||||||
#include "../mesh/generated/meshtastic/telemetry.pb.h"
|
#include "../mesh/generated/meshtastic/telemetry.pb.h"
|
||||||
#include "TelemetrySensor.h"
|
#include "TelemetrySensor.h"
|
||||||
#include "configuration.h"
|
|
||||||
|
|
||||||
RCWL9620Sensor::RCWL9620Sensor() : TelemetrySensor(meshtastic_TelemetrySensorType_RCWL9620, "RCWL9620") {}
|
RCWL9620Sensor::RCWL9620Sensor() : TelemetrySensor(meshtastic_TelemetrySensorType_RCWL9620, "RCWL9620") {}
|
||||||
|
|
||||||
|
@ -57,4 +60,6 @@ float RCWL9620Sensor::getDistance()
|
||||||
} else {
|
} else {
|
||||||
return Distance;
|
return Distance;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif
|
|
@ -1,3 +1,7 @@
|
||||||
|
#include "configuration.h"
|
||||||
|
|
||||||
|
#if !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR
|
||||||
|
|
||||||
#include "../mesh/generated/meshtastic/telemetry.pb.h"
|
#include "../mesh/generated/meshtastic/telemetry.pb.h"
|
||||||
#include "TelemetrySensor.h"
|
#include "TelemetrySensor.h"
|
||||||
#include <Wire.h>
|
#include <Wire.h>
|
||||||
|
@ -20,4 +24,6 @@ class RCWL9620Sensor : public TelemetrySensor
|
||||||
RCWL9620Sensor();
|
RCWL9620Sensor();
|
||||||
virtual int32_t runOnce() override;
|
virtual int32_t runOnce() override;
|
||||||
virtual bool getMetrics(meshtastic_Telemetry *measurement) override;
|
virtual bool getMetrics(meshtastic_Telemetry *measurement) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#endif
|
Ładowanie…
Reference in New Issue