mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
Leddevice refactoring the next part (#253)
* add general switchOff * refactoring of leddevices regarding ledcount and switchoff * remove obsolete includes
This commit is contained in:
@@ -1,16 +1,4 @@
|
||||
|
||||
// STL includes
|
||||
#include <cstring>
|
||||
#include <cstdio>
|
||||
#include <iostream>
|
||||
|
||||
// Linux includes
|
||||
#include <fcntl.h>
|
||||
#include <sys/ioctl.h>
|
||||
|
||||
// hyperion local includes
|
||||
#include "LedDeviceAdalight.h"
|
||||
#include <leddevice/LedDevice.h>
|
||||
|
||||
LedDeviceAdalight::LedDeviceAdalight(const Json::Value &deviceConfig)
|
||||
: ProviderRs232(deviceConfig)
|
||||
@@ -60,16 +48,6 @@ int LedDeviceAdalight::write(const std::vector<ColorRgb> & ledValues)
|
||||
return writeBytes(_ledBuffer.size(), _ledBuffer.data());
|
||||
}
|
||||
|
||||
int LedDeviceAdalight::switchOff()
|
||||
{
|
||||
// restart the timer
|
||||
_timer.start();
|
||||
|
||||
// write data
|
||||
memset(6 + _ledBuffer.data(), 0, _ledBuffer.size()-6);
|
||||
return writeBytes(_ledBuffer.size(), _ledBuffer.data());
|
||||
}
|
||||
|
||||
void LedDeviceAdalight::rewriteLeds()
|
||||
{
|
||||
writeBytes(_ledBuffer.size(), _ledBuffer.data());
|
||||
|
||||
Reference in New Issue
Block a user