mirror of
https://github.com/IoTManagerProject/IoTManager.git
synced 2026-03-27 06:32:19 +03:00
first
This commit is contained in:
34
include/items/vCountDown.h
Normal file
34
include/items/vCountDown.h
Normal file
@@ -0,0 +1,34 @@
|
||||
#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;
|
||||
bool _start = false;
|
||||
String _key;
|
||||
|
||||
unsigned long currentMillis;
|
||||
unsigned long prevMillis1;
|
||||
unsigned long prevMillis2;
|
||||
unsigned long difference1;
|
||||
unsigned long difference2;
|
||||
int sec;
|
||||
|
||||
};
|
||||
|
||||
extern MyCountDownVector* myCountDown;
|
||||
|
||||
extern void countDown();
|
||||
extern void countDownExecute();
|
||||
Reference in New Issue
Block a user