Skip to content

Commit

Permalink
Change TrColorCycle to TrColorCycleX (profezzorn#136)
Browse files Browse the repository at this point in the history
  • Loading branch information
fdarosa2663 authored Mar 17, 2021
1 parent c22f7ec commit 0bd6795
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions transitions/colorcycle.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@
// return value: COLOR
// Tron-like transition.
class BladeBase;
template<int MILLIS, int start_rpm=0, int end_rpm = 6000>
class TrColorCycle : public TransitionBaseX<Int<MILLIS>> {
template<class MILLIS, int start_rpm=0, int end_rpm = 6000>
class TrColorCycleX : public TransitionBaseX<MILLIS> {
public:
void run(BladeBase* base) {
TransitionBaseX<Int<MILLIS>>::run(base);
TransitionBaseX<MILLIS>::run(base);
uint32_t now = micros();
uint32_t delta = now - last_micros_;
last_micros_ = now;
Expand Down Expand Up @@ -58,4 +58,6 @@ class TrColorCycle : public TransitionBaseX<Int<MILLIS>> {
uint32_t last_micros_;
};

template<int MILLIS, int start_rpm=0, int end_rpm = 6000> using TrColorCycle = TrColorCycleX<Int<MILLIS>, start_rpm, end_rpm>;

#endif

0 comments on commit 0bd6795

Please sign in to comment.