Skip to content

[Feature] Add impulse vibration support #1

@Nemirtingas

Description

@Nemirtingas

https://github.com/DJm00n/ControllersInfo/blob/master/xboxone/xboxone_model_1708_bluetooth_hid_report_descriptor.txt

//--------------------------------------------------------------------------------
// Physical Interface Device Page outputReport 03 (Device <-- Host)
//--------------------------------------------------------------------------------

typedef struct
{
  uint8_t  reportId;                                 // Report ID = 0x03 (3)
                                                     // Collection: CA:GamePad CL:SetEffectReport
  uint8_t  PID_GamePadSetEffectReportDcEnableActuators : 4; // Usage 0x000F0097: DC Enable Actuators, Value = 0 to 1
  uint8_t  : 4;                                      // Pad
  uint8_t  PID_GamePadSetEffectReportMagnitude[4];   // Usage 0x000F0070: Magnitude, Value = 0 to 100
  uint8_t  PID_GamePadSetEffectReportDuration;       // Usage 0x000F0050: Duration, Value = 0 to 255, Physical = Value in 10⁻² s units
  uint8_t  PID_GamePadSetEffectReportStartDelay;     // Usage 0x000F00A7: Start Delay, Value = 0 to 255, Physical = Value in 10⁻² s units
  uint8_t  PID_GamePadSetEffectReportLoopCount;      // Usage 0x000F007C: Loop Count, Value = 0 to 255
} outputReport03_t;
        uint8_t buf[9]{};
        buf[0] = 0x03;
        buf[1] = 0x0F;
        buf[2] = 0; // Left trigger impulse
        buf[3] = 0; // Right trigger impulse
        buf[4] = 0; // Left rumble
        buf[5] = 0; // Right rumble
        // "Pulse"
        buf[6] = 0; // On time
        buf[7] = 0; // Off time 
        buf[8] = 0; // Number of repeats
        WriteFile(hDevice, buf, 9, lpBytesReturned, lpOverlapped);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions