Changed default direction for MOTORB
Due to hardware design of MM board MOTORA and MOTORB had opposite directions. Fixed by switching settings for MOTORB in MMotor::direction(DIRECTION) function
This commit is contained in:
parent
c983a92107
commit
8bd5f2b35c
@ -102,8 +102,8 @@ void MMotor::direction(DIRECTION d)
|
||||
_d = d;
|
||||
if(_m == MOTORA && _d == FORWARD) PORTD |= (1 << PD7);
|
||||
else if(_m == MOTORA && _d == BACKWARD) PORTD &= ~(1 << PD7);
|
||||
else if(_m == MOTORB && _d == BACKWARD) PORTB |= (1 << PB0);
|
||||
else if(_m == MOTORB && _d == FORWARD) PORTB &= ~(1 << PB0);
|
||||
else if(_m == MOTORB && _d == BACKWARD) PORTB &= ~(1 << PB0); // The direction of FORWARD and BACKWARD is
|
||||
else if(_m == MOTORB && _d == FORWARD) PORTB |= (1 << PB0); // switched for MOTORB due to hardware design
|
||||
}
|
||||
|
||||
void MMotor::stop()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user