mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
global on/off (#424)
* implement global on/off * set gamma minimum to 0.1
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <map>
|
||||
|
||||
// Qt includes
|
||||
#include <QByteArray>
|
||||
#include <QTcpSocket>
|
||||
@@ -317,6 +319,9 @@ private:
|
||||
///
|
||||
bool checkJson(const QJsonObject & message, const QString &schemaResource, QString & errors, bool ignoreRequired = false);
|
||||
|
||||
/// returns if hyperion is on or off
|
||||
inline bool hyperionIsActive() { return JsonClientConnection::_componentsPrevState.empty(); };
|
||||
|
||||
/// The TCP-Socket that is connected tot the Json-client
|
||||
QTcpSocket * _socket;
|
||||
|
||||
@@ -358,6 +363,9 @@ private:
|
||||
/// address of client
|
||||
QHostAddress _clientAddress;
|
||||
|
||||
/// holds the state before off state
|
||||
static std::map<hyperion::Components, bool> _componentsPrevState;
|
||||
|
||||
// masks for fields in the basic header
|
||||
static uint8_t const BHB0_OPCODE = 0x0F;
|
||||
static uint8_t const BHB0_RSV3 = 0x10;
|
||||
|
Reference in New Issue
Block a user