From c1e2d98380a352117a1e361dc09376b2195fd0db Mon Sep 17 00:00:00 2001 From: schodet Date: Fri, 11 Feb 2005 14:36:07 +0000 Subject: Modification du sens de rotation, TODO: le faire paramétrable. --- n/asserv/src/pwm.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'n/asserv/src') 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); } } -- cgit v1.2.3