mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
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
This commit is contained in:
31
libsrc/leddevice/LedDeviceFile.cpp
Normal file
31
libsrc/leddevice/LedDeviceFile.cpp
Normal file
@@ -0,0 +1,31 @@
|
||||
|
||||
// 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;
|
||||
}
|
Reference in New Issue
Block a user