2013-12-10 20:28:27 +01:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
// STL includes
|
|
|
|
#include <vector>
|
|
|
|
|
|
|
|
// Hyperion includes
|
2015-11-08 16:32:53 +01:00
|
|
|
#include "LedHIDDevice.h"
|
2013-12-10 20:28:27 +01:00
|
|
|
|
|
|
|
///
|
|
|
|
/// LedDevice implementation for a paintpack device ()
|
|
|
|
///
|
2015-11-08 16:32:53 +01:00
|
|
|
class LedDevicePaintpack : public LedHIDDevice
|
2013-12-10 20:28:27 +01:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
/**
|
|
|
|
* Constructs the paintpack device
|
|
|
|
*/
|
2015-11-08 16:32:53 +01:00
|
|
|
LedDevicePaintpack(const unsigned short VendorId, const unsigned short ProductId, int delayAfterConnect_ms);
|
2013-12-10 20:28:27 +01:00
|
|
|
|
|
|
|
///
|
|
|
|
/// Writes the RGB-Color values to the leds.
|
|
|
|
///
|
|
|
|
/// @param[in] ledValues The RGB-color per led
|
|
|
|
///
|
|
|
|
/// @return Zero on success else negative
|
|
|
|
///
|
|
|
|
virtual int write(const std::vector<ColorRgb>& ledValues);
|
|
|
|
|
|
|
|
///
|
|
|
|
/// Switch the leds off
|
|
|
|
///
|
|
|
|
/// @return Zero on success else negative
|
|
|
|
///
|
|
|
|
virtual int switchOff();
|
|
|
|
|
|
|
|
private:
|
|
|
|
/// buffer for led data
|
|
|
|
std::vector<uint8_t> _ledBuffer;
|
|
|
|
};
|