Props to prop no plural

This commit is contained in:
fauresystems
2020-04-15 10:55:37 +02:00
parent 142ff52329
commit 6cff784cc6
30 changed files with 532 additions and 528 deletions
+43
View File
@@ -0,0 +1,43 @@
/*
Name: PropAction.h
Created: 29/10/2019 09:20:31
Author: Marie Faure <dev at faure dot systems>
Editor: https://github.com/fauresystems
License: MIT License (c) Marie Faure <dev at faure dot systems>
Provide an easy way of triggering functions at a set interval.
*/
#ifndef PROPSACTION_H
#define PROPSACTION_H
#if defined(ARDUINO) && ARDUINO >= 100
#include "arduino.h"
#else
#include "WProgram.h"
#endif
class Props;
class PropAction {
public:
PropAction();
PropAction(unsigned long interval, void (*function)());
void reset(unsigned long interval);
void disable();
void enable();
void check();
bool tick();
unsigned long getInterval();
private:
bool _active;
unsigned long _previous;
unsigned long _interval;
void (*_execute)();
};
#endif