r1990 | dcl | 2007-05-25 16:42:18 +1000 (Fri, 25 May 2007) | 2 lines
This commit is contained in:
Douglas Clowes
2007-05-25 16:42:18 +10:00
parent 1b4bafbeb4
commit c691f95a8f

View File

@ -8,7 +8,7 @@ subdivided into a driver and the logical object.
There is a problem here. There are some data fields and functions There is a problem here. There are some data fields and functions
which must be present for any motor driver. Then there are fields which must be present for any motor driver. Then there are fields
which are specific just to a special implementation of a mot which are specific just to a special implementation of a mot
driver. There are several ways to deal with this. The way choosen for driver. There are several ways to deal with this. The way chosen for
the motor driver is a kind of overlay. The first few fields of a valid the motor driver is a kind of overlay. The first few fields of a valid
motor driver structure MUST be specified in the same order as given motor driver structure MUST be specified in the same order as given
below. A special motor driver can add additional fields at the end of below. A special motor driver can add additional fields at the end of
@ -122,12 +122,12 @@ creates a simulation motor driver.
\end{description} \end{description}
\subsubsection{The Motor Logical Object} \subsubsection{The Motor Logical Object}
The motor object represents the motor to SICS. One of its responsabilities The motor object represents the motor to SICS. One of its responsibilities
is to drive motor operations and error checking. The scheme is to drive motor operations and error checking. The scheme
implemented is that the motor object tries to bring the motor to its implemented is that the motor object tries to bring the motor to its
position at least three times before a failure is recorded. Also the position at least three times before a failure is recorded. Also the
motor object keeps track of a count of failed operations. If this motor object keeps track of a count of failed operations. If this
count gets to high an interrupt is issued to stop the instrument. This count gets too high an interrupt is issued to stop the instrument. This
was put in after Druechal tried to drive over a slab of concrete for a was put in after Druechal tried to drive over a slab of concrete for a
whole night and subsequently broke a clutch. whole night and subsequently broke a clutch.
Motors are represented by the Motors are represented by the
@ -164,7 +164,7 @@ object.
Much of the action of the motor is hidden in the implementation of the Much of the action of the motor is hidden in the implementation of the
drivable interface to the motor. Additionally the functions as given below drivable interface to the motor. Additionally the functions as given below
are defined. All functions take a pointer to the motor object data structure are defined. All functions take a pointer to the motor object data structure
as a parameter. They retun 0 on success or 1 on failure while not stated as a parameter. They return 0 on success or 1 on failure while not stated
otherwise. otherwise.
\begin{description} \begin{description}
\item[int MotorGetPar(pMotor self, char *name, float *fVal)] retrieves the \item[int MotorGetPar(pMotor self, char *name, float *fVal)] retrieves the