diff --git a/libsrc/leddevice/LedDeviceFactory.cpp b/libsrc/leddevice/LedDeviceFactory.cpp index 37f22511..7e52748c 100755 --- a/libsrc/leddevice/LedDeviceFactory.cpp +++ b/libsrc/leddevice/LedDeviceFactory.cpp @@ -277,7 +277,7 @@ LedDevice * LedDeviceFactory::construct(const Json::Value & deviceConfig) } 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); } else if (type == "fadecandy") diff --git a/libsrc/leddevice/LedDeviceFile.cpp b/libsrc/leddevice/LedDeviceFile.cpp index 87085f39..e6da1fc0 100644 --- a/libsrc/leddevice/LedDeviceFile.cpp +++ b/libsrc/leddevice/LedDeviceFile.cpp @@ -3,7 +3,7 @@ #include "LedDeviceFile.h" 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 }