add count down timer

This commit is contained in:
Dmitry Borisenko
2020-11-18 03:25:05 +03:00
parent 06df1f17b6
commit ceb516ddbe
13 changed files with 130 additions and 9 deletions

View 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();

View File

@@ -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();