Files
archived-g-helper/app/Peripherals/Mouse/Models/TUFM3.cs
IceStormNG 59bfe845c6 Fixed DPI support for TuF M3 Gen II (#2795)
* Support for Strix Carry (P508)

* Fixes polling rate, angle snapping and debounce for Gladius II Origin.

* The Gen2 version of the TuF M3 uses 0-100 for brightness.

* Adds support for ROG Strix Impact III (P518)

* Import/Export feature for mice.

* Suppor for Strix Impact (P303)

* Support for Strix Impact II Electro Punk

* Strix Carry has 50 DPI minimum and increments of 50.

* Respect top-most setting of GHelper

* Fixes to the buttons to be wider to fit longer translations.

* Basic support for the Galdius III EVA02

* Gladius wireless and wired PIDs were switched

* Add support for the chinese variant of the M4 Wireless, the P310

* Apparently there is another Gladius III that is not wireless at all. Renaming the wireless to make it a little less confusing.

* Adds Support for Galdius III (wired) P514

* Support for P504 Glaidus II PKN

* Support for the ROG Keris wired mouse P509

* Fixed support for TUF M3 Gen II
2024-06-30 11:11:53 +02:00

170 lines
3.9 KiB
C#

namespace GHelper.Peripherals.Mouse.Models
{
//P306_Wireless
public class TUFM3 : AsusMouse
{
public TUFM3() : base(0x0B05, 0x1910, "mi_01", false)
{
}
public TUFM3(ushort productId, string path) : base(0x0B05, productId, path, false)
{
}
public override int DPIProfileCount()
{
return 4;
}
public override string GetDisplayName()
{
return "TUF GAMING M3";
}
public override PollingRate[] SupportedPollingrates()
{
return new PollingRate[] {
PollingRate.PR125Hz,
PollingRate.PR250Hz,
PollingRate.PR500Hz,
PollingRate.PR1000Hz
};
}
//Mouse has React mapped to 0x03 instead of 0x04 like other mice
protected override byte IndexForLightingMode(LightingMode lightingMode)
{
if (lightingMode == LightingMode.React)
{
return 0x03;
}
return ((byte)lightingMode);
}
//Mouse has React mapped to 0x03 instead of 0x04 like other mice
protected override LightingMode LightingModeForIndex(byte lightingMode)
{
if (lightingMode == 0x03)
{
return LightingMode.React;
}
return base.LightingModeForIndex(lightingMode);
}
public override int ProfileCount()
{
return 1;
}
public override int MaxDPI()
{
return 7_000;
}
public override bool HasBattery()
{
return false;
}
public override bool HasLiftOffSetting()
{
return false;
}
public override LightingZone[] SupportedLightingZones()
{
return new LightingZone[] { LightingZone.Logo };
}
public override bool HasRGB()
{
return true;
}
public override bool HasAngleSnapping()
{
return true;
}
public override int DPIIncrements()
{
return 100;
}
public override bool CanChangeDPIProfile()
{
return true;
}
public override bool HasDebounceSetting()
{
return true;
}
public override int MaxBrightness()
{
return 4;
}
public override bool IsLightingModeSupported(LightingMode lightingMode)
{
return lightingMode == LightingMode.Static
|| lightingMode == LightingMode.Breathing
|| lightingMode == LightingMode.ColorCycle
|| lightingMode == LightingMode.React;
}
}
public class TUFM3GenII : TUFM3
{
public TUFM3GenII() : base(0x1A9B, "mi_02")
{
}
public override string GetDisplayName()
{
return "TUF GAMING M3 (Gen II)";
}
public override int MaxBrightness()
{
return 100;
}
public override int MaxDPI()
{
return 8_000;
}
public override int MinDPI()
{
return 100;
}
public override int DPIIncrements()
{
return 50;
}
public override bool HasDPIColors()
{
return true;
}
protected override int ParseDPIProfile(byte[] packet)
{
return base.ParseDPIProfile(packet) + 1;
}
protected override byte[] GetChangeDPIProfilePacket(int profile)
{
return new byte[] { reportId, 0x51, 0x31, 0x0A, 0x00, 0x04 };
}
protected override byte[] GetChangeDPIProfilePacket2(int profile)
{
return new byte[] { reportId, 0x51, 0x31, 0x09, 0x00, (byte)(profile - 1) };
}
}
}