TimedPin: loop func renamed to update

master
unicod 3 years ago
parent 9940d0a6f9
commit 688e1e844e

@ -13,7 +13,7 @@ void TimedPin::begin() {
PinOff(); PinOff();
} }
void TimedPin::loop() { void TimedPin::update() {
uint32_t t = millis(); uint32_t t = millis();
int32_t tdif = t - RefTime; int32_t tdif = t - RefTime;
switch (TPinMode) { switch (TPinMode) {

@ -28,7 +28,7 @@ class TimedPin {
public: public:
TimedPin(uint8_t pin, bool inverted = false); TimedPin(uint8_t pin, bool inverted = false);
void begin(); void begin();
void loop(); void update();
void Blink(uint32_t t_on, uint32_t t_off, uint16_t cycles = 0); void Blink(uint32_t t_on, uint32_t t_off, uint16_t cycles = 0);
void Blink(uint32_t t) { Blink(t, t); } void Blink(uint32_t t) { Blink(t, t); }
void BlinkCycles(uint32_t t_on, uint32_t t_off, uint16_t cycles) { Blink(t_on, t_off, cycles); }; void BlinkCycles(uint32_t t_on, uint32_t t_off, uint16_t cycles) { Blink(t_on, t_off, cycles); };

Loading…
Cancel
Save