public Result SetMoveSettings(int deviceID, ref move_settings_t moveSettings)
        {
            base.MoveSettings = moveSettings;

            return(API.set_move_settings(deviceID, ref moveSettings) == Result.ok ?
                   base.Result : Result.error);
        }
        /// <summary>
        /// Unsafe. Could physically damage actuators <br/>
        ///Perform a calibration of the actuator specified by deviceID. The actuator is moved to both edges and a middle (reference)
        /// value is set, which will represent the new zero position
        /// </summary>
        /// <param name="deviceID">identifies actuator, of type int</param>
        /// <returns>Result.ok if operation is successful, otherwise either Result.error, Result.value_error, Result.no_device, or Result.not_implemented</returns>
        public List <int> CalibrateMovement(int deviceID)
        {
            // Set move settings
            int minEdge = 0;
            int maxEdge = 0;

            move_settings_t moveSettings = new move_settings_t {
                Accel = 1000, Decel = 1000, Speed = 400
            };

            SetMoveSettings(deviceID, ref moveSettings);

            // Move left until edge and remember position
            MoveContinuouslyLeft(deviceID);
            if (WaitForStopWhile(deviceID, 0) == Result.ok)
            {
                minEdge = GetCurrentPositionSteps(deviceID);
            }

            // Move right until edge and remember position
            MoveContinuouslyRight(deviceID);
            if (WaitForStopWhile(deviceID, 0) == Result.ok)
            {
                maxEdge = GetCurrentPositionSteps(deviceID);
            }

            Int32 zero = (maxEdge + minEdge) / 2;

            // Do maxEdge - minEdge and move to the position (middle)
            MoveToPosition(deviceID, zero, 0);
            if (WaitForStopWhile(deviceID, 0) == Result.ok)
            {
                // Set this position as the new home position
                SetZeroPosition(deviceID);
            }

            List <int> edgeValues = new List <int> {
                minEdge, maxEdge
            };

            return(edgeValues);
        }