mirror of
https://github.com/YikeStone/ros_arduino_bridge.git
synced 2025-08-04 11:44:08 +05:30
Fixed some indentation
This commit is contained in:
parent
f37836d4e0
commit
5f0125da8b
@ -246,18 +246,18 @@ void setup() {
|
||||
DDRC &= ~(1<<RIGHT_ENC_PIN_A);
|
||||
DDRC &= ~(1<<RIGHT_ENC_PIN_B);
|
||||
|
||||
//enable pull up resistors
|
||||
// Enable pull up resistors
|
||||
PORTD |= (1<<LEFT_ENC_PIN_A);
|
||||
PORTD |= (1<<LEFT_ENC_PIN_B);
|
||||
PORTC |= (1<<RIGHT_ENC_PIN_A);
|
||||
PORTC |= (1<<RIGHT_ENC_PIN_B);
|
||||
|
||||
// tell pin change mask to listen to left encoder pins
|
||||
// Tell pin change mask to listen to left encoder pins
|
||||
PCMSK2 |= (1 << LEFT_ENC_PIN_A)|(1 << LEFT_ENC_PIN_B);
|
||||
// tell pin change mask to listen to right encoder pins
|
||||
// Tell pin change mask to listen to right encoder pins
|
||||
PCMSK1 |= (1 << RIGHT_ENC_PIN_A)|(1 << RIGHT_ENC_PIN_B);
|
||||
|
||||
// enable PCINT1 and PCINT2 interrupt in the general interrupt mask
|
||||
// Enable PCINT1 and PCINT2 interrupt in the general interrupt mask
|
||||
PCICR |= (1 << PCIE1) | (1 << PCIE2);
|
||||
#endif
|
||||
initMotorController();
|
||||
@ -329,7 +329,7 @@ void loop() {
|
||||
}
|
||||
|
||||
// Check to see if we have exceeded the auto-stop interval
|
||||
if ((millis() - lastMotorCommand) > AUTO_STOP_INTERVAL) {;
|
||||
if ((millis() - lastMotorCommand) > AUTO_STOP_INTERVAL) {
|
||||
setMotorSpeeds(0, 0);
|
||||
moving = 0;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user