Skip to content

Commit 4e74bcb

Browse files
committed
Overflow warning fixed
1 parent 61c2912 commit 4e74bcb

File tree

3 files changed

+11
-10
lines changed

3 files changed

+11
-10
lines changed

changelog.txt

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
+---------------------------------------------------------------------------+
22
| LightDimmer changelog |
33
+---------------------------------------------------------------------------+
4+
1.3.1 Fix a nasty warning in LightDimmer constructor
45
1.3 Added a maximum value to be able to set the brightness of each LED.
56
1.2.3 Fix forgotten implementation of setOnTime and setPeriod. Moved short
67
implementation to the header.

library.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name=LightDimmer
2-
version=1.3
2+
version=1.3.1
33
author=Jean-Luc - Locoduino
44
maintainer=Jean-Luc - Locoduino
55
sentence=This library allows to drive LEDs to simulate railroad signals.

src/LightDimmer.cpp

+9-9
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,16 @@ LightDimmer *LightDimmer::sLightList = NULL;
2222

2323
LightDimmer::LightDimmer()
2424
: mState(LD_OFF),
25-
mMax(255),
26-
mRiseTime(250),
27-
mFallTime(250),
28-
mOnTime(200),
29-
mPeriod(900),
30-
mNextEventDate((uint32_t)0u),
31-
mValue((uint8_t)0u),
32-
mPin(255),
25+
mMax(255u),
26+
mRiseTime(250u),
27+
mFallTime(250u),
28+
mOnTime(200u),
29+
mPeriod(900u),
30+
mNextEventDate(0u),
31+
mValue(0u),
32+
mPin(63),
3333
mBlink(false),
34-
mOff((uint8_t)0u)
34+
mOff(LOW)
3535
{
3636
mNext = sLightList;
3737
sLightList = this;

0 commit comments

Comments
 (0)