Support for MSI board 7E12 added

This commit is contained in:
thombo 2023-10-14 16:41:32 +02:00 committed by Thomas Boos
parent 306b1ddcb3
commit 00c92d74a7
4 changed files with 40 additions and 3 deletions

View file

@ -287,6 +287,7 @@ static const mystic_light_185_config board_configs[] =
{ 0x7E01, 0, 0, 0, 1, &zones_set11, MSIMysticLight185Controller::DIRECT_MODE_PER_LED }, // MAG B760M MORTAR MAX
{ 0x7E06, 0, 0, 0, 2, &zones_set11, MSIMysticLight185Controller::DIRECT_MODE_PER_LED }, // PRO Z790-P WIFI DDR4
{ 0x7E07, 0, 0, 0, 2, &zones_set10, MSIMysticLight185Controller::DIRECT_MODE_PER_LED }, // PRO Z790-A WIFI DDR4
{ 0x7E12, 0, 0, 0, 2, &zones_set13, MSIMysticLight185Controller::DIRECT_MODE_PER_LED }, // MAG X670E TOMAHAWK WIFI
};
@ -320,6 +321,19 @@ MSIMysticLight185Controller::MSIMysticLight185Controller
ReadSettings();
}
if(pid == MSI_USB_PID_COMMON)
{
std::string pidStr(chip_id.substr(0, 4));
pid = std::stoi(pidStr, nullptr, 16);
}
mixed_mode_support = false;
if(pid >= 0x7D03)
{
mixed_mode_support = true;
}
/*---------------------------------------------*\
| Initialize save flag and some static settings |
\*---------------------------------------------*/
@ -784,7 +798,14 @@ ZoneData *MSIMysticLight185Controller::GetZoneData
case MSI_ZONE_J_RGB_1:
return &data_packet.j_rgb_1;
case MSI_ZONE_J_RGB_2:
return &data_packet.j_rgb_2;
if(mixed_mode_support)
{
return &data_packet.on_board_led_6;
}
else
{
return &data_packet.j_rgb_2;
}
case MSI_ZONE_J_RAINBOW_1:
return &data_packet.j_rainbow_1;
case MSI_ZONE_J_RAINBOW_2:
@ -808,7 +829,14 @@ ZoneData *MSIMysticLight185Controller::GetZoneData
case MSI_ZONE_ON_BOARD_LED_5:
return &data_packet.on_board_led_5;
case MSI_ZONE_ON_BOARD_LED_6:
return &data_packet.on_board_led_6;
if(mixed_mode_support)
{
return &data_packet.j_corsair_outerll120;
}
else
{
return &data_packet.on_board_led_6;
}
case MSI_ZONE_ON_BOARD_LED_7:
return &data_packet.on_board_led_7;
case MSI_ZONE_ON_BOARD_LED_8:

View file

@ -142,6 +142,7 @@ private:
bool no_jrainbow1;
bool no_jrainbow2;
bool no_jcorsair;
bool mixed_mode_support;
int numof_onboard_leds;
int numof_pipe1_leds;
int numof_pipe2_leds;

View file

@ -238,3 +238,6 @@ struct FeaturePacket_PerLED_185
unsigned char hdr3 = 0x00; // header byte 3
Color leds[NUMOF_PER_LED_MODE_LEDS];
};
#define MSI_USB_PID_COMMON 0x0076 // Common PID for a certain set of 185-byte boards

View file

@ -11,7 +11,9 @@
#include "LogManager.h"
#define MSI_USB_VID 0x1462
#define MSI_USB_VID 0x1462
#define MSI_USB_VID_COMMON 0x0DB0
/*---------------------------------------------------------------------------------*\
| WARNING! |
@ -174,6 +176,9 @@ REGISTER_HID_DETECTOR_PU("MSI Mystic Light MS_7E01", DetectMSIMysticLightCont
REGISTER_HID_DETECTOR_PU("MSI Mystic Light MS_7E06", DetectMSIMysticLightControllers, MSI_USB_VID, 0x7E06, 0x0001, 0x00);
REGISTER_HID_DETECTOR_PU("MSI Mystic Light MS_7E07", DetectMSIMysticLightControllers, MSI_USB_VID, 0x7E07, 0x0001, 0x00);
REGISTER_HID_DETECTOR_PU("MSI Mystic Light MS_B926", DetectMSIMysticLightControllers, MSI_USB_VID, 0xB926, 0x0001, 0x00);
// Detector for set of common boards
REGISTER_HID_DETECTOR_PU("MSI Mystic Light Common", DetectMSIMysticLightControllers, MSI_USB_VID_COMMON, MSI_USB_PID_COMMON, 0x0001, 0x00);
#ifdef ENABLE_UNTESTED_MYSTIC_LIGHT
REGISTER_HID_DETECTOR_PU("MSI Mystic Light MS_3EA4", DetectMSIMysticLightControllers, MSI_USB_VID, 0x3EA4, 0x0001, 0x00);