   static unsigned long OutsideTime;
   
   OutsideTime = EndTime - TimeNow;
+  Instrument[Motor].Enabled = digitalRead(EnableMotor);
+  Instrument[Brakes].Enabled = digitalRead(EnableBrake);
+  Instrument[Steering].Enabled = digitalRead(EnableSteer);
 #ifdef TEST_MODE
 //  testSwitches();
 //  testRamp();

#else  // not TEST_MODE
 
  JoystickMotion();
  Instrument[Motor].Enabled = digitalRead(EnableMotor);
  Instrument[Brakes].Enabled = digitalRead(EnableBrake);
  Instrument[Steering].Enabled = digitalRead(EnableSteer);
  StateTransition(Motor);
  StateTransition(Brakes);
  StateTransition(Steering);

}
void RampTest()
{
  static int Position[] ={ 0, 0, 0};
    for (int i = 0; i< 3; i++)
    {
       if( digitalRead(Instrument[i].EnablePin) == HIGH)
       {
           if (abs(Instrument[i].move(Position[i]) - Position[i]) < Instrument[i].CloseEnough)
             Position[i] = Position[i]? 0: 4095;
          Serial.print(i); Serial.print(", ");
          Serial.print(Position[i]); Serial.print(", ");
          
       }
    }
 
}

/*---------------------------------------------------------------------------------------
