mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
UI and Web updates (#1421)
* Stop Web-Capture when priority changes * Remote control UI: Treat duration=0 as endless * Stop Web-Capture on non-Image events changes * LED Matrix Layout - Support vertical cabling direction * Additional Yeelight models * Treat http headers case insensitive * Update change log * Treat http headers case insensitive (consider Qt version) * API - Consider provided format when setImage * UI - Support Boblight configuration per LED instance * Support multiple Boblight clients with different priorities * Update changelog * Simplify isGUI rules allowing for QT only builds * Sysinfo: Fix indents * LED-Devices: Show warning, if get properties failed * Qt-Grabber: Fixed position handling of multiple monitors * LED layout: Remove indention limitations * Yeelight: Test YLTD003 * hyperion-remote: Provide image filename to muxer/UI * Refactor PriorityMuxer and related * Temp: Build under Windows 2019 * Yeelight: Remove YLTD003 as it is not working without additional changes * Test Windows-latest with out removing redistributables/new MSVC * correct workflows * correct CI script * Build Windows with Qt 5.15.2 * Priority Muxer: Updates after testing * Fix Typo * Update BGHandler * QTGrabber - Reactivate windows code to avoid cursor issues * Emit prioritiesChanged when autoselect was changed by user Co-authored-by: Paulchen Panther <Paulchen-Panter@protonmail.com>
This commit is contained in:
@@ -336,9 +336,9 @@ protected:
|
||||
bool getUserToken(QString &userToken);
|
||||
|
||||
///
|
||||
/// @brief Is a token authrized. On success this will grant acces to the API (NOT ADMIN API)
|
||||
/// @brief Is a token authorized. On success this will grant acces to the API (NOT ADMIN API)
|
||||
/// @param token The user Token
|
||||
/// @return True on succes
|
||||
/// @return True on success
|
||||
///
|
||||
bool isTokenAuthorized(const QString &token);
|
||||
|
||||
|
@@ -17,6 +17,8 @@
|
||||
// AuthManager
|
||||
#include <hyperion/AuthManager.h>
|
||||
|
||||
#include <hyperion/PriorityMuxer.h>
|
||||
|
||||
class Hyperion;
|
||||
class ComponentRegister;
|
||||
class BonjourBrowserWrapper;
|
||||
@@ -78,10 +80,13 @@ private slots:
|
||||
///
|
||||
void handleBonjourChange(const QMap<QString,BonjourRecord>& bRegisters);
|
||||
#endif
|
||||
|
||||
///
|
||||
/// @brief handle emits from PriorityMuxer
|
||||
/// @param currentPriority The current priority at time of emit
|
||||
/// @param activeInputs The current active input map at time of emit
|
||||
///
|
||||
void handlePriorityUpdate();
|
||||
void handlePriorityUpdate(int currentPriority, const PriorityMuxer::InputsMap& activeInputs);
|
||||
|
||||
///
|
||||
/// @brief Handle imageToLedsMapping updates
|
||||
|
@@ -58,7 +58,7 @@ private slots:
|
||||
/// @brief Handle priority updates from Priority Muxer
|
||||
/// @param priority The new visible priority
|
||||
///
|
||||
void handlePriorityChanges(quint8 priority);
|
||||
void handlePriorityChanges(int priority);
|
||||
|
||||
///
|
||||
/// @brief Forward message to all json target hosts
|
||||
|
@@ -20,14 +20,15 @@ public:
|
||||
, _prioMuxer(_hyperion->getMuxerInstance())
|
||||
, _isBgEffectConfigured(false)
|
||||
{
|
||||
// listen for config changes
|
||||
connect(_hyperion, &Hyperion::settingsChanged,
|
||||
[=](settings::type type, const QJsonDocument& config) { this->handleSettingsUpdate(type, config); }
|
||||
);
|
||||
|
||||
connect(_prioMuxer, &PriorityMuxer::prioritiesChanged,
|
||||
[=]() { this->handlePriorityUpdate(); }
|
||||
);
|
||||
// listen for config changes
|
||||
connect(_hyperion, &Hyperion::settingsChanged, this, [=] (settings::type type, const QJsonDocument& config) {
|
||||
this->handleSettingsUpdate(type, config);
|
||||
});
|
||||
|
||||
connect(_prioMuxer, &PriorityMuxer::prioritiesChanged, this, [=] {
|
||||
this->handlePriorityUpdate();
|
||||
});
|
||||
|
||||
// initialization
|
||||
handleSettingsUpdate(settings::BGEFFECT, _hyperion->getSetting(settings::BGEFFECT));
|
||||
@@ -49,7 +50,10 @@ private slots:
|
||||
const QJsonObject& BGEffectConfig = _bgEffectConfig.object();
|
||||
#define BGCONFIG_ARRAY bgColorConfig.toArray()
|
||||
// clear background priority
|
||||
_hyperion->clear(PriorityMuxer::BG_PRIORITY);
|
||||
if (_hyperion->getCurrentPriority() == PriorityMuxer::BG_PRIORITY)
|
||||
{
|
||||
_hyperion->clear(PriorityMuxer::BG_PRIORITY);
|
||||
}
|
||||
// initial background effect/color
|
||||
if (BGEffectConfig["enable"].toBool(true))
|
||||
{
|
||||
@@ -92,13 +96,14 @@ private slots:
|
||||
///
|
||||
void handlePriorityUpdate()
|
||||
{
|
||||
if (_prioMuxer->getCurrentPriority() != PriorityMuxer::BG_PRIORITY && _prioMuxer->hasPriority(PriorityMuxer::BG_PRIORITY))
|
||||
if (_prioMuxer->getCurrentPriority() < PriorityMuxer::BG_PRIORITY && _prioMuxer->hasPriority(PriorityMuxer::BG_PRIORITY))
|
||||
{
|
||||
Debug(Logger::getInstance("HYPERION"),"Stop background (color-) effect as it moved out of scope");
|
||||
_hyperion->clear(PriorityMuxer::BG_PRIORITY);
|
||||
}
|
||||
else if (_prioMuxer->getCurrentPriority() == PriorityMuxer::LOWEST_PRIORITY && _isBgEffectConfigured)
|
||||
{
|
||||
Debug(Logger::getInstance("HYPERION"),"Start background (color-) effect as it moved is scope");
|
||||
emit handleSettingsUpdate (settings::BGEFFECT, _bgEffectConfig);
|
||||
}
|
||||
}
|
||||
|
@@ -500,7 +500,7 @@ private slots:
|
||||
/// @brief Handle the scenario when no/an input source is available
|
||||
/// @param priority Current priority
|
||||
///
|
||||
void handleSourceAvailability(const quint8& priority);
|
||||
void handleSourceAvailability(int priority);
|
||||
|
||||
private:
|
||||
friend class HyperionDaemon;
|
||||
|
@@ -54,6 +54,8 @@ public:
|
||||
QString owner;
|
||||
};
|
||||
|
||||
typedef QMap<int, InputInfo> InputsMap;
|
||||
|
||||
//Foreground and Background priorities
|
||||
const static int FG_PRIORITY;
|
||||
const static int BG_PRIORITY;
|
||||
@@ -62,6 +64,7 @@ public:
|
||||
const static int LOWEST_PRIORITY;
|
||||
/// Timeout used to identify a non active priority
|
||||
const static int TIMEOUT_NOT_ACTIVE_PRIO;
|
||||
const static int REMOVE_CLEARED_PRIO;
|
||||
|
||||
const static int ENDLESS;
|
||||
|
||||
@@ -197,22 +200,13 @@ public:
|
||||
///
|
||||
void clearAll(bool forceClearAll=false);
|
||||
|
||||
///
|
||||
/// @brief Queue a manual push where muxer doesn't recognize them (e.g. continuous single color pushes)
|
||||
///
|
||||
void queuePush() { emit timeRunner(); }
|
||||
|
||||
signals:
|
||||
///
|
||||
/// @brief Signal which emits when a effect or color with timeout > -1 is running, once per second
|
||||
///
|
||||
void timeRunner();
|
||||
|
||||
///
|
||||
/// @brief Emits whenever the visible priority has changed
|
||||
/// @param priority The new visible priority
|
||||
///
|
||||
void visiblePriorityChanged(quint8 priority);
|
||||
void visiblePriorityChanged(int priority);
|
||||
|
||||
///
|
||||
/// @brief Emits whenever the current visible component changed
|
||||
@@ -222,9 +216,13 @@ signals:
|
||||
|
||||
///
|
||||
/// @brief Emits whenever something changes which influences the priorities listing
|
||||
/// Emits also in 1s interval when a COLOR or EFFECT is running with a timeout > -1 (endless)
|
||||
|
||||
/// Emits also in 1s interval when a COLOR or EFFECT is running with a timeout > -1
|
||||
/// @param currentPriority The current priority at time of emit
|
||||
/// @param activeInputs The current active input map at time of emit
|
||||
|
||||
///
|
||||
void prioritiesChanged();
|
||||
void prioritiesChanged(int currentPriority, InputsMap activeInputs);
|
||||
|
||||
///
|
||||
/// internal used signal to resolve treading issues with timer
|
||||
@@ -233,15 +231,15 @@ signals:
|
||||
|
||||
private slots:
|
||||
///
|
||||
/// Slot which is called to adapt to 1s interval for signal timeRunner() / prioritiesChanged()
|
||||
/// Slot which is called to adapt to 1s interval for signal prioritiesChanged()
|
||||
///
|
||||
void timeTrigger();
|
||||
|
||||
///
|
||||
/// Updates the current time. Channels with a configured time out will be checked and cleared if
|
||||
/// required.
|
||||
/// Updates the current priorities. Channels with a configured time out will be checked and cleared if
|
||||
/// required. Cleared priorities will be removed.
|
||||
///
|
||||
void setCurrentTime();
|
||||
void updatePriorities();
|
||||
|
||||
private:
|
||||
///
|
||||
@@ -266,7 +264,7 @@ private:
|
||||
hyperion::Components _prevVisComp = hyperion::COMP_INVALID;
|
||||
|
||||
/// The mapping from priority channel to led-information
|
||||
QMap<int, InputInfo> _activeInputs;
|
||||
InputsMap _activeInputs;
|
||||
|
||||
/// The information of the lowest priority channel
|
||||
InputInfo _lowestPriorityInfo;
|
||||
|
@@ -29,7 +29,7 @@ namespace NetUtils {
|
||||
server.close();
|
||||
if(port != prevPort)
|
||||
{
|
||||
Warning(log, "The requested Port '%d' was already in use, will use Port '%d' instead", prevPort, port);
|
||||
Warning(log, "The requested Port '%d' is already in use, will use Port '%d' instead", prevPort, port);
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
Reference in New Issue
Block a user