mirror of
https://gitlab.freedesktop.org/monado/monado.git
synced 2025-01-01 12:46:12 +00:00
d/vive: Use defines for minimum haptic frequency and unspecified haptic frequency
This commit is contained in:
parent
1f021a6eda
commit
270a4143c7
|
@ -431,8 +431,7 @@ vive_controller_haptic_pulse(struct vive_controller_device *d,
|
|||
union xrt_output_value *value)
|
||||
{
|
||||
float duration_seconds;
|
||||
//! @todo: proper min duration value
|
||||
if (value->vibration.duration == -1) {
|
||||
if (value->vibration.duration == XRT_MIN_HAPTIC_DURATION) {
|
||||
VIVE_TRACE(d, "Haptic pulse duration: using %f minimum",
|
||||
MIN_HAPTIC_DURATION);
|
||||
duration_seconds = 0.1;
|
||||
|
@ -445,8 +444,7 @@ vive_controller_haptic_pulse(struct vive_controller_device *d,
|
|||
duration_seconds);
|
||||
float frequency = value->vibration.frequency;
|
||||
|
||||
//! @todo: proper unspecified value
|
||||
if (frequency == 0) {
|
||||
if (frequency == XRT_FREQUENCY_UNSPECIFIED) {
|
||||
VIVE_TRACE(
|
||||
d, "Haptic pulse frequency unspecified, setting to %fHz",
|
||||
DEFAULT_HAPTIC_FREQ);
|
||||
|
|
Loading…
Reference in a new issue