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
|
// Hyperion includes
|
||||||
#include <hyperion/Hyperion.h>
|
#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
|
class AbstractBootSequence : public QObject, public BootSequence
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
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);
|
AbstractBootSequence(Hyperion * hyperion, const int64_t interval, const unsigned iterationCnt);
|
||||||
|
|
||||||
|
///
|
||||||
|
/// Starts the boot-sequence
|
||||||
|
///
|
||||||
virtual void start();
|
virtual void start();
|
||||||
|
|
||||||
protected slots:
|
protected slots:
|
||||||
|
///
|
||||||
|
/// Timer slot for handling each interval of the boot-sequence
|
||||||
|
///
|
||||||
void update();
|
void update();
|
||||||
|
|
||||||
|
|
||||||
protected:
|
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;
|
virtual const std::vector<RgbColor>& nextColors() = 0;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@ -8,14 +8,31 @@
|
|||||||
#include <hyperion/Hyperion.h>
|
#include <hyperion/Hyperion.h>
|
||||||
#include <hyperion/ImageProcessor.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
|
class KittBootSequence : public AbstractBootSequence
|
||||||
{
|
{
|
||||||
public:
|
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);
|
KittBootSequence(Hyperion * hyperion, const unsigned duration_ms);
|
||||||
|
|
||||||
|
///
|
||||||
|
/// Destructor, deletes the processor
|
||||||
|
///
|
||||||
virtual ~KittBootSequence();
|
virtual ~KittBootSequence();
|
||||||
|
|
||||||
|
///
|
||||||
|
/// Returns the next led color sequence
|
||||||
|
///
|
||||||
|
/// @return The next colors for the leds
|
||||||
|
///
|
||||||
virtual const std::vector<RgbColor>& nextColors();
|
virtual const std::vector<RgbColor>& nextColors();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
@ -28,9 +45,12 @@ private:
|
|||||||
/// The vector with led-colors
|
/// The vector with led-colors
|
||||||
std::vector<RgbColor> _ledColors;
|
std::vector<RgbColor> _ledColors;
|
||||||
|
|
||||||
|
/// Direction the red-light is currently moving
|
||||||
bool _forwardMove = true;
|
bool _forwardMove = true;
|
||||||
|
/// The location of the current red-light
|
||||||
unsigned _currentLight = 0;
|
unsigned _currentLight = 0;
|
||||||
|
|
||||||
|
/// Moves the current light to the next (increase or decrease depending on direction)
|
||||||
void moveNextLight();
|
void moveNextLight();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user