21#include <SDL2/SDL_gamecontroller.h>
37 int start = 0,
int end = 0,
int frequency = 0);
Represents a single haptic trigger effect on a PS5 controller. See https://gist.github....
Definition haptictriggerps5.h:34
static QString to_string(HapticTriggerModePs5 mode)
Returns string representation of a HapticTriggerModePs5 object.
Definition haptictriggerps5.cpp:361
HapticTriggerModePs5 m_mode
Definition haptictriggerps5.h:74
HapticTriggerModePs5 get_mode() const
Returns the current haptic feedback effect mode.
Definition haptictriggerps5.cpp:243
int m_strength
Definition haptictriggerps5.h:75
static void send(SDL_GameController *controller, const HapticTriggerPs5 &left, const HapticTriggerPs5 &right)
Creates an low level message from two HapticTriggerPs5 objects and send them to the controller.
Definition haptictriggerps5.cpp:287
bool set_effect(int strength, int start, int end, int frequency=0)
Changes the haptic feedback effect.
Definition haptictriggerps5.cpp:265
int m_end
Definition haptictriggerps5.h:77
int m_start
Definition haptictriggerps5.h:76
@ EFFECT_MODE_RIGID
Definition haptictriggerps5.h:70
@ EFFECT_MODE_NONE
Definition haptictriggerps5.h:68
@ EFFECT_MODE_CLICK
Definition haptictriggerps5.h:69
@ EFFECT_MODE_VIBRATION
Definition haptictriggerps5.h:71
static HapticTriggerModePs5 from_string(const QString &mode)
Converts a HapticTriggerModePs5 from string representation.
Definition haptictriggerps5.cpp:336
bool set_effect_mode(HapticTriggerModePs5 mode)
Changes the haptic feedback mode to the given type.
Definition haptictriggerps5.cpp:250
int m_frequency
Definition haptictriggerps5.h:78
@ EFFECT_LEFT_EN
Definition haptictriggerps5.h:50
@ MICROPHONE_LIGHT_EN
Definition haptictriggerps5.h:54
@ LEGACY_RUMBLE_LEFT_EN
Definition haptictriggerps5.h:52
@ MICROPHONE_LIGHT_PULSE
Definition haptictriggerps5.h:58
@ MICROPHONE_LIGHT_SOLID
Definition haptictriggerps5.h:57
@ LEGACY_RUMBLE_RIGHT_EN
Definition haptictriggerps5.h:53
@ EFFECT_RIGHT_EN
Definition haptictriggerps5.h:51
@ MICROPHONE_LIGHT_OFF
Definition haptictriggerps5.h:56
void to_message(TriggerEffectMsgPs5 &effect) const
Low level function to write one HapticTriggerPs5 effect into a PS5 controller message.
Definition haptictriggerps5.cpp:306
Definition joydpadxml.h:27
HapticTriggerModePs5
Enum of the supported haptic trigger effect for a PS5 controller.
Definition haptictriggermodeps5.h:23
@ HAPTIC_TRIGGER_NONE
Definition haptictriggermodeps5.h:24
Effect message for a single trigger.
Definition haptictriggerps5.cpp:190