Skip to content

Commit 8d6b31e

Browse files
committed
Make DualMotorRumble.cs more consistent based on Gamepad.cs changes.
1 parent 088479d commit 8d6b31e

File tree

1 file changed

+14
-4
lines changed

1 file changed

+14
-4
lines changed

Packages/com.unity.inputsystem/InputSystem/Devices/Haptics/DualMotorRumble.cs

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,13 @@ internal struct DualMotorRumble
3939
|| !Mathf.Approximately(highFrequencyMotorSpeed, 0f);
4040

4141
/// <summary>
42-
/// Reset motor speeds to zero but retain current values for <see cref="lowFrequencyMotorSpeed"/>
43-
/// and <see cref="highFrequencyMotorSpeed"/>.
42+
/// Reset motor speeds to zero.
4443
/// </summary>
44+
/// <remarks>
45+
/// Sets both motor speeds to zero while retaining the current values for <see cref="lowFrequencyMotorSpeed"/>
46+
/// and <see cref="highFrequencyMotorSpeed"/>.
47+
/// It will only send the command if <see cref="isRumbling"/> is true.
48+
/// </remarks>
4549
/// <param name="device">Device to send command to.</param>
4650
/// <exception cref="ArgumentNullException"><paramref name="device"/> is null.</exception>
4751
public void PauseHaptics(InputDevice device)
@@ -60,6 +64,9 @@ public void PauseHaptics(InputDevice device)
6064
/// Resume haptics by setting motor speeds to the current values of <see cref="lowFrequencyMotorSpeed"/>
6165
/// and <see cref="highFrequencyMotorSpeed"/>.
6266
/// </summary>
67+
/// <remarks>
68+
/// It will only set motor speeds if <see cref="isRumbling"/> is true
69+
/// </remarks>
6370
/// <param name="device">Device to send command to.</param>
6471
/// <exception cref="ArgumentNullException"><paramref name="device"/> is null.</exception>
6572
public void ResumeHaptics(InputDevice device)
@@ -74,9 +81,12 @@ public void ResumeHaptics(InputDevice device)
7481
}
7582

7683
/// <summary>
77-
/// Reset haptics by setting both <see cref="lowFrequencyMotorSpeed"/> and <see cref="highFrequencyMotorSpeed"/>
78-
/// to zero.
84+
/// Reset haptics by setting motor speeds to zero.
7985
/// </summary>
86+
/// <remarks>
87+
/// Sets <see cref="lowFrequencyMotorSpeed"/> and <see cref="highFrequencyMotorSpeed"/> to zero.
88+
/// It will only set motor speeds if <see cref="isRumbling"/> is true.
89+
/// </remarks>
8090
/// <param name="device">Device to send command to.</param>
8191
/// <exception cref="ArgumentNullException"><paramref name="device"/> is null.</exception>
8292
public void ResetHaptics(InputDevice device)

0 commit comments

Comments
 (0)