kopia lustrzana https://github.com/meshtastic/firmware
Merge pull request #3800 from oseiler2/fix/RCWL9620-MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR
Add MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR exclusion to RCWL9620pull/3802/head
commit
8e91f895a6
|
@ -1,8 +1,11 @@
|
|||
#include "RCWL9620Sensor.h"
|
||||
#include "../mesh/generated/meshtastic/telemetry.pb.h"
|
||||
#include "TelemetrySensor.h"
|
||||
#include "configuration.h"
|
||||
|
||||
#if !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR
|
||||
|
||||
#include "../mesh/generated/meshtastic/telemetry.pb.h"
|
||||
#include "RCWL9620Sensor.h"
|
||||
#include "TelemetrySensor.h"
|
||||
|
||||
RCWL9620Sensor::RCWL9620Sensor() : TelemetrySensor(meshtastic_TelemetrySensorType_RCWL9620, "RCWL9620") {}
|
||||
|
||||
int32_t RCWL9620Sensor::runOnce()
|
||||
|
@ -57,4 +60,6 @@ float RCWL9620Sensor::getDistance()
|
|||
} else {
|
||||
return Distance;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
|
@ -1,3 +1,7 @@
|
|||
#include "configuration.h"
|
||||
|
||||
#if !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR
|
||||
|
||||
#include "../mesh/generated/meshtastic/telemetry.pb.h"
|
||||
#include "TelemetrySensor.h"
|
||||
#include <Wire.h>
|
||||
|
@ -20,4 +24,6 @@ class RCWL9620Sensor : public TelemetrySensor
|
|||
RCWL9620Sensor();
|
||||
virtual int32_t runOnce() override;
|
||||
virtual bool getMetrics(meshtastic_Telemetry *measurement) override;
|
||||
};
|
||||
};
|
||||
|
||||
#endif
|
Ładowanie…
Reference in New Issue