Added doxygen comments

This commit is contained in:
T. van der Zwan 2013-09-09 17:14:49 +00:00
parent a567f0feeb
commit b9826e06ee
2 changed files with 44 additions and 2 deletions

View File

@ -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:

View File

@ -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();
};