Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions LaserTag/ammo.ino
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ uint8_t Blue(uint32_t color)

void UpdateLights(unsigned long currentMillis) {
for (int i = 0; i < strip.numPixels(); i++) {
if (i < LED_COUNT){ //ammo) {
if (i < ammo) {
uint8_t r;
uint8_t g;
uint8_t b;
Expand All @@ -349,7 +349,9 @@ void UpdateLights(unsigned long currentMillis) {
strip.setPixelColor(i, strip.Color(0, 0, 0));
}
}
strip.show();
if (IrReceiver.isIdle()) {
strip.show();
}
}

void UpdateAmmo(bool dir, unsigned long currentMillis) {
Expand Down
4 changes: 3 additions & 1 deletion LaserTag/lights.ino
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,9 @@ void UpdateLights(unsigned long currentMillis) {
strip.setPixelColor(i, strip.Color(0, 0, 0));
}
}
strip.show();
if (IrReceiver.isIdle()) {
strip.show();
}
}
#pragma endregion UI_FUNTIONS

Expand Down