Represents a single haptic trigger effect on a PS5 controller. See https://gist.github.com/Nielk1/6d54cc2c00d2201ccb8c2720ad7538db and https://github.com/Electronicks/JoyShockMapper/blob/master/JoyShockMapper/src/SDL2Wrapper.cpp.
More...
#include <haptictriggerps5.h>
|
enum | {
EFFECT_LEFT_EN = 0x04,
EFFECT_RIGHT_EN = 0x08,
LEGACY_RUMBLE_LEFT_EN = 0x0001,
LEGACY_RUMBLE_RIGHT_EN = 0x0002,
MICROPHONE_LIGHT_EN = 0x0100,
MICROPHONE_LIGHT_OFF = 0x00,
MICROPHONE_LIGHT_SOLID = 0x01,
MICROPHONE_LIGHT_PULSE = 0x02
} |
|
enum | { EFFECT_MODE_NONE = 0x05,
EFFECT_MODE_CLICK = 0x25,
EFFECT_MODE_RIGID = 0x21,
EFFECT_MODE_VIBRATION = 0x26
} |
| Enum of the supported low level haptic trigger effect modes of the PS5 controller. See https://gist.github.com/Nielk1/6d54cc2c00d2201ccb8c2720ad7538db. More...
|
|
◆ anonymous enum
Enumerator |
---|
EFFECT_LEFT_EN | |
EFFECT_RIGHT_EN | |
LEGACY_RUMBLE_LEFT_EN | |
LEGACY_RUMBLE_RIGHT_EN | |
MICROPHONE_LIGHT_EN | |
MICROPHONE_LIGHT_OFF | |
MICROPHONE_LIGHT_SOLID | |
MICROPHONE_LIGHT_PULSE | |
◆ anonymous enum
◆ HapticTriggerPs5()
◆ from_string()
Converts a HapticTriggerModePs5 from string representation.
◆ get_mode()
Returns the current haptic feedback effect mode.
◆ send()
Creates an low level message from two HapticTriggerPs5 objects and send them to the controller.
- Parameters
-
[in] | controller | Controller to which the message is send. |
[in] | left | HapticTriggerPs5 effect for the left trigger. |
[in] | right | HapticTriggerPs5 effect for the right trigger. |
◆ set_effect()
bool HapticTriggerPs5::set_effect |
( |
int |
strength, |
|
|
int |
start, |
|
|
int |
end, |
|
|
int |
frequency = 0 |
|
) |
| |
Changes the haptic feedback effect.
- Parameters
-
[in] | strength | Strength of the feedback force between 0 and 255. |
[in] | start | Start point of the effect. Value between 0 and 320. |
[in] | end | End point of the effect. Value between 0 and 320. |
[in] | frequency | Frequency of the effect in Hz. Value between 1 and 255. |
- Returns
- True when the effect was changed, false otherwise.
◆ set_effect_mode()
Changes the haptic feedback mode to the given type.
- Parameters
-
[in] | mode | New haptic feedback mode. |
- Returns
- True when the mode was changed, false otherwise.
◆ to_message()
Low level function to write one HapticTriggerPs5 effect into a PS5 controller message.
- Parameters
-
[in] | effect | Pointer to the triggers effect data position in the effect message. |
◆ to_string()
Returns string representation of a HapticTriggerModePs5 object.
◆ m_end
int HapticTriggerPs5::m_end |
|
private |
◆ m_frequency
int HapticTriggerPs5::m_frequency |
|
private |
◆ m_mode
◆ m_start
int HapticTriggerPs5::m_start |
|
private |
◆ m_strength
int HapticTriggerPs5::m_strength |
|
private |
The documentation for this class was generated from the following files: