How to supress noise value from actual joystick value RRS feed

  • Question

  • Hi

    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.

    Is there any way that I can suppress noise values, and can get values when some one move joystick actually so i can stop automatic movement of cameras.

    Vipul Mistry Sr. Embedded Engineer www.eInfochips.com

    Monday, November 11, 2013 7:16 PM


  • Hi Vipul,

    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.

    NOTE:  For a bit more granularity, as well as a common control theory practice stemming from the days of analog devices, your predicate's evaluation could check if the joystick's current value is between a UCL/LCL (Upper Control Limit/Lower Control Limit).  These UCL/LCL's are generally a bit above/below the "fixed" value you mentioned.

    Where is this wonderful Predicate parameter?  It is found in the arbiter receiver overloads.  For example:

        #region PREDICATE
        delegate(UpdateJoystick notice)
            return (<your condition here>);

    Hope that helps a bit.

    Dennis M. Knippel

    Tuesday, November 12, 2013 3:34 PM