Commit ed070b2a authored by Tim Soderstrom's avatar Tim Soderstrom

Fixed bug where rotary woudln't start (AT85)

Rotary would not start back up if button was pressed while motor
was coasting. Fixed.
parent 98c21858
......@@ -50,7 +50,7 @@
#define MOTOR_Y A3
//#define RUN_SWITCH A1
//#define SPEED_SWITCH 1
#define RUN_BUTTON 1
#define RUN_BUTTON 2
/************
......@@ -101,7 +101,7 @@ void runMotor()
{
// byte rpm = MOTOR_RPM;
//byte rpm = MOTOR_START_PCT;
byte rpm = 100;
byte rpm = MOTOR_START_PCT;
byte directionInterval = DEFAULT_DIRECTION_INTERVAL;
bool runMotor = true;
bool buttonHeld = false;
......@@ -120,7 +120,12 @@ void runMotor()
if(runMotor)
runMotor = false;
else
{
runMotor = true;
motorCoasting = false;
motorCoast = false;
}
}
buttonHeld = true;
}
......@@ -130,7 +135,6 @@ void runMotor()
controlMotor(rpm, directionInterval);
else
controlMotor(0, 0);
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment