private static void HandleWackyFfb(ForceFeedbackJesus.ForceFeedbackJesus jesus, byte value) { if (value >= 1 && value <= 15) { // Positive float v = (float)value / 2; jesus.TriggerLeftRollEffect(v); } if (value >= 100 && value <= 115) { // Negative float v = (float)(value - 100) / 2; jesus.TriggerRightRollEffect(v); } if (value == 0) { jesus.StopRollEffects(); } }
private static void HandleSr3Ffb(ForceFeedbackJesus.ForceFeedbackJesus jesus, byte value) { if (value == 0) { // Reset effects jesus.StopRollEffects(); } else if (value >= 1 && value <= 0x0F) { // Right float v = value; jesus.TriggerLeftRollEffect(v / 4); } else if (value >= 0x10 && value <= 0x1E) { // Left float v = value - 0x0F; jesus.TriggerRightRollEffect(v / 4); } }