mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2023-10-10 13:36:59 +02:00
LedDeviceFile now defaults to /dev/null if the output is omitted.
Former-commit-id: eff12ec16d08ffa00287ed68238ab6b397f1c53d
This commit is contained in:
parent
7dce3ab798
commit
a3204ae6be
@ -277,7 +277,7 @@ LedDevice * LedDeviceFactory::construct(const Json::Value & deviceConfig)
|
|||||||
}
|
}
|
||||||
else if (type == "file")
|
else if (type == "file")
|
||||||
{
|
{
|
||||||
const std::string output = deviceConfig["output"].asString();
|
const std::string output = deviceConfig.get("output", "/dev/null").asString();
|
||||||
device = new LedDeviceFile(output);
|
device = new LedDeviceFile(output);
|
||||||
}
|
}
|
||||||
else if (type == "fadecandy")
|
else if (type == "fadecandy")
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
#include "LedDeviceFile.h"
|
#include "LedDeviceFile.h"
|
||||||
|
|
||||||
LedDeviceFile::LedDeviceFile(const std::string& output) :
|
LedDeviceFile::LedDeviceFile(const std::string& output) :
|
||||||
_ofs(output.empty()?"/home/pi/LedDevice.out":output.c_str())
|
_ofs(output.empty()?"/dev/null":output.c_str())
|
||||||
{
|
{
|
||||||
// empty
|
// empty
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user