Skip to content

Commit

Permalink
Misc refactoring
Browse files Browse the repository at this point in the history
Misc refactoring
  • Loading branch information
obdevel committed Jan 12, 2021
1 parent 6b1dd5d commit 95b6c1b
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 19 deletions.
2 changes: 1 addition & 1 deletion library.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name=CBUSLED
version=1.1.5
version=1.1.6
author=Duncan Greenwood
maintainer=Duncan Greenwood
sentence=Arduino library for MERG CBUS LED processing
Expand Down
1 change: 1 addition & 0 deletions src/CBUSLED.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ void CBUSLED::pulse() {
_pulse = true;
_state = HIGH;
_pulseStart = millis();
run();
}

// actually operate the LED dependent upon its current state
Expand Down
36 changes: 18 additions & 18 deletions src/CBUSLED.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,23 +53,23 @@

class CBUSLED {

public:
CBUSLED();
void setPin(byte pin);
bool getState();
void on();
void off();
void toggle();
void blink();
void run();
void pulse();

protected:
byte _pin;
bool _state;
bool _blink;
bool _pulse;
unsigned long _lastTime, _pulseStart;
void _write(byte pin, bool state);
public:
CBUSLED();
void virtual setPin(byte pin);
bool getState();
void on();
void off();
void toggle();
void blink();
virtual void run();
void pulse();

protected:
byte _pin;
bool _state;
bool _blink;
bool _pulse;
unsigned long _lastTime, _pulseStart;
virtual void _write(byte pin, bool state);
};

0 comments on commit 95b6c1b

Please sign in to comment.