2016-06-25 22:08:17 +02:00
|
|
|
#include <leddevice/LedDevice.h>
|
|
|
|
|
2016-08-23 20:07:12 +02:00
|
|
|
LedDeviceRegistry LedDevice::_ledDeviceMap = LedDeviceRegistry();
|
|
|
|
std::string LedDevice::_activeDevice = "";
|
|
|
|
|
2016-06-25 22:08:17 +02:00
|
|
|
LedDevice::LedDevice()
|
2016-08-14 10:46:44 +02:00
|
|
|
: QObject()
|
|
|
|
, _log(Logger::getInstance("LedDevice"))
|
|
|
|
, _ledCount(0)
|
|
|
|
, _ledBuffer(0)
|
|
|
|
|
2016-06-25 22:08:17 +02:00
|
|
|
{
|
|
|
|
}
|
2016-07-13 11:18:12 +02:00
|
|
|
|
2016-08-23 20:07:12 +02:00
|
|
|
// dummy implemention
|
2016-07-13 11:18:12 +02:00
|
|
|
int LedDevice::open()
|
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
2016-08-23 20:07:12 +02:00
|
|
|
|
|
|
|
int LedDevice::addToDeviceMap(std::string name, LedDeviceCreateFuncType funcPtr)
|
|
|
|
{
|
|
|
|
_ledDeviceMap.emplace(name,funcPtr);
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
const LedDeviceRegistry& LedDevice::getDeviceMap()
|
|
|
|
{
|
|
|
|
return _ledDeviceMap;
|
|
|
|
}
|
|
|
|
|
|
|
|
void LedDevice::setActiveDevice(std::string dev)
|
|
|
|
{
|
|
|
|
_activeDevice = dev;
|
|
|
|
}
|