mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2023-10-10 13:36:59 +02:00
Razer Fixes
This commit is contained in:
parent
772945b505
commit
3bca96981b
@ -501,7 +501,7 @@
|
|||||||
"edt_dev_spec_printTimeStamp_title": "Add timestamp",
|
"edt_dev_spec_printTimeStamp_title": "Add timestamp",
|
||||||
"edt_dev_spec_pwmChannel_title": "PWM channel",
|
"edt_dev_spec_pwmChannel_title": "PWM channel",
|
||||||
"edt_dev_spec_restoreOriginalState_title": "Restore lights' original state when disabled",
|
"edt_dev_spec_restoreOriginalState_title": "Restore lights' original state when disabled",
|
||||||
"edt_dev_spec_razor_device_title": "Razor Chroma Device",
|
"edt_dev_spec_razer_device_title": "Razer Chroma Device",
|
||||||
"edt_dev_spec_serial_title": "Serial number",
|
"edt_dev_spec_serial_title": "Serial number",
|
||||||
"edt_dev_spec_spipath_title": "SPI path",
|
"edt_dev_spec_spipath_title": "SPI path",
|
||||||
"edt_dev_spec_sslHSTimeoutMax_title": "Streamer handshake timeout maximum",
|
"edt_dev_spec_sslHSTimeoutMax_title": "Streamer handshake timeout maximum",
|
||||||
@ -936,4 +936,4 @@
|
|||||||
"wiz_yeelight_intro1": "This wizards configures Hyperion for the Yeelight system. Features are the Yeelighs' auto detection, setting each light to a specific position on your picture or disable it and tune the Hyperion settings automatically! So in short: All you need are some clicks and you are done!",
|
"wiz_yeelight_intro1": "This wizards configures Hyperion for the Yeelight system. Features are the Yeelighs' auto detection, setting each light to a specific position on your picture or disable it and tune the Hyperion settings automatically! So in short: All you need are some clicks and you are done!",
|
||||||
"wiz_yeelight_title": "Yeelight Wizard",
|
"wiz_yeelight_title": "Yeelight Wizard",
|
||||||
"wiz_yeelight_unsupported": "Unsupported"
|
"wiz_yeelight_unsupported": "Unsupported"
|
||||||
}
|
}
|
||||||
|
@ -12,7 +12,7 @@ namespace {
|
|||||||
bool verbose = false;
|
bool verbose = false;
|
||||||
|
|
||||||
// Configuration settings
|
// Configuration settings
|
||||||
const char RAZOR_DEVICE_TYPE[] = "razorDevice";
|
const char RAZER_DEVICE_TYPE[] = "razerDevice";
|
||||||
|
|
||||||
// WLED JSON-API elements
|
// WLED JSON-API elements
|
||||||
const char API_DEFAULT_HOST[] = "localhost";
|
const char API_DEFAULT_HOST[] = "localhost";
|
||||||
@ -25,10 +25,10 @@ constexpr std::chrono::milliseconds HEARTBEAT_INTERVALL{1000};
|
|||||||
|
|
||||||
} //End of constants
|
} //End of constants
|
||||||
|
|
||||||
LedDeviceRazer::LedDeviceRazer(const QJsonObject& /*deviceConfig*/)
|
LedDeviceRazer::LedDeviceRazer(const QJsonObject& deviceConfig)
|
||||||
:
|
: LedDevice(deviceConfig)
|
||||||
_restApi(nullptr)
|
,_restApi(nullptr)
|
||||||
, _apiPort(API_DEFAULT_PORT)
|
,_apiPort(API_DEFAULT_PORT)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -60,14 +60,14 @@ bool LedDeviceRazer::init(const QJsonObject& deviceConfig)
|
|||||||
Debug(_log, "LatchTime : %d", this->getLatchTime());
|
Debug(_log, "LatchTime : %d", this->getLatchTime());
|
||||||
Debug(_log, "RefreshTime : %d", _refreshTimerInterval_ms);
|
Debug(_log, "RefreshTime : %d", _refreshTimerInterval_ms);
|
||||||
|
|
||||||
//Razor Chroma SDK allows localhost connection only
|
//Razer Chroma SDK allows localhost connection only
|
||||||
_hostname = API_DEFAULT_HOST;
|
_hostname = API_DEFAULT_HOST;
|
||||||
_apiPort = API_DEFAULT_PORT;
|
_apiPort = API_DEFAULT_PORT;
|
||||||
|
|
||||||
Debug(_log, "Hostname : %s", QSTRING_CSTR(_hostname));
|
Debug(_log, "Hostname : %s", QSTRING_CSTR(_hostname));
|
||||||
Debug(_log, "Port : %d", _apiPort);
|
Debug(_log, "Port : %d", _apiPort);
|
||||||
|
|
||||||
_razerDeviceType = deviceConfig[RAZOR_DEVICE_TYPE].toString("keyboard");
|
_razerDeviceType = deviceConfig[RAZER_DEVICE_TYPE].toString("keyboard");
|
||||||
|
|
||||||
Debug(_log, "Razer device : %s", QSTRING_CSTR(_razerDeviceType));
|
Debug(_log, "Razer device : %s", QSTRING_CSTR(_razerDeviceType));
|
||||||
|
|
||||||
|
@ -2,9 +2,9 @@
|
|||||||
"type": "object",
|
"type": "object",
|
||||||
"required": true,
|
"required": true,
|
||||||
"properties": {
|
"properties": {
|
||||||
"razorDevice": {
|
"razerDevice": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"title": "edt_dev_spec_razor_device_title",
|
"title": "edt_dev_spec_razer_device_title",
|
||||||
"enum": [ "keyboard", "mouse", "headset", "mousepad", "keypad", "chromalink" ],
|
"enum": [ "keyboard", "mouse", "headset", "mousepad", "keypad", "chromalink" ],
|
||||||
"default": "keyboard",
|
"default": "keyboard",
|
||||||
"options": {
|
"options": {
|
||||||
|
Loading…
Reference in New Issue
Block a user