mirror of
https://github.com/IoTManagerProject/IoTManager.git
synced 2026-03-27 06:32:19 +03:00
add count down timer
This commit is contained in:
27
include/items/vCountDown.h
Normal file
27
include/items/vCountDown.h
Normal file
@@ -0,0 +1,27 @@
|
||||
#pragma once
|
||||
#include <Arduino.h>
|
||||
#include "Global.h"
|
||||
|
||||
class CountDownClass;
|
||||
|
||||
typedef std::vector<CountDownClass> MyCountDownVector;
|
||||
|
||||
class CountDownClass {
|
||||
public:
|
||||
CountDownClass(String key);
|
||||
~CountDownClass();
|
||||
|
||||
void loop();
|
||||
void execute(unsigned int countDownPeriod);
|
||||
|
||||
private:
|
||||
unsigned long _countDownPeriod = 0;
|
||||
String _key;
|
||||
bool _start = false;
|
||||
|
||||
};
|
||||
|
||||
extern MyCountDownVector* myCountDown;
|
||||
|
||||
extern void countDown();
|
||||
extern void countDownExecute();
|
||||
@@ -1,6 +1,5 @@
|
||||
#pragma once
|
||||
#include <Arduino.h>
|
||||
|
||||
#include "Global.h"
|
||||
|
||||
class ImpulsOutClass;
|
||||
@@ -28,4 +27,5 @@ class ImpulsOutClass {
|
||||
|
||||
extern MyImpulsOutVector* myImpulsOut;
|
||||
|
||||
extern void impuls();
|
||||
extern void impulsExecute();
|
||||
|
||||
Reference in New Issue
Block a user