I am using Joystick to move PTZ camera in my software using direct Input method. Now problem is, If joystick is not properly calibrated then it will continuously give some fixed value which is more than 0 when joystick is in idle mode. In my case because of
these noise value my software is taking joystick value as input and moving camera automatically even if nobody is using joystick.
I can calibrate the joystick to set its correct value and to suppress the noise value but when machine get restart then it need recalibration again.
Unfortunately device noise is a common nuisance that we often have to accommodate. However,
one option you might consider is to make use of the Predicate parameter available on many of the Arbiter receivers. This predicate allows for a condition(s) to be evaluated prior to invoking a receiver's delegate. If the condition is met, the delegate
is invoked. For example, each time your service receives a state update from the joystick this predicate can compare the joystick's current value to the "fixed" value you mentioned. If these two values differ (see note below), you
set the predicate return value to true, thus invoking the receiver's delegate.
Proposed as answer byealltech1Thursday, December 08, 2016 12:43 PM
Marked as answer byAnya123Thursday, December 08, 2016 12:44 PM