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

@@ -44,4 +44,4 @@ extern void bmp280ReadingPress();
extern void sysUptime();
extern void uptimeReading();
extern void impuls();

View File

@@ -81,6 +81,9 @@ extern int inOutput_EnterCounter;
extern String pwmOut_KeyList;
extern int pwmOut_EnterCounter;
//=========================================
extern String countDown_KeyList;
extern int countDown_EnterCounter;
//=========================================
// Sensors
extern String sensorReadingMap10sec;

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