36 switch (data.effectType) {
38 case EffectType::ContinuousResitance:
42 buffer[0x01] = data.Continuous.startPosition;
43 buffer[0x02] = data.Continuous.force;
48 case EffectType::SectionResitance:
52 buffer[0x01] = data.Section.startPosition;
53 buffer[0x02] = data.Section.endPosition;
58 case EffectType::EffectEx:
60 buffer[0x00] = 0x02 | 0x20 | 0x04;
62 buffer[0x01] = 0xFF - data.EffectEx.startPosition;
64 if (data.EffectEx.keepEffect)
67 buffer[0x04] = data.EffectEx.beginForce;
68 buffer[0x05] = data.EffectEx.middleForce;
69 buffer[0x06] = data.EffectEx.endForce;
71 buffer[0x09] = data.EffectEx.frequency / 2;
72 if(buffer[0x09] < 1) buffer[0x09] = 1;
77 case EffectType::Calibrate:
84 case EffectType::NoResitance:
Based on Ludwig Füchsl's DualSense Windows driver https://github.com/Ohjurot/DualSense-Windows.
void processTrigger(uint8_t *buffer)
Apply the trigger data to a PS5 update buffer.