Files
firmware/src/modules/DetectionSensorModule.h
Ben Meadors 50dac38a1b Pass#2: Lots more savings in logs and string reduction surgery (#5251)
* Pass#2: Lots more savings in logs and string reduction surgery

* Don't need Thread suffix either

* Warn
2024-11-04 12:16:25 -06:00

23 lines
604 B
C++

#pragma once
#include "SinglePortModule.h"
class DetectionSensorModule : public SinglePortModule, private concurrency::OSThread
{
public:
DetectionSensorModule() : SinglePortModule("detection", meshtastic_PortNum_DETECTION_SENSOR_APP), OSThread("DetectionSensor")
{
}
protected:
virtual int32_t runOnce() override;
private:
bool firstTime = true;
uint32_t lastSentToMesh = 0;
bool wasDetected = false;
void sendDetectionMessage();
void sendCurrentStateMessage(bool state);
bool hasDetectionEvent();
};
extern DetectionSensorModule *detectionSensorModule;