mirror of
https://github.com/meshtastic/firmware.git
synced 2025-02-10 14:41:26 +00:00
![Ben Meadors](/assets/img/avatar_default.png)
* Add interested portnums to TextMessageModule * Send Detection Sensor Module messages on its own portnum * Add to Ext. Notification and consolidate logic * RANGE_TEST_APP portnum for RangeTestModule
23 lines
578 B
C++
23 lines
578 B
C++
#pragma once
|
|
#include "SinglePortModule.h"
|
|
|
|
class DetectionSensorModule : public SinglePortModule, private concurrency::OSThread
|
|
{
|
|
public:
|
|
DetectionSensorModule()
|
|
: SinglePortModule("detection", meshtastic_PortNum_DETECTION_SENSOR_APP), OSThread("DetectionSensorModule")
|
|
{
|
|
}
|
|
|
|
protected:
|
|
virtual int32_t runOnce() override;
|
|
|
|
private:
|
|
bool firstTime = true;
|
|
uint32_t lastSentToMesh = 0;
|
|
void sendDetectionMessage();
|
|
void sendCurrentStateMessage();
|
|
bool hasDetectionEvent();
|
|
};
|
|
|
|
extern DetectionSensorModule *detectionSensorModule; |