mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
Gold linker, CCache, Stats, LGTM
- Increases linker performance under Linux builds by using Gold linker, if available - ccache is used if available - removed statistic class (Stats.cpp) from project due to the missing result (sorry @Brindosch) - add LGTM bandges for code analysis overview Signed-off-by: Paulchen-Panther <Paulchen-Panter@protonmail.com>
This commit is contained in:
@@ -14,8 +14,8 @@ Grabber::Grabber(QString grabberName, int width, int height, int cropLeft, int c
|
||||
, _enabled(true)
|
||||
, _log(Logger::getInstance(grabberName))
|
||||
{
|
||||
setVideoMode(VIDEO_2D);
|
||||
setCropping(cropLeft, cropRight, cropTop, cropBottom);
|
||||
Grabber::setVideoMode(VIDEO_2D);
|
||||
Grabber::setCropping(cropLeft, cropRight, cropTop, cropBottom);
|
||||
}
|
||||
|
||||
Grabber::~Grabber()
|
||||
|
@@ -32,7 +32,7 @@ GrabberWrapper::GrabberWrapper(QString grabberName, Grabber * ggrabber, unsigned
|
||||
|
||||
GrabberWrapper::~GrabberWrapper()
|
||||
{
|
||||
stop();
|
||||
GrabberWrapper::stop(); // TODO Is this right????????
|
||||
Debug(_log,"Close grabber: %s", QSTRING_CSTR(_grabberName));
|
||||
}
|
||||
|
||||
|
@@ -15,6 +15,7 @@
|
||||
#include <QFile>
|
||||
#include <QFileInfo>
|
||||
#include <QHostInfo>
|
||||
#include <QCryptographicHash>
|
||||
|
||||
// hyperion include
|
||||
#include <hyperion/Hyperion.h>
|
||||
@@ -161,6 +162,9 @@ Hyperion::Hyperion(HyperionDaemon* daemon, const quint8& instance, const QString
|
||||
// boblight, can't live in global scope as it depends on layout
|
||||
_boblightServer = new BoblightServer(this, getSetting(settings::BOBLSERVER));
|
||||
connect(this, &Hyperion::settingsChanged, _boblightServer, &BoblightServer::handleSettingsUpdate);
|
||||
|
||||
// set unique id
|
||||
_id = QString(QCryptographicHash::hash(getConfigFileName().toLocal8Bit(),QCryptographicHash::Sha1).toHex());
|
||||
}
|
||||
|
||||
Hyperion::~Hyperion()
|
||||
@@ -376,7 +380,7 @@ void Hyperion::registerInput(const int priority, const hyperion::Components& com
|
||||
_muxer.registerInput(priority, component, origin, owner, smooth_cfg);
|
||||
}
|
||||
|
||||
const bool Hyperion::setInput(const int priority, const std::vector<ColorRgb>& ledColors, int timeout_ms, const bool& clearEffect)
|
||||
bool Hyperion::setInput(const int priority, const std::vector<ColorRgb>& ledColors, int timeout_ms, const bool& clearEffect)
|
||||
{
|
||||
if(_muxer.setInput(priority, ledColors, timeout_ms))
|
||||
{
|
||||
@@ -393,7 +397,7 @@ const bool Hyperion::setInput(const int priority, const std::vector<ColorRgb>& l
|
||||
return false;
|
||||
}
|
||||
|
||||
const bool Hyperion::setInputImage(const int priority, const Image<ColorRgb>& image, int64_t timeout_ms, const bool& clearEffect)
|
||||
bool Hyperion::setInputImage(const int priority, const Image<ColorRgb>& image, int64_t timeout_ms, const bool& clearEffect)
|
||||
{
|
||||
if(_muxer.setInputImage(priority, image, timeout_ms))
|
||||
{
|
||||
@@ -410,7 +414,7 @@ const bool Hyperion::setInputImage(const int priority, const Image<ColorRgb>& im
|
||||
return false;
|
||||
}
|
||||
|
||||
const bool Hyperion::setInputInactive(const quint8& priority)
|
||||
bool Hyperion::setInputInactive(const quint8& priority)
|
||||
{
|
||||
return _muxer.setInputInactive(priority);
|
||||
}
|
||||
@@ -447,7 +451,7 @@ void Hyperion::adjustmentsUpdated()
|
||||
update();
|
||||
}
|
||||
|
||||
const bool Hyperion::clear(int priority)
|
||||
bool Hyperion::clear(int priority)
|
||||
{
|
||||
// send clear signal to the effect engine
|
||||
// (outside the check so the effect gets cleared even when the effect is not sending colors)
|
||||
@@ -487,12 +491,12 @@ const Hyperion::InputInfo Hyperion::getPriorityInfo(const int priority) const
|
||||
return _muxer.getInputInfo(priority);
|
||||
}
|
||||
|
||||
const bool Hyperion::saveEffect(const QJsonObject& obj, QString& resultMsg)
|
||||
bool Hyperion::saveEffect(const QJsonObject& obj, QString& resultMsg)
|
||||
{
|
||||
return _effectEngine->saveEffect(obj, resultMsg);
|
||||
}
|
||||
|
||||
const bool Hyperion::deleteEffect(const QString& effectName, QString& resultMsg)
|
||||
bool Hyperion::deleteEffect(const QString& effectName, QString& resultMsg)
|
||||
{
|
||||
return _effectEngine->deleteEffect(effectName, resultMsg);
|
||||
}
|
||||
|
@@ -60,7 +60,7 @@ ImageToLedsMap::ImageToLedsMap(
|
||||
const auto maxXLedCount = qMin(maxX_idx, xOffset+actualWidth);
|
||||
|
||||
std::vector<unsigned> ledColors;
|
||||
ledColors.reserve(maxXLedCount*maxYLedCount);
|
||||
ledColors.reserve((size_t) maxXLedCount*maxYLedCount);
|
||||
|
||||
for (unsigned y = minY_idx; y < maxYLedCount; ++y)
|
||||
{
|
||||
|
@@ -157,7 +157,7 @@ void PriorityMuxer::registerInput(const int priority, const hyperion::Components
|
||||
}
|
||||
}
|
||||
|
||||
const bool PriorityMuxer::setInput(const int priority, const std::vector<ColorRgb>& ledColors, int64_t timeout_ms)
|
||||
bool PriorityMuxer::setInput(const int priority, const std::vector<ColorRgb>& ledColors, int64_t timeout_ms)
|
||||
{
|
||||
if(!_activeInputs.contains(priority))
|
||||
{
|
||||
@@ -196,7 +196,7 @@ const bool PriorityMuxer::setInput(const int priority, const std::vector<ColorRg
|
||||
return true;
|
||||
}
|
||||
|
||||
const bool PriorityMuxer::setInputImage(const int priority, const Image<ColorRgb>& image, int64_t timeout_ms)
|
||||
bool PriorityMuxer::setInputImage(const int priority, const Image<ColorRgb>& image, int64_t timeout_ms)
|
||||
{
|
||||
if(!_activeInputs.contains(priority))
|
||||
{
|
||||
@@ -235,13 +235,13 @@ const bool PriorityMuxer::setInputImage(const int priority, const Image<ColorRgb
|
||||
return true;
|
||||
}
|
||||
|
||||
const bool PriorityMuxer::setInputInactive(const quint8& priority)
|
||||
bool PriorityMuxer::setInputInactive(const quint8& priority)
|
||||
{
|
||||
Image<ColorRgb> image;
|
||||
return setInputImage(priority, image, -100);
|
||||
}
|
||||
|
||||
const bool PriorityMuxer::clearInput(const uint8_t priority)
|
||||
bool PriorityMuxer::clearInput(const uint8_t priority)
|
||||
{
|
||||
if (priority < PriorityMuxer::LOWEST_PRIORITY && _activeInputs.remove(priority))
|
||||
{
|
||||
|
@@ -142,7 +142,7 @@ const QJsonDocument SettingsManager::getSetting(const settings::type& type)
|
||||
return QJsonDocument(_qconfig[key].toArray());
|
||||
}
|
||||
|
||||
const bool SettingsManager::saveSettings(QJsonObject config, const bool& correct)
|
||||
bool SettingsManager::saveSettings(QJsonObject config, const bool& correct)
|
||||
{
|
||||
// we need to validate data against schema
|
||||
QJsonSchemaChecker schemaChecker;
|
||||
|
Reference in New Issue
Block a user