summaryrefslogtreecommitdiff
path: root/n/asserv
diff options
context:
space:
mode:
authorschodet2005-02-11 14:36:07 +0000
committerschodet2005-02-11 14:36:07 +0000
commitc1e2d98380a352117a1e361dc09376b2195fd0db (patch)
tree403d7db79050f4b5720181d77dffd478a1b354d1 /n/asserv
parent9cdb2f84d138f4bea199f95d8d35fa95ab577e32 (diff)
Modification du sens de rotation, TODO: le faire param├ętrable.
Diffstat (limited to 'n/asserv')
-rw-r--r--n/asserv/src/pwm.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/n/asserv/src/pwm.c b/n/asserv/src/pwm.c
index a873b33..04b9a57 100644
--- a/n/asserv/src/pwm.c
+++ b/n/asserv/src/pwm.c
@@ -81,12 +81,12 @@ pwm_update (void)
}
else if (pwm_left < 0)
{
- PORTB &= ~_BV (2);
+ PORTB |= _BV (2);
OCR1B = pwm_preproc (-pwm_left);
}
else
{
- PORTB |= _BV (2);
+ PORTB &= ~_BV (2);
OCR1B = pwm_preproc (pwm_left);
}
/* Set right PWM. */
@@ -96,12 +96,12 @@ pwm_update (void)
}
else if (pwm_right < 0)
{
- PORTB |= _BV (3);
+ PORTB &= ~_BV (3);
OCR1C = pwm_preproc (-pwm_right);
}
else
{
- PORTB &= ~_BV (3);
+ PORTB |= _BV (3);
OCR1C = pwm_preproc (pwm_right);
}
}