Razer Fixes

This commit is contained in:
Lord-Grey 2020-12-10 21:13:06 +01:00
parent 772945b505
commit 3bca96981b
3 changed files with 11 additions and 11 deletions

View File

@ -501,7 +501,7 @@
"edt_dev_spec_printTimeStamp_title": "Add timestamp",
"edt_dev_spec_pwmChannel_title": "PWM channel",
"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_spipath_title": "SPI path",
"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_title": "Yeelight Wizard",
"wiz_yeelight_unsupported": "Unsupported"
}
}

View File

@ -12,7 +12,7 @@ namespace {
bool verbose = false;
// Configuration settings
const char RAZOR_DEVICE_TYPE[] = "razorDevice";
const char RAZER_DEVICE_TYPE[] = "razerDevice";
// WLED JSON-API elements
const char API_DEFAULT_HOST[] = "localhost";
@ -25,10 +25,10 @@ constexpr std::chrono::milliseconds HEARTBEAT_INTERVALL{1000};
} //End of constants
LedDeviceRazer::LedDeviceRazer(const QJsonObject& /*deviceConfig*/)
:
_restApi(nullptr)
, _apiPort(API_DEFAULT_PORT)
LedDeviceRazer::LedDeviceRazer(const QJsonObject& deviceConfig)
: LedDevice(deviceConfig)
,_restApi(nullptr)
,_apiPort(API_DEFAULT_PORT)
{
}
@ -60,14 +60,14 @@ bool LedDeviceRazer::init(const QJsonObject& deviceConfig)
Debug(_log, "LatchTime : %d", this->getLatchTime());
Debug(_log, "RefreshTime : %d", _refreshTimerInterval_ms);
//Razor Chroma SDK allows localhost connection only
//Razer Chroma SDK allows localhost connection only
_hostname = API_DEFAULT_HOST;
_apiPort = API_DEFAULT_PORT;
Debug(_log, "Hostname : %s", QSTRING_CSTR(_hostname));
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));

View File

@ -2,9 +2,9 @@
"type": "object",
"required": true,
"properties": {
"razorDevice": {
"razerDevice": {
"type": "string",
"title": "edt_dev_spec_razor_device_title",
"title": "edt_dev_spec_razer_device_title",
"enum": [ "keyboard", "mouse", "headset", "mousepad", "keypad", "chromalink" ],
"default": "keyboard",
"options": {