mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2023-10-10 13:36:59 +02:00
Added doxygen comments
This commit is contained in:
parent
a567f0feeb
commit
b9826e06ee
@ -9,20 +9,42 @@
|
||||
// Hyperion includes
|
||||
#include <hyperion/Hyperion.h>
|
||||
|
||||
///
|
||||
/// The AbstractBootSequence is an 'abstract' implementation of the BootSequence that handles the
|
||||
/// event generation and Hyperion connection. Subclasses only need to specify the interval and
|
||||
/// return the colors for the leds for each iteration.
|
||||
///
|
||||
class AbstractBootSequence : public QObject, public BootSequence
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
///
|
||||
/// Constructs the AbstractBootSequence with the given parameters
|
||||
///
|
||||
/// @param hyperion The Hyperion instance
|
||||
/// @param interval The interval between new led colors
|
||||
/// @param iterationCnt The number of iteration performed by the boot sequence
|
||||
///
|
||||
AbstractBootSequence(Hyperion * hyperion, const int64_t interval, const unsigned iterationCnt);
|
||||
|
||||
///
|
||||
/// Starts the boot-sequence
|
||||
///
|
||||
virtual void start();
|
||||
|
||||
protected slots:
|
||||
///
|
||||
/// Timer slot for handling each interval of the boot-sequence
|
||||
///
|
||||
void update();
|
||||
|
||||
|
||||
protected:
|
||||
///
|
||||
/// Child-classes must implement this by returning the next led colors in the sequence
|
||||
///
|
||||
/// @return The next led colors in the boot sequence
|
||||
///
|
||||
virtual const std::vector<RgbColor>& nextColors() = 0;
|
||||
|
||||
private:
|
||||
|
@ -8,14 +8,31 @@
|
||||
#include <hyperion/Hyperion.h>
|
||||
#include <hyperion/ImageProcessor.h>
|
||||
|
||||
|
||||
///
|
||||
/// The KITT BootSequence is a boot sequence inspired by the Knight Rider car: Knight Industries Two
|
||||
/// Thousand (aka KITT)
|
||||
///
|
||||
class KittBootSequence : public AbstractBootSequence
|
||||
{
|
||||
public:
|
||||
///
|
||||
/// Constructs the KITT BootSequence
|
||||
///
|
||||
/// @param[in] hyperion The Hyperion instance
|
||||
/// @param[in] duration_ms The length of the sequence [ms]
|
||||
///
|
||||
KittBootSequence(Hyperion * hyperion, const unsigned duration_ms);
|
||||
|
||||
///
|
||||
/// Destructor, deletes the processor
|
||||
///
|
||||
virtual ~KittBootSequence();
|
||||
|
||||
///
|
||||
/// Returns the next led color sequence
|
||||
///
|
||||
/// @return The next colors for the leds
|
||||
///
|
||||
virtual const std::vector<RgbColor>& nextColors();
|
||||
|
||||
private:
|
||||
@ -28,9 +45,12 @@ private:
|
||||
/// The vector with led-colors
|
||||
std::vector<RgbColor> _ledColors;
|
||||
|
||||
/// Direction the red-light is currently moving
|
||||
bool _forwardMove = true;
|
||||
/// The location of the current red-light
|
||||
unsigned _currentLight = 0;
|
||||
|
||||
/// Moves the current light to the next (increase or decrease depending on direction)
|
||||
void moveNextLight();
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user