mirror of
https://github.com/meshtastic/firmware.git
synced 2026-01-19 00:07:38 +00:00
add a .clang-format file (#9154)
This commit is contained in:
@@ -1,23 +1,20 @@
|
||||
#pragma once
|
||||
#include "SinglePortModule.h"
|
||||
|
||||
class DetectionSensorModule : public SinglePortModule, private concurrency::OSThread
|
||||
{
|
||||
public:
|
||||
DetectionSensorModule() : SinglePortModule("detection", meshtastic_PortNum_DETECTION_SENSOR_APP), OSThread("DetectionSensor")
|
||||
{
|
||||
}
|
||||
class DetectionSensorModule : public SinglePortModule, private concurrency::OSThread {
|
||||
public:
|
||||
DetectionSensorModule() : SinglePortModule("detection", meshtastic_PortNum_DETECTION_SENSOR_APP), OSThread("DetectionSensor") {}
|
||||
|
||||
protected:
|
||||
virtual int32_t runOnce() override;
|
||||
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();
|
||||
private:
|
||||
bool firstTime = true;
|
||||
uint32_t lastSentToMesh = 0;
|
||||
bool wasDetected = false;
|
||||
void sendDetectionMessage();
|
||||
void sendCurrentStateMessage(bool state);
|
||||
bool hasDetectionEvent();
|
||||
};
|
||||
|
||||
extern DetectionSensorModule *detectionSensorModule;
|
||||
Reference in New Issue
Block a user