Skip to content

[FEATURE] add the update byte for dualshock4 output report callback #32

Description

@AhmedAmrNabil

Is your feature request related to a problem? Please describe

from: https://controllers.fandom.com/wiki/Sony_DualShock_4#Output_Reports the output report struct of the ds4 have 1 byte containing 8 flags:
EnableRumbleUpdate : 1;
EnableLedUpdate : 1;
EnableLedBlink : 1;
EnableExtWrite : 1;
EnableVolumeLeftUpdate : 1;
EnableVolumeRightUpdate : 1;
EnableVolumeMicUpdate : 1;
EnableVolumeSpeakerUpdate : 1;

the first 3 bits are needed with the report as currently we have no idea if the game requested change only to the vibration or to the lightbar or both so we need this first byte in the output struct

Describe the solution you'd like

update the output stuct to be:

type OutputState struct {
	UpdateByte uint8 // flags for what to update
	RumbleSmall uint8 // (0-255)
	RumbleLarge uint8 // (0-255)
	LedRed      uint8 // (0-255)
	LedGreen    uint8 // (0-255)
	LedBlue     uint8 // (0-255)
	FlashOn     uint8 // (units of 2.5ms)
	FlashOff    uint8 // (units of 2.5ms)
}

and update the callbacks so the update byte get passed from the usbip to the this struct

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions