mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
* Print stack trace on crash * Printing stack trace is fully functional except for WIN32 * Minor fixes * Minor fixes
This commit is contained in:
@@ -39,7 +39,7 @@ GrabberWrapper::GrabberWrapper(QString grabberName, Grabber * ggrabber, unsigned
|
||||
|
||||
GrabberWrapper::~GrabberWrapper()
|
||||
{
|
||||
GrabberWrapper::stop(); // TODO Is this right????????
|
||||
stop();
|
||||
Debug(_log,"Close grabber: %s", QSTRING_CSTR(_grabberName));
|
||||
}
|
||||
|
||||
@@ -53,9 +53,12 @@ bool GrabberWrapper::start()
|
||||
|
||||
void GrabberWrapper::stop()
|
||||
{
|
||||
// Stop the timer, effectivly stopping the process
|
||||
Debug(_log,"Grabber stop()");
|
||||
_timer->stop();
|
||||
if (_timer->isActive())
|
||||
{
|
||||
// Stop the timer, effectivly stopping the process
|
||||
Debug(_log,"Grabber stop()");
|
||||
_timer->stop();
|
||||
}
|
||||
}
|
||||
|
||||
QStringList GrabberWrapper::availableGrabbers()
|
||||
@@ -216,7 +219,7 @@ void GrabberWrapper::handleSourceRequest(const hyperion::Components& component,
|
||||
|
||||
void GrabberWrapper::tryStart()
|
||||
{
|
||||
// verify start condition
|
||||
// verify start condition
|
||||
if((_grabberName.startsWith("V4L") && !GRABBER_V4L_CLIENTS.empty()) || (!_grabberName.startsWith("V4L") && !GRABBER_SYS_CLIENTS.empty()))
|
||||
{
|
||||
start();
|
||||
|
@@ -141,9 +141,8 @@ void Hyperion::start()
|
||||
_boblightServer = new BoblightServer(this, getSetting(settings::BOBLSERVER));
|
||||
connect(this, &Hyperion::settingsChanged, _boblightServer, &BoblightServer::handleSettingsUpdate);
|
||||
|
||||
// instance inited
|
||||
// instance inited, enter thread event loop
|
||||
emit started();
|
||||
// enter thread event loop
|
||||
}
|
||||
|
||||
void Hyperion::stop()
|
||||
@@ -380,18 +379,8 @@ void Hyperion::setColor(const int priority, const std::vector<ColorRgb> &ledColo
|
||||
_effectEngine->channelCleared(priority);
|
||||
|
||||
// create full led vector from single/multiple colors
|
||||
size_t size = _ledString.leds().size();
|
||||
std::vector<ColorRgb> newLedColors;
|
||||
while (true)
|
||||
{
|
||||
for (const auto &entry : ledColors)
|
||||
{
|
||||
newLedColors.emplace_back(entry);
|
||||
if (newLedColors.size() == size)
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
end:
|
||||
std::copy_n(ledColors.begin(), _ledString.leds().size(), std::back_inserter(newLedColors));
|
||||
|
||||
if (getPriorityInfo(priority).componentId != hyperion::COMP_COLOR)
|
||||
clear(priority);
|
||||
|
Reference in New Issue
Block a user