mirror of
https://github.com/meshtastic/firmware.git
synced 2025-12-29 22:20:37 +00:00
Add generic thread module (#5484)
* compiling, untested * use INCLUDE not EXLUDE for option to include module * protobuf update * working genericthread module Update protobufs * use EXCLUDE style instead of INCLUDE * Update Modules.cpp --------- Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
This commit is contained in:
21
src/modules/GenericThreadModule.h
Normal file
21
src/modules/GenericThreadModule.h
Normal file
@@ -0,0 +1,21 @@
|
||||
#pragma once
|
||||
|
||||
#include "MeshModule.h"
|
||||
#include "concurrency/OSThread.h"
|
||||
#include "configuration.h"
|
||||
#include <Arduino.h>
|
||||
#include <functional>
|
||||
|
||||
class GenericThreadModule : private concurrency::OSThread
|
||||
{
|
||||
bool firstTime = 1;
|
||||
|
||||
public:
|
||||
GenericThreadModule();
|
||||
|
||||
protected:
|
||||
unsigned int my_interval = 10000; // interval in millisconds
|
||||
virtual int32_t runOnce() override;
|
||||
};
|
||||
|
||||
extern GenericThreadModule *genericThreadModule;
|
||||
Reference in New Issue
Block a user