2013-08-15 21:11:02 +02:00
|
|
|
|
|
|
|
// Local-Hyperion includes
|
|
|
|
#include "LedDeviceTest.h"
|
|
|
|
|
2013-11-02 06:51:41 +01:00
|
|
|
LedDeviceTest::LedDeviceTest(const std::string& output) :
|
|
|
|
_ofs(output.empty()?"/home/pi/LedDevice.out":output.c_str())
|
2013-08-15 21:11:02 +02:00
|
|
|
{
|
|
|
|
// empty
|
|
|
|
}
|
|
|
|
|
|
|
|
LedDeviceTest::~LedDeviceTest()
|
|
|
|
{
|
|
|
|
// empty
|
|
|
|
}
|
|
|
|
|
2013-11-11 10:00:37 +01:00
|
|
|
int LedDeviceTest::write(const std::vector<ColorRgb> & ledValues)
|
2013-08-15 21:11:02 +02:00
|
|
|
{
|
|
|
|
_ofs << "[";
|
2013-11-11 10:00:37 +01:00
|
|
|
for (const ColorRgb& color : ledValues)
|
2013-08-15 21:11:02 +02:00
|
|
|
{
|
|
|
|
_ofs << color;
|
|
|
|
}
|
|
|
|
_ofs << "]" << std::endl;
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
2013-10-27 18:04:37 +01:00
|
|
|
|
|
|
|
int LedDeviceTest::switchOff()
|
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|