mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
@@ -41,10 +41,6 @@ CaptureCont::CaptureCont(Hyperion* hyperion)
|
||||
handleSettingsUpdate(settings::INSTCAPTURE, _hyperion->getSetting(settings::INSTCAPTURE));
|
||||
}
|
||||
|
||||
CaptureCont::~CaptureCont()
|
||||
{
|
||||
}
|
||||
|
||||
void CaptureCont::handleV4lImage(const QString& name, const Image<ColorRgb> & image)
|
||||
{
|
||||
if(_v4lCaptName != name)
|
||||
|
@@ -20,10 +20,6 @@ Grabber::Grabber(QString grabberName, int width, int height, int cropLeft, int c
|
||||
Grabber::setCropping(cropLeft, cropRight, cropTop, cropBottom);
|
||||
}
|
||||
|
||||
Grabber::~Grabber()
|
||||
{
|
||||
}
|
||||
|
||||
void Grabber::setEnabled(bool enable)
|
||||
{
|
||||
Info(_log,"Capture interface is now %s", enable ? "enabled" : "disabled");
|
||||
|
@@ -380,7 +380,7 @@ void Hyperion::setColor(const int priority, const std::vector<ColorRgb> &ledColo
|
||||
_effectEngine->channelCleared(priority);
|
||||
|
||||
// create full led vector from single/multiple colors
|
||||
unsigned int size = _ledString.leds().size();
|
||||
size_t size = _ledString.leds().size();
|
||||
std::vector<ColorRgb> newLedColors;
|
||||
while (true)
|
||||
{
|
||||
|
@@ -16,7 +16,7 @@ HyperionIManager::HyperionIManager(const QString& rootPath, QObject* parent)
|
||||
, _rootPath( rootPath )
|
||||
{
|
||||
HIMinstance = this;
|
||||
qRegisterMetaType<instanceState>("instanceState");
|
||||
qRegisterMetaType<InstanceState>("InstanceState");
|
||||
}
|
||||
|
||||
Hyperion* HyperionIManager::getHyperionInstance(const quint8& instance)
|
||||
@@ -124,7 +124,7 @@ bool HyperionIManager::stopInstance(const quint8& inst)
|
||||
if(_runningInstances.contains(inst))
|
||||
{
|
||||
// notify a ON_STOP rather sooner than later, queued signal listener should have some time to drop the pointer before it's deleted
|
||||
emit instanceStateChanged(H_ON_STOP, inst);
|
||||
emit instanceStateChanged(InstanceState::H_ON_STOP, inst);
|
||||
Hyperion* hyperion = _runningInstances.value(inst);
|
||||
hyperion->stop();
|
||||
|
||||
@@ -146,7 +146,7 @@ bool HyperionIManager::createInstance(const QString& name, const bool& start)
|
||||
if(_instanceTable->createInstance(name, inst))
|
||||
{
|
||||
Info(_log,"New Hyperion instance created with name '%s'",QSTRING_CSTR(name));
|
||||
emit instanceStateChanged(H_CREATED, inst, name);
|
||||
emit instanceStateChanged(InstanceState::H_CREATED, inst, name);
|
||||
emit change();
|
||||
|
||||
if(start)
|
||||
@@ -168,7 +168,7 @@ bool HyperionIManager::deleteInstance(const quint8& inst)
|
||||
if(_instanceTable->deleteInstance(inst))
|
||||
{
|
||||
Info(_log,"Hyperion instance with index '%d' has been deleted", inst);
|
||||
emit instanceStateChanged(H_DELETED, inst);
|
||||
emit instanceStateChanged(InstanceState::H_DELETED, inst);
|
||||
emit change();
|
||||
|
||||
return true;
|
||||
@@ -195,7 +195,7 @@ void HyperionIManager::handleFinished()
|
||||
|
||||
_runningInstances.remove(instance);
|
||||
hyperion->deleteLater();
|
||||
emit instanceStateChanged(H_STOPPED, instance);
|
||||
emit instanceStateChanged(InstanceState::H_STOPPED, instance);
|
||||
emit change();
|
||||
}
|
||||
|
||||
@@ -208,6 +208,6 @@ void HyperionIManager::handleStarted()
|
||||
|
||||
_startQueue.removeAll(instance);
|
||||
_runningInstances.insert(instance, hyperion);
|
||||
emit instanceStateChanged(H_STARTED, instance);
|
||||
emit instanceStateChanged(InstanceState::H_STARTED, instance);
|
||||
emit change();
|
||||
}
|
||||
|
@@ -69,11 +69,8 @@ void ImageProcessor::setSize(const unsigned width, const unsigned height)
|
||||
return;
|
||||
}
|
||||
|
||||
if ( _imageToLeds != nullptr)
|
||||
{
|
||||
// Clean up the old buffer and mapping
|
||||
delete _imageToLeds;
|
||||
}
|
||||
// Clean up the old buffer and mapping
|
||||
delete _imageToLeds;
|
||||
|
||||
// Construct a new buffer and mapping
|
||||
_imageToLeds = (width>0 && height>0) ? (new ImageToLedsMap(width, height, 0, 0, _ledString.leds())) : nullptr;
|
||||
|
@@ -5,7 +5,6 @@
|
||||
// hyperion includes
|
||||
#include <hyperion/LedString.h>
|
||||
|
||||
|
||||
LedString::LedString()
|
||||
{
|
||||
// empty
|
||||
|
@@ -43,11 +43,6 @@ LinearColorSmoothing::LinearColorSmoothing(const QJsonDocument& config, Hyperion
|
||||
connect(_timer, &QTimer::timeout, this, &LinearColorSmoothing::updateLeds);
|
||||
}
|
||||
|
||||
LinearColorSmoothing::~LinearColorSmoothing()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void LinearColorSmoothing::handleSettingsUpdate(const settings::type& type, const QJsonDocument& config)
|
||||
{
|
||||
if(type == settings::SMOOTHING)
|
||||
@@ -224,7 +219,6 @@ void LinearColorSmoothing::componentStateChange(const hyperion::Components compo
|
||||
{
|
||||
setEnable(state);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void LinearColorSmoothing::setEnable(bool enable)
|
||||
|
@@ -32,9 +32,6 @@ public:
|
||||
///
|
||||
LinearColorSmoothing(const QJsonDocument& config, Hyperion* hyperion);
|
||||
|
||||
/// Destructor
|
||||
virtual ~LinearColorSmoothing();
|
||||
|
||||
/// LED values as input for the smoothing filter
|
||||
///
|
||||
/// @param ledValues The color-value per led
|
||||
|
@@ -88,7 +88,7 @@ SettingsManager::SettingsManager(const quint8& instance, QObject* parent)
|
||||
// check if our main schema syntax is IO
|
||||
if (!valid.second)
|
||||
{
|
||||
foreach (auto & schemaError, schemaChecker.getMessages())
|
||||
for (auto & schemaError : schemaChecker.getMessages())
|
||||
Error(_log, "Schema Syntax Error: %s", QSTRING_CSTR(schemaError));
|
||||
throw std::runtime_error("The config schema has invalid syntax. This should never happen! Go fix it!");
|
||||
}
|
||||
@@ -97,7 +97,7 @@ SettingsManager::SettingsManager(const quint8& instance, QObject* parent)
|
||||
Info(_log,"Table upgrade required...");
|
||||
dbConfig = schemaChecker.getAutoCorrectedConfig(dbConfig);
|
||||
|
||||
foreach (auto & schemaError, schemaChecker.getMessages())
|
||||
for (auto & schemaError : schemaChecker.getMessages())
|
||||
Warning(_log, "Config Fix: %s", QSTRING_CSTR(schemaError));
|
||||
|
||||
saveSettings(dbConfig);
|
||||
@@ -131,7 +131,7 @@ bool SettingsManager::saveSettings(QJsonObject config, const bool& correct)
|
||||
Warning(_log,"Fixing json data!");
|
||||
config = schemaChecker.getAutoCorrectedConfig(config);
|
||||
|
||||
foreach (auto & schemaError, schemaChecker.getMessages())
|
||||
for (auto & schemaError : schemaChecker.getMessages())
|
||||
Warning(_log, "Config Fix: %s", QSTRING_CSTR(schemaError));
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user