From 00263f03400236d09a6dcd821243cd67173eb1a8 Mon Sep 17 00:00:00 2001 From: Jérémy Dufour Date: Sun, 20 Apr 2008 16:03:23 +0200 Subject: * digital/io/src - servo module now manages 8 servos. --- digital/io/src/servo.avr.c | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) (limited to 'digital/io/src/servo.avr.c') diff --git a/digital/io/src/servo.avr.c b/digital/io/src/servo.avr.c index 39886bc5..96e4c2c0 100644 --- a/digital/io/src/servo.avr.c +++ b/digital/io/src/servo.avr.c @@ -139,16 +139,8 @@ SIGNAL (SIG_OVERFLOW2) static uint16_t servo_high_time_cycle = servo_tic_cyle_; /* State machine actions */ - switch (servo_updating_id_) + if (servo_updating_id_ >= 0) { - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: /* Servos motor high state mode */ /* Set to low state the previous servo motor pin if needed (not for @@ -168,9 +160,9 @@ SIGNAL (SIG_OVERFLOW2) * we are at the last one) */ if (++servo_updating_id_ == SERVO_NUMBER) servo_updating_id_ = -1; - break; - - case -1: + } + else + { /* Sleeping time mode */ /* Is it the first we are in this mode? */ @@ -199,6 +191,5 @@ SIGNAL (SIG_OVERFLOW2) servo_high_time_cycle = servo_tic_cyle_; } } - break; } } -- cgit v1.2.3