mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2023-10-10 13:36:59 +02:00
dd16af0df5
Former-commit-id: ef02f164eaf3c2f9dd552c1c17b525cf6eed499c
39 lines
965 B
C++
39 lines
965 B
C++
|
|
#pragma once
|
|
|
|
// QT includes
|
|
#include <QTimer>
|
|
|
|
// Bootsequence include
|
|
#include "AbstractBootSequence.h"
|
|
|
|
///
|
|
/// The RainborBootSequence shows a 'rainbow' (all lights have a different color). The rainbow is
|
|
/// rotated over each led during the length of the sequence.
|
|
///
|
|
class RainbowBootSequence : public AbstractBootSequence
|
|
{
|
|
public:
|
|
///
|
|
/// Constructs the rainbow boot-sequence. Hyperion is used for writing the led colors. The given
|
|
/// duration is the length of the sequence.
|
|
///
|
|
/// @param[in] hyperion The Hyperion instance
|
|
/// @param[in] duration_ms The length of the sequence [ms]
|
|
///
|
|
RainbowBootSequence(Hyperion * hyperion, const unsigned duration_ms);
|
|
|
|
protected:
|
|
///
|
|
/// Moves the rainbow one led further
|
|
///
|
|
const std::vector<ColorRgb>& nextColors();
|
|
|
|
private:
|
|
/// The current color of the boot sequence (the rainbow)
|
|
std::vector<ColorRgb> _ledColors;
|
|
/// The counter of the number of iterations left
|
|
int _iterationCounter;
|
|
};
|
|
|