Skip to content

Commit 2bba333

Browse files
committed
Blink time parameter was not being passed into blinkColor
Also changed the blinkColor parameter to keep the precision to be an unsigned int for the delay time.
1 parent 0c72911 commit 2bba333

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

utility/halRgbLed.cpp

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -96,46 +96,46 @@ void HalRgbLed::white() {
9696
}
9797

9898
void HalRgbLed::blinkRed(unsigned int ms) {
99-
blinkColor(255, 0, 0);
99+
blinkColor(255, 0, 0, ms);
100100
}
101101

102102
void HalRgbLed::blinkGreen(unsigned int ms) {
103-
blinkColor(0, 255, 0);
103+
blinkColor(0, 255, 0, ms);
104104
}
105105

106106
void HalRgbLed::blinkBlue(unsigned int ms) {
107-
blinkColor(0, 0, 255);
107+
blinkColor(0, 0, 255, ms);
108108
}
109109

110110
void HalRgbLed::blinkCyan(unsigned int ms) {
111-
blinkColor(0, 255, 255);
111+
blinkColor(0, 255, 255, ms);
112112
}
113113

114114
void HalRgbLed::blinkPurple(unsigned int ms) {
115-
blinkColor(50, 0, 255);
115+
blinkColor(50, 0, 255, ms);
116116
}
117117

118118
void HalRgbLed::blinkMagenta(unsigned int ms) {
119-
blinkColor(255, 0, 255);
119+
blinkColor(255, 0, 255, ms);
120120
}
121121

122122
void HalRgbLed::blinkYellow(unsigned int ms) {
123-
blinkColor(255, 255, 0);
123+
blinkColor(255, 255, 0, ms);
124124
}
125125

126126
void HalRgbLed::blinkOrange(unsigned int ms) {
127-
blinkColor(255, 127, 0);
127+
blinkColor(255, 127, 0, ms);
128128
}
129129

130130
void HalRgbLed::blinkWhite(unsigned int ms) {
131-
blinkColor(255, 255, 255);
131+
blinkColor(255, 255, 255, ms);
132132
}
133133

134134
void HalRgbLed::blinkTorch(unsigned int ms) {
135135
blinkColor(torchRedValue, torchGreenValue, torchBlueValue, ms);
136136
}
137137

138-
void HalRgbLed::blinkColor(short red, short green, short blue, int ms) {
138+
void HalRgbLed::blinkColor(short red, short green, short blue, unsigned int ms) {
139139
if (!isEnabled()) {
140140
return;
141141
}

utility/halRgbLed.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ class HalRgbLed {
4343
void blinkOrange(unsigned int ms=500);
4444
void blinkWhite(unsigned int ms=500);
4545
void blinkTorch(unsigned int ms=500);
46-
void blinkColor(short red, short green, short blue, int ms=500);
46+
void blinkColor(short red, short green, short blue, unsigned int ms=500);
4747

4848
void setRedValue(int value);
4949
void setGreenValue(int value);

0 commit comments

Comments
 (0)