hyperion.ng/libsrc/leddevice/LedDeviceFile.cpp
penfold42 7dce3ab798 renamed the "Test" device to be "File"
No functional changes, but
- files have been renamed
- the device name is now "file" not "test"


Former-commit-id: 3fbc03c3fe1d764654c1d28ebb80562ce6276ab1
2016-03-23 21:12:34 +11:00

32 lines
472 B
C++

// Local-Hyperion includes
#include "LedDeviceFile.h"
LedDeviceFile::LedDeviceFile(const std::string& output) :
_ofs(output.empty()?"/home/pi/LedDevice.out":output.c_str())
{
// empty
}
LedDeviceFile::~LedDeviceFile()
{
// empty
}
int LedDeviceFile::write(const std::vector<ColorRgb> & ledValues)
{
_ofs << "[";
for (const ColorRgb& color : ledValues)
{
_ofs << color;
}
_ofs << "]" << std::endl;
return 0;
}
int LedDeviceFile::switchOff()
{
return 0;
}