mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2023-10-10 13:36:59 +02: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:
parent
6143075365
commit
7dce3ab798
@ -5,7 +5,7 @@
|
|||||||
/// Device configuration contains the following fields:
|
/// Device configuration contains the following fields:
|
||||||
/// * 'name' : The user friendly name of the device (only used for display purposes)
|
/// * 'name' : The user friendly name of the device (only used for display purposes)
|
||||||
/// * 'type' : The type of the device or leds (known types for now are
|
/// * 'type' : The type of the device or leds (known types for now are
|
||||||
/// APA102, Adalight, AmbiLed, Atmo, Hyperion-USBASP-WS2801, Hyperion-USBASP-WS2812, Lightberry, Lightpack, LPD6803, LPD8806, Multi-Lightpack, P9813, Paintpack, PhilipsHUE, PiBlaster, SEDU, Test, ThinkerForge, TPM2, WS2801, WS2812b, None)
|
/// APA102, Adalight, AmbiLed, Atmo, Hyperion-USBASP-WS2801, Hyperion-USBASP-WS2812, Lightberry, Lightpack, LPD6803, LPD8806, Multi-Lightpack, P9813, Paintpack, PhilipsHUE, PiBlaster, SEDU, file, ThinkerForge, TPM2, WS2801, WS2812b, None)
|
||||||
/// * [device type specific configuration]
|
/// * [device type specific configuration]
|
||||||
/// * 'colorOrder' : The order of the color bytes ('rgb', 'rbg', 'bgr', etc.).
|
/// * 'colorOrder' : The order of the color bytes ('rgb', 'rbg', 'bgr', etc.).
|
||||||
"device" :
|
"device" :
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
/// Device configuration contains the following fields:
|
/// Device configuration contains the following fields:
|
||||||
/// * 'name' : The user friendly name of the device (only used for display purposes)
|
/// * 'name' : The user friendly name of the device (only used for display purposes)
|
||||||
/// * 'type' : The type of the device or leds (known types for now are 'ws2801', 'ldp8806',
|
/// * 'type' : The type of the device or leds (known types for now are 'ws2801', 'ldp8806',
|
||||||
/// 'lpd6803', 'sedu', 'adalight', 'lightpack', 'test' and 'none')
|
/// 'lpd6803', 'sedu', 'adalight', 'lightpack', 'file' and 'none')
|
||||||
/// * 'output' : The output specification depends on selected device. This can for example be the
|
/// * 'output' : The output specification depends on selected device. This can for example be the
|
||||||
/// device specifier, device serial number, or the output file name
|
/// device specifier, device serial number, or the output file name
|
||||||
/// * 'rate' : The baudrate of the output to the device
|
/// * 'rate' : The baudrate of the output to the device
|
||||||
|
@ -21,7 +21,7 @@ SET(Leddevice_QT_HEADERS
|
|||||||
${CURRENT_SOURCE_DIR}/LedDevicePhilipsHue.h
|
${CURRENT_SOURCE_DIR}/LedDevicePhilipsHue.h
|
||||||
${CURRENT_SOURCE_DIR}/LedHIDDevice.h
|
${CURRENT_SOURCE_DIR}/LedHIDDevice.h
|
||||||
${CURRENT_SOURCE_DIR}/LedDeviceRawHID.h
|
${CURRENT_SOURCE_DIR}/LedDeviceRawHID.h
|
||||||
${CURRENT_SOURCE_DIR}/LedDeviceTest.h
|
${CURRENT_SOURCE_DIR}/LedDeviceFile.h
|
||||||
${CURRENT_SOURCE_DIR}/LedDeviceFadeCandy.h
|
${CURRENT_SOURCE_DIR}/LedDeviceFadeCandy.h
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -34,7 +34,7 @@ SET(Leddevice_HEADERS
|
|||||||
${CURRENT_SOURCE_DIR}/LedDevicePaintpack.h
|
${CURRENT_SOURCE_DIR}/LedDevicePaintpack.h
|
||||||
${CURRENT_SOURCE_DIR}/LedDevicePiBlaster.h
|
${CURRENT_SOURCE_DIR}/LedDevicePiBlaster.h
|
||||||
${CURRENT_SOURCE_DIR}/LedDeviceSedu.h
|
${CURRENT_SOURCE_DIR}/LedDeviceSedu.h
|
||||||
${CURRENT_SOURCE_DIR}/LedDeviceTest.h
|
${CURRENT_SOURCE_DIR}/LedDeviceFile.h
|
||||||
${CURRENT_SOURCE_DIR}/LedDeviceFadeCandy.h
|
${CURRENT_SOURCE_DIR}/LedDeviceFadeCandy.h
|
||||||
${CURRENT_SOURCE_DIR}/LedDeviceUdp.h
|
${CURRENT_SOURCE_DIR}/LedDeviceUdp.h
|
||||||
${CURRENT_SOURCE_DIR}/LedDeviceHyperionUsbasp.h
|
${CURRENT_SOURCE_DIR}/LedDeviceHyperionUsbasp.h
|
||||||
@ -58,7 +58,7 @@ SET(Leddevice_SOURCES
|
|||||||
${CURRENT_SOURCE_DIR}/LedDevicePaintpack.cpp
|
${CURRENT_SOURCE_DIR}/LedDevicePaintpack.cpp
|
||||||
${CURRENT_SOURCE_DIR}/LedDevicePiBlaster.cpp
|
${CURRENT_SOURCE_DIR}/LedDevicePiBlaster.cpp
|
||||||
${CURRENT_SOURCE_DIR}/LedDeviceSedu.cpp
|
${CURRENT_SOURCE_DIR}/LedDeviceSedu.cpp
|
||||||
${CURRENT_SOURCE_DIR}/LedDeviceTest.cpp
|
${CURRENT_SOURCE_DIR}/LedDeviceFile.cpp
|
||||||
${CURRENT_SOURCE_DIR}/LedDeviceFadeCandy.cpp
|
${CURRENT_SOURCE_DIR}/LedDeviceFadeCandy.cpp
|
||||||
${CURRENT_SOURCE_DIR}/LedDeviceUdp.cpp
|
${CURRENT_SOURCE_DIR}/LedDeviceUdp.cpp
|
||||||
${CURRENT_SOURCE_DIR}/LedDeviceHyperionUsbasp.cpp
|
${CURRENT_SOURCE_DIR}/LedDeviceHyperionUsbasp.cpp
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
#include "LedDevicePaintpack.h"
|
#include "LedDevicePaintpack.h"
|
||||||
#include "LedDevicePiBlaster.h"
|
#include "LedDevicePiBlaster.h"
|
||||||
#include "LedDeviceSedu.h"
|
#include "LedDeviceSedu.h"
|
||||||
#include "LedDeviceTest.h"
|
#include "LedDeviceFile.h"
|
||||||
#include "LedDeviceFadeCandy.h"
|
#include "LedDeviceFadeCandy.h"
|
||||||
#include "LedDeviceUdp.h"
|
#include "LedDeviceUdp.h"
|
||||||
#include "LedDeviceHyperionUsbasp.h"
|
#include "LedDeviceHyperionUsbasp.h"
|
||||||
@ -275,10 +275,10 @@ LedDevice * LedDeviceFactory::construct(const Json::Value & deviceConfig)
|
|||||||
|
|
||||||
device = new LedDeviceAtmoOrb(output, switchOffOnBlack, transitiontime, port, numLeds, orbIds);
|
device = new LedDeviceAtmoOrb(output, switchOffOnBlack, transitiontime, port, numLeds, orbIds);
|
||||||
}
|
}
|
||||||
else if (type == "test")
|
else if (type == "file")
|
||||||
{
|
{
|
||||||
const std::string output = deviceConfig["output"].asString();
|
const std::string output = deviceConfig["output"].asString();
|
||||||
device = new LedDeviceTest(output);
|
device = new LedDeviceFile(output);
|
||||||
}
|
}
|
||||||
else if (type == "fadecandy")
|
else if (type == "fadecandy")
|
||||||
{
|
{
|
||||||
|
@ -1,19 +1,19 @@
|
|||||||
|
|
||||||
// Local-Hyperion includes
|
// Local-Hyperion includes
|
||||||
#include "LedDeviceTest.h"
|
#include "LedDeviceFile.h"
|
||||||
|
|
||||||
LedDeviceTest::LedDeviceTest(const std::string& output) :
|
LedDeviceFile::LedDeviceFile(const std::string& output) :
|
||||||
_ofs(output.empty()?"/home/pi/LedDevice.out":output.c_str())
|
_ofs(output.empty()?"/home/pi/LedDevice.out":output.c_str())
|
||||||
{
|
{
|
||||||
// empty
|
// empty
|
||||||
}
|
}
|
||||||
|
|
||||||
LedDeviceTest::~LedDeviceTest()
|
LedDeviceFile::~LedDeviceFile()
|
||||||
{
|
{
|
||||||
// empty
|
// empty
|
||||||
}
|
}
|
||||||
|
|
||||||
int LedDeviceTest::write(const std::vector<ColorRgb> & ledValues)
|
int LedDeviceFile::write(const std::vector<ColorRgb> & ledValues)
|
||||||
{
|
{
|
||||||
_ofs << "[";
|
_ofs << "[";
|
||||||
for (const ColorRgb& color : ledValues)
|
for (const ColorRgb& color : ledValues)
|
||||||
@ -25,7 +25,7 @@ int LedDeviceTest::write(const std::vector<ColorRgb> & ledValues)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int LedDeviceTest::switchOff()
|
int LedDeviceFile::switchOff()
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
@ -10,18 +10,18 @@
|
|||||||
/// Implementation of the LedDevice that write the led-colors to an
|
/// Implementation of the LedDevice that write the led-colors to an
|
||||||
/// ASCII-textfile('/home/pi/LedDevice.out')
|
/// ASCII-textfile('/home/pi/LedDevice.out')
|
||||||
///
|
///
|
||||||
class LedDeviceTest : public LedDevice
|
class LedDeviceFile : public LedDevice
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
///
|
///
|
||||||
/// Constructs the test-device, which opens an output stream to the file
|
/// Constructs the test-device, which opens an output stream to the file
|
||||||
///
|
///
|
||||||
LedDeviceTest(const std::string& output);
|
LedDeviceFile(const std::string& output);
|
||||||
|
|
||||||
///
|
///
|
||||||
/// Destructor of this test-device
|
/// Destructor of this test-device
|
||||||
///
|
///
|
||||||
virtual ~LedDeviceTest();
|
virtual ~LedDeviceFile();
|
||||||
|
|
||||||
///
|
///
|
||||||
/// Writes the given led-color values to the output stream
|
/// Writes the given led-color values to the output stream
|
Loading…
Reference in New Issue
Block a user