none
What exception type is thrown during "tilt motor lockout" when changing KinectSensor.ElevationAngle? RRS feed

  • Question

  • For the KinectSensor.ElevationAngle property, the SDK documents some specific operation limits on the tilt mechanism to avoid damage and prolong life.  It goes on to say, "If your application exceeds these limits, the tilt motor may experience a lock period during which attempting to set the elevation angle will result in an error code."  I assume this means that, if the application causes the tilt mechanism to enter a "lock period," an attempt to change the KinectSensor.ElevationAngle property will throw an exception.  If so, what specific exception is thrown in this situation?  I'd like to include code to properly handle this case, but I would prefer to know the type of exception in advance rather than subjecting my tilt motor to stress in an attempt to discover what exception type is thrown.  Thanks.
    Wednesday, August 22, 2012 11:18 PM

Answers

  • InvalidOperationException.  Don't worry about experimenting here - the runtime will prevent too frequent calls without damaging the motor.  What we're advising against is long term frequent use of the motor (e.g. moving it once every two seconds for a long running application). 

    The motor is designed to allow you to adjust to see the floor once per application launch or similar, not for prolonged repeated use.


    -Adam Smith [MSFT]

    • Proposed as answer by Todd Ferkingstad Thursday, August 23, 2012 4:56 AM
    • Marked as answer by kengr Thursday, August 23, 2012 5:27 AM
    Thursday, August 23, 2012 4:43 AM

All replies

  • InvalidOperationException.  Don't worry about experimenting here - the runtime will prevent too frequent calls without damaging the motor.  What we're advising against is long term frequent use of the motor (e.g. moving it once every two seconds for a long running application). 

    The motor is designed to allow you to adjust to see the floor once per application launch or similar, not for prolonged repeated use.


    -Adam Smith [MSFT]

    • Proposed as answer by Todd Ferkingstad Thursday, August 23, 2012 4:56 AM
    • Marked as answer by kengr Thursday, August 23, 2012 5:27 AM
    Thursday, August 23, 2012 4:43 AM
  • Thanks.  This is the info I was looking for.  My own applications will set the tilt just once up front, but I wanted to handle the "lock period" exception properly in case (a) there is a bug in the app that gets me into this situation and (b) if other folks use my DLL in their applications.  Thanks again.
    Thursday, August 23, 2012 3:42 PM