Updated to Arduino 1.0 code.

Fixed reset-bug (Thank you knorke74 !)
This commit is contained in:
Sam Archer 2012-05-04 01:26:37 -07:00
parent 15e2b0c2d7
commit 055062cfef

View File

@ -89,7 +89,10 @@ void loop(){
//Watch for special 100-message to reset the drives
if (Serial.peek() == 100) {
resetAll();
Serial.flush();
//Flush any remaining messages.
while(Serial.available() > 0){
Serial.read();
}
}
else{
currentPeriod[Serial.read()] = (Serial.read() << 8) | Serial.read();