Exemple #1
0
 public void addEotDatum(int nSteps) {
   m_eotCount += nSteps;
   Messages.postDebug("AllTuneAlgorithm", "Motor " + m_gmi + " EOT count=" + m_eotCount);
   if (Math.abs(m_eotCount) > 5) {
     setEot(m_eotCount);
   }
 }
Exemple #2
0
 /**
  * Update the motor position, based on increment from last position. Also updates the backlash
  * tracking.
  *
  * @param n The number of steps from the previous position.
  */
 public void incrementPosition(int n) {
   Messages.postDebug("BacklashTracking", "incrementPosition(" + n + ") called");
   if (n != 0) {
     m_position += n;
     if (!isSameDirection(n)) {
       m_distanceThisDirection = 0; // Reversed direction
     }
     m_distanceThisDirection += Math.abs(n);
     if (n != 0) {
       m_lastStep = n;
     }
   }
 }
Exemple #3
0
 /**
  * See how far we have gone in which direction since last going the other direction.
  *
  * @return The (signed) distance.
  */
 public int getCurrentDistance() {
   return m_distanceThisDirection * (int) Math.signum(m_lastStep);
 }