Skip to content

Commit

Permalink
♻️ (activity): Increase rounds n° & display different colors
Browse files Browse the repository at this point in the history
y
  • Loading branch information
HPezz committed Sep 22, 2022
1 parent 6917daa commit 30c8b9c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions libs/ActivityKit/include/activities/LedNumberCounting.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,13 @@ class LedNumberCounting : public interface::Activity
ReinforcerKit &_reinforcerkit;
interface::LED &_led;

static constexpr uint8_t kRoundsNumber = 5;
static constexpr uint8_t kSizeOfColorsTable = 5;
static constexpr uint8_t kRoundsNumber = 10;
static constexpr uint8_t kSizeOfColorsTable = 6;
static constexpr uint8_t kSizeOfLedNumberTable = 12;
static constexpr uint8_t kSizeOfLedIndexTable = 7;

static constexpr std::array<RGB, kSizeOfColorsTable> colors_table = {RGB::orange, RGB::pure_green, RGB::cyan,
RGB::yellow, RGB::magenta};
RGB::yellow, RGB::magenta, RGB::pure_red};

uint8_t _current_round = 0;
uint8_t _current_leds_number = 0;
Expand Down
2 changes: 1 addition & 1 deletion libs/ActivityKit/source/activities/LedNumberCounting.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ void LedNumberCounting::launchNextRound()
_expected_tag_number = MagicCard(MagicCard::number_0.getId() + _current_leds_number);

for (auto i = 0; i < _current_leds_number; ++i) {
_led.setColorAtIndex(_led_indexes.at(i), colors_table.at(_current_round));
_led.setColorAtIndex(_led_indexes.at(i), colors_table.at(i));
}
_led.show();
}
Expand Down

0 comments on commit 30c8b9c

Please sign in to comment.