mirror of
https://github.com/IoTManagerProject/IoTManager.git
synced 2026-03-26 22:22:16 +03:00
32 lines
620 B
C++
32 lines
620 B
C++
#pragma once
|
|
#include <Arduino.h>
|
|
|
|
#include "Global.h"
|
|
|
|
class ImpulsOutClass;
|
|
|
|
typedef std::vector<ImpulsOutClass> MyImpulsOutVector;
|
|
|
|
class ImpulsOutClass {
|
|
public:
|
|
ImpulsOutClass(unsigned int impulsPin);
|
|
~ImpulsOutClass();
|
|
|
|
void loop();
|
|
void execute(unsigned long impulsPeriod, unsigned int impulsCount);
|
|
|
|
private:
|
|
unsigned long currentMillis;
|
|
unsigned long prevMillis;
|
|
|
|
unsigned long _impulsPeriod = 0;
|
|
unsigned int _impulsCount = 0;
|
|
unsigned int _impulsCountBuf = 0;
|
|
unsigned int _impulsPin = 0;
|
|
|
|
};
|
|
|
|
extern MyImpulsOutVector* myImpulsOut;
|
|
|
|
extern void impulsExecute();
|