mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2023-10-10 13:36:59 +02:00
a3204ae6be
Former-commit-id: eff12ec16d08ffa00287ed68238ab6b397f1c53d
32 lines
459 B
C++
32 lines
459 B
C++
|
|
// Local-Hyperion includes
|
|
#include "LedDeviceFile.h"
|
|
|
|
LedDeviceFile::LedDeviceFile(const std::string& output) :
|
|
_ofs(output.empty()?"/dev/null":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;
|
|
}
|