Fixed some issues of new QMK Protocol

This commit is contained in:
HorrorTroll 2022-07-12 09:40:00 +07:00
parent 4fd156d373
commit 3217bd7ceb
3 changed files with 25 additions and 16 deletions

View file

@ -105,6 +105,13 @@ void DetectQMKOpenRGBControllers(hid_device_info *info, const std::string&)
ResourceManager::get()->RegisterRGBController(rgb_controller);
}
break;
case QMK_OPENRGB_PROTOCOL_VERSION_E:
{
QMKOpenRGBRevDController* controller = new QMKOpenRGBRevDController(dev, info->path);
RGBController_QMKOpenRGBRevE* rgb_controller = new RGBController_QMKOpenRGBRevE(controller, true);
ResourceManager::get()->RegisterRGBController(rgb_controller);
}
break;
default:
if (version == 0)
{
@ -117,7 +124,7 @@ void DetectQMKOpenRGBControllers(hid_device_info *info, const std::string&)
"For officaly supported QMK boards grab <a href=\"https://github.com/Kasper24/QMK-OpenRGB\">url</a> \n"
"For Sonix boards grab <a href=\"https://github.com/SonixQMK/qmk_firmware/tree/sn32_openrgb\">url</a>", version);
}
else if (version > QMK_OPENRGB_PROTOCOL_VERSION_D)
else if (version > QMK_OPENRGB_PROTOCOL_VERSION_E)
{
LOG_WARNING("[QMK OpenRGB] Detection failed - the detected keyboard is using version protocol %i which is not supported by this OpenRGB build. Please update OpenRGB!", version);
}

View file

@ -161,21 +161,6 @@ RGBController_QMKOpenRGBRevE::RGBController_QMKOpenRGBRevE(QMKOpenRGBRevDControl
InitializeMode("Hue Wave", current_mode, MODE_FLAG_HAS_MODE_SPECIFIC_COLOR | MODE_FLAG_HAS_SPEED, MODE_COLORS_MODE_SPECIFIC, save);
}
if(std::find(enabled_modes.begin(), enabled_modes.end(), QMK_OPENRGB_MODE_PIXEL_RAIN) != enabled_modes.end())
{
InitializeMode("Pixel Rain", current_mode, MODE_FLAG_HAS_SPEED, MODE_COLORS_NONE, save);
}
if(std::find(enabled_modes.begin(), enabled_modes.end(), QMK_OPENRGB_MODE_PIXEL_FLOW) != enabled_modes.end())
{
InitializeMode("Pixel Flow", current_mode, MODE_FLAG_HAS_SPEED, MODE_COLORS_NONE, save);
}
if(std::find(enabled_modes.begin(), enabled_modes.end(), QMK_OPENRGB_MODE_PIXEL_FRACTAL) != enabled_modes.end())
{
InitializeMode("Pixel Fractal", current_mode, MODE_FLAG_HAS_MODE_SPECIFIC_COLOR | MODE_FLAG_HAS_SPEED, MODE_COLORS_MODE_SPECIFIC, save);
}
if(std::find(enabled_modes.begin(), enabled_modes.end(), QMK_OPENRGB_MODE_TYPING_HEATMAP) != enabled_modes.end())
{
InitializeMode("Typing Heatmap", current_mode, 0, MODE_COLORS_NONE, save);
@ -246,6 +231,21 @@ RGBController_QMKOpenRGBRevE::RGBController_QMKOpenRGBRevE(QMKOpenRGBRevDControl
InitializeMode("Solid Reactive Multi Splash", current_mode, MODE_FLAG_HAS_MODE_SPECIFIC_COLOR | MODE_FLAG_HAS_SPEED, MODE_COLORS_MODE_SPECIFIC, save);
}
if(std::find(enabled_modes.begin(), enabled_modes.end(), QMK_OPENRGB_MODE_PIXEL_RAIN) != enabled_modes.end())
{
InitializeMode("Pixel Rain", current_mode, MODE_FLAG_HAS_SPEED, MODE_COLORS_NONE, save);
}
if(std::find(enabled_modes.begin(), enabled_modes.end(), QMK_OPENRGB_MODE_PIXEL_FLOW) != enabled_modes.end())
{
InitializeMode("Pixel Flow", current_mode, MODE_FLAG_HAS_SPEED, MODE_COLORS_NONE, save);
}
if(std::find(enabled_modes.begin(), enabled_modes.end(), QMK_OPENRGB_MODE_PIXEL_FRACTAL) != enabled_modes.end())
{
InitializeMode("Pixel Fractal", current_mode, MODE_FLAG_HAS_MODE_SPECIFIC_COLOR | MODE_FLAG_HAS_SPEED, MODE_COLORS_MODE_SPECIFIC, save);
}
if(std::find(enabled_modes.begin(), enabled_modes.end(), QMK_OPENRGB_MODE_OPENRGB_DIRECT) != enabled_modes.end())
{
InitializeMode("Direct", current_mode, MODE_FLAG_HAS_PER_LED_COLOR, MODE_COLORS_PER_LED, save);

View file

@ -501,6 +501,7 @@ HEADERS +=
Controllers/QMKOpenRGBController/RGBController_QMKOpenRGBRev9.h \
Controllers/QMKOpenRGBController/RGBController_QMKOpenRGBRevB.h \
Controllers/QMKOpenRGBController/RGBController_QMKOpenRGBRevD.h \
Controllers/QMKOpenRGBController/RGBController_QMKOpenRGBRevE.h \
Controllers/RazerController/RazerController.h \
Controllers/RazerController/RazerKrakenController.h \
Controllers/RazerController/RazerDevices.h \
@ -1032,6 +1033,7 @@ SOURCES +=
Controllers/QMKOpenRGBController/RGBController_QMKOpenRGBRev9.cpp \
Controllers/QMKOpenRGBController/RGBController_QMKOpenRGBRevB.cpp \
Controllers/QMKOpenRGBController/RGBController_QMKOpenRGBRevD.cpp \
Controllers/QMKOpenRGBController/RGBController_QMKOpenRGBRevE.cpp \
Controllers/RazerController/RazerController.cpp \
Controllers/RazerController/RazerKrakenController.cpp \
Controllers/RazerController/RazerControllerDetect.cpp \