[tuxdroid-svn] r512 - firmware/tuxcore/trunk
Status: Beta
Brought to you by:
ks156
From: jaguarondi <c2m...@c2...> - 2007-09-12 11:07:17
|
Author: jaguarondi Date: 2007-09-12 13:07:13 +0200 (Wed, 12 Sep 2007) New Revision: 512 Modified: firmware/tuxcore/trunk/main.c firmware/tuxcore/trunk/motors.c firmware/tuxcore/trunk/motors.h firmware/tuxcore/trunk/parser.c firmware/tuxcore/trunk/standalone.c Log: * Moved motor_control from the interface to the module as it's not called from an interrupt anymore. * Reorganized the eyes functions, moved a couple of them from the interface to the module, added a couple of comments. * Removed a few unused stuff. Modified: firmware/tuxcore/trunk/main.c =================================================================== --- firmware/tuxcore/trunk/main.c 2007-09-12 09:21:16 UTC (rev 511) +++ firmware/tuxcore/trunk/main.c 2007-09-12 11:07:13 UTC (rev 512) @@ -307,7 +307,7 @@ FifoPut(statusFifo, mouth_move_counter); FifoPut(statusFifo, flippers_move_counter); FifoPut(statusFifo, STATUS_POSITION2_CMD); - FifoPut(statusFifo, spin_stop_delay); + FifoPut(statusFifo, spin_move_counter); FifoPut(statusFifo, gStatus.pos); FifoPut(statusFifo, 0); if (light_f) /* send light measurement */ Modified: firmware/tuxcore/trunk/motors.c =================================================================== --- firmware/tuxcore/trunk/motors.c 2007-09-12 09:21:16 UTC (rev 511) +++ firmware/tuxcore/trunk/motors.c 2007-09-12 11:07:13 UTC (rev 512) @@ -30,6 +30,10 @@ #include "global.h" #include "motors.h" +/** + * \name Braking delays + * These functions access the motor I/O port. + * @{ */ /** Delay during which the motor is inverted when braking the eyes to stop them * in the close position. There's no need to brake the motor when opening the * eyes with this gearbox design. */ @@ -44,6 +48,7 @@ * them either up or down. If we don't brake here, the flippers end up in a * medium position. */ #define FLIPPERS_BRAKING_DLY 4 +/*! @} */ /** Init value of the timer used to reset the flippers in the low position. */ #define FLIP_TIMER_INIT 0xFF /** Minimum difference required between the period the flippers are moving from @@ -53,7 +58,7 @@ /** Number of periods remaining before stopping the flippers. * Normally used when braking, to stop the motor after a short period of * inversion. */ -uint8_t flippers_stop_delay; +static uint8_t flippers_stop_delay; /** Number of movements remaining before stopping the flippers. */ uint8_t flippers_move_counter; /** PWM applied on the flippers motor. */ @@ -66,19 +71,19 @@ /** Number of periods remaining before stopping the eyes. * Normally used when braking, to stop the motor after a short period of * inversion. */ -uint8_t eyes_stop_delay; +static uint8_t eyes_stop_delay; /** Number of movements remaining before stopping the flippers. */ uint8_t eyes_move_counter; /** Number of periods remaining before stopping the mouth. * Normally used when braking, to stop the motor after a short period of * inversion. */ -uint8_t mouth_stop_delay; +static uint8_t mouth_stop_delay; /** Number of movements remaining before stopping the mouth. */ uint8_t mouth_move_counter; /** Number of periods remaining before stopping the rotation. * Normally used when braking, to stop the motor after a short period of * inversion. */ -uint8_t spin_stop_delay; +static uint8_t spin_stop_delay; /** Number of movements remaining before stopping the rotation. */ uint8_t spin_move_counter; /** PWM applied on the spinning motor. */ @@ -91,73 +96,112 @@ /** PWM mask register applied on the port on a regular basis. */ uint8_t portB_PWM_mask; +/** + * \name Low level motor control + * These functions access the motor I/O port. + * @{ */ +/** Stop the eyes motor. */ +#define stop_eyes_motor() {MOT_EYES_PT &= ~(MOT_EYES_MK | MOT_IEYES_MK);} + +/** Start the eyes motor. */ +#define run_eyes_motor() {(MOT_EYES_PT &= ~MOT_IEYES_MK); \ + (MOT_EYES_PT |= MOT_EYES_MK);} +/** Invert the eyes motor. */ +#define invert_eyes_motor() {(MOT_EYES_PT &= ~MOT_EYES_MK); \ + (MOT_EYES_PT |= MOT_IEYES_MK);} +/*! @} */ + +/** + * \name Eyes functions + * @{ */ + /** - \brief Wings position interrupt - \ingroup flippers + \brief Stop the eyes + \ingroup eyes - This interrupt stops the flippers when the desired number of movements have - been executed. In order to stop the flippers quickly and block the motor, we - need to invert the motor for a small duration. + The eyes motor will stop immediately, even if the eyes are not in the open + or close position. Use open_eyes or close_eyes instead if you want to stop + them in a given position. + */ +void stop_eyes(void) +{ + stop_eyes_motor(); +} - When the signal is switching from high to low (switch pushed), the number of - movements is decreased and when null, the flippers motor is switched - backwards and will be stopped by timer0 overflow after the - FLIPPERS_BRAKING_DLY period. So we only count when the switch is pushed but - not when it is released. As the interrupt triggers on a signal change, we - need to suppress the release interrupt. +/** + \brief Blink the eyes + \ingroup eyes + + \param cnt number of movements before the flippers will stop + \note Any mouth command is cancelled + + The eyes will start blinking until 'cnt' movements are executed. A movement + is raising or lowering the eyelids. 'cnt' can be up to 256. If 'cnt' is + null, waving will run indefinitely. */ -ISR(SIG_PIN_CHANGE1) +void blink_eyes(uint8_t cnt) { - /* We only count when the switch is pushed, not released. */ - if (~PSW_WINGS_PIN & PSW_WINGS_MK) - { - /* This test prevents the toggle when the flippers are pushed. The - * flippers motor must be switched on (flippers_PWM <> 0) to toggle the - * position */ - if (flippers_PWM) - gStatus.pos ^= GSTATUS_POS_W0; /* toggle wigs position */ + eyes_move_counter = cnt; + eyes_stop_delay = 0; + run_eyes_motor(); +} - if (flippers_timer) /* if we need to reposition the flippers */ - { - if (flippers_move_counter == 1) - { - if ((flippers_revious_timer) && (flippers_timer < - (flippers_revious_timer - FLIPPERS_RESETTIMER_HYST))) - { - /* flippers are down */ - /* Position reached so init gStatus.pos bit to lower - * position */ - gStatus.pos &= ~GSTATUS_POS_W0; - flippers_timer = 0; - flippers_revious_timer = 0; - } - else /* continue */ - { - /* Unknow position, execute another movement to determine - * it */ - flippers_revious_timer = flippers_timer; - flippers_timer = FLIP_TIMER_INIT; - return; - } - } - else - flippers_timer = FLIP_TIMER_INIT; - } +/** + \brief Open the eyes + \ingroup eyes - if (flippers_move_counter) - { - flippers_move_counter--; - if (!flippers_move_counter) - { - stopWings(); - runWingsBw(); - flippers_stop_delay = FLIPPERS_BRAKING_DLY; - } - } - } + Open the eyes if they are closed. + + The eyes can be in three different states and should have a different + behavior in all states. + - Eyes opened - no movement is required. + - Eyes closed - Just one movement is required to open the eyes. + - indeterminated - two movements are required. + + To prevent that the motor can be activated when the eyes are opened and to + stop the eyes in the open state by sending the open_eyes_cmd when they're + blinking, eyes_move_counter is initalised but the blink_eyes function isn't + call. + If the motor is running, it will execute two movements before stop. If the + motor isn't switched on, nothing happens. + + \note XXX The computer side (API, daemon) must know than eyes_move_counter + can be not null with the motor switched off. + */ +void open_eyes(void) +{ + if ((PSW_EYES_PIN & PSW_EYES_O_MK) && (PSW_EYES_PIN & PSW_EYES_C_MK)) + blink_eyes(2); + + else if (!(PSW_EYES_PIN & PSW_EYES_C_MK)) + blink_eyes(1); + + else + eyes_move_counter = 2; } /** + \brief Close the eyes + \ingroup eyes + + Close the eyes if they are opened. + + When the close_eyes_cmd is received, if the eyes are closed, nothing + happens. But, when the eyes are blinking, this command must stop the eyes + in the closed position. To do this, eyes_move_counter is initialised, but + the blink_eyes function isn't call. So, if the command is received when the + eyes are blinking, two movements are executed before the motor is stopped. + */ +void close_eyes(void) +{ + if (PSW_EYES_PIN & PSW_EYES_C_MK) + blink_eyes(1); + + else + eyes_move_counter = 2; +} + +/** \brief Eyes position interrupt \ingroup eyes @@ -190,12 +234,13 @@ eyes_move_counter--; if (!eyes_move_counter) { - stopEyes(); - runIEyes(); + stop_eyes_motor(); + invert_eyes_motor(); eyes_stop_delay = EYES_BRAKING_DLY; } } } +/*! @} */ /** \brief Mouth position interrupt @@ -239,6 +284,72 @@ } /** + \brief Wings position interrupt + \ingroup flippers + + This interrupt stops the flippers when the desired number of movements have + been executed. In order to stop the flippers quickly and block the motor, we + need to invert the motor for a small duration. + + When the signal is switching from high to low (switch pushed), the number of + movements is decreased and when null, the flippers motor is switched + backwards and will be stopped by timer0 overflow after the + FLIPPERS_BRAKING_DLY period. So we only count when the switch is pushed but + not when it is released. As the interrupt triggers on a signal change, we + need to suppress the release interrupt. + */ +ISR(SIG_PIN_CHANGE1) +{ + /* We only count when the switch is pushed, not released. */ + if (~PSW_WINGS_PIN & PSW_WINGS_MK) + { + /* This test prevents the toggle when the flippers are pushed. The + * flippers motor must be switched on (flippers_PWM <> 0) to toggle the + * position */ + if (flippers_PWM) + gStatus.pos ^= GSTATUS_POS_W0; /* toggle wigs position */ + + if (flippers_timer) /* if we need to reposition the flippers */ + { + if (flippers_move_counter == 1) + { + if ((flippers_revious_timer) && (flippers_timer < + (flippers_revious_timer - FLIPPERS_RESETTIMER_HYST))) + { + /* flippers are down */ + /* Position reached so init gStatus.pos bit to lower + * position */ + gStatus.pos &= ~GSTATUS_POS_W0; + flippers_timer = 0; + flippers_revious_timer = 0; + } + else /* continue */ + { + /* Unknow position, execute another movement to determine + * it */ + flippers_revious_timer = flippers_timer; + flippers_timer = FLIP_TIMER_INIT; + return; + } + } + else + flippers_timer = FLIP_TIMER_INIT; + } + + if (flippers_move_counter) + { + flippers_move_counter--; + if (!flippers_move_counter) + { + stopWings(); + runWingsBw(); + flippers_stop_delay = FLIPPERS_BRAKING_DLY; + } + } + } +} + +/** \brief Spin position interrupt \ingroup spin @@ -250,15 +361,15 @@ */ ISR(SIG_INTERRUPT1) { - if (spin_stop_delay) + if (spin_move_counter) { - spin_stop_delay--; + spin_move_counter--; - if (!spin_stop_delay) + if (!spin_move_counter) { spin_PWM_mask &= ~MOT_SPIN_MK; stopSpinMot(); - spin_move_counter = SPIN_BRAKING_DLY; + spin_stop_delay = SPIN_BRAKING_DLY; if (spin_direction == LEFT) spin_PWM_mask |= MOT_SPIN_R_MK; else @@ -310,12 +421,6 @@ PSW_SPIN_DDR |= PSW_SPIN_MK; } -uint8_t getPosSwitches(void) -{ - // return (PINB & PSW_MK); - return 0; -} - /* * Set motors I/O as output */ @@ -420,79 +525,6 @@ } /** - \brief Blink the eyes - \ingroup eyes - - \param cnt number of movements before the flippers will stop - \note Any mouth command is cancelled - - The eyes will start blinking until 'cnt' movements are executed. A movement - is raising or lowering the eyelids. 'cnt' can be up to 256. If 'cnt' is - null, waving will run indefinitely. - */ -void blinkEyes(uint8_t cnt) -{ - eyes_move_counter = cnt; - eyes_stop_delay = 0; - runEyes(); -} - -/** - \brief Open the eyes - \ingroup eyes - - Open the eyes if they are closed. - - The eyes can be in three different states and should have a different - behavior in all states. - - Eyes opened - no movement is required. - - Eyes closed - Just one movement is required to open the eyes. - - indeterminated - two movements are required. - - To prevent that the motor can be activated when the eyes are opened and to - stop the eyes in the open state by sending the open_eyes_cmd when they're - blinking, eyes_move_counter is initalised but the blinkEyes function isn't - call. - If the motor is running, it will execute two movements before stop. If the - motor isn't switched on, nothing happens. - - \note XXX The computer side (API, daemon) must know than eyes_move_counter - can be not null with the motor switched off. - */ -void openEyes(void) -{ - if ((PSW_EYES_PIN & PSW_EYES_O_MK) && (PSW_EYES_PIN & PSW_EYES_C_MK)) - blinkEyes(2); - - else if (!(PSW_EYES_PIN & PSW_EYES_C_MK)) - blinkEyes(1); - - else - eyes_move_counter = 2; -} - -/** - \brief Close the eyes - \ingroup eyes - - Close the eyes if they are opened. - - When the close_eyes_cmd is received, if the eyes are closed, nothing - happens. But, when the eyes are blinking, this command must stop the eyes - in the closed position. To do this, eyes_move_counter is initialised, but - the blinkEyes function isn't call. So, if the command is received when the - eyes are blinking, two movements are executed before the motor is stopped. - */ -void closeEyes(void) -{ - if (PSW_EYES_PIN & PSW_EYES_C_MK) - blinkEyes(1); - - else - eyes_move_counter = 2; -} - -/** \brief Move the mouth \ingroup mouth \note Any eye command is cancelled @@ -533,12 +565,21 @@ moveMouth(1); } +/** + \brief Stop the spinning motor + \ingroup primitives + */ void stopSpin(void) { spin_PWM_mask &= ~MOT_SPIN_MK; stopSpinMot(); } +/** + \brief Spin left for the \c angle amount + \param angle Angle to turn, in 90° unit + \ingroup spin + */ void spinLeft(uint8_t angle, uint8_t pwm) { /* Check if direction is changing and if pos. switch isn't push. Then, @@ -548,23 +589,117 @@ angle += 1; } spin_direction = LEFT; - spin_stop_delay = angle; + spin_move_counter = angle; spin_PWM = pwm; spin_PWM_mask &= ~MOT_SPIN_R_MK; spin_PWM_mask |= MOT_SPIN_L_MK; } +/** + \brief Spin right for the \c angle amount + \param angle Angle to turn, in 90° unit + \ingroup spin + */ void spinRight(uint8_t angle, uint8_t pwm) { - /* Check if direction is changing and if pos. switch isn't push. Then, - * increment angle value to prevent too short rotation */ + /* If the rotation direction is changing and we are not stopped exactly on + * the switch (position switch not pressed), we need to increment the angle + * value to prevent counting the first switch detection that will happen as + * soon as the rotation starts. */ if (spin_direction == LEFT && (PSW_SPIN_PIN & PSW_SPIN_MK)) - { - angle += 1; - } + angle++; spin_direction = RIGHT; - spin_stop_delay = angle; + spin_move_counter = angle; spin_PWM = pwm; spin_PWM_mask &= ~MOT_SPIN_L_MK; spin_PWM_mask |= MOT_SPIN_R_MK; } + + +/** + \brief Control the PWM of the spinning & flippers and all motors braking. + \fn motor_control + \ingroup movements + + This function should be called from a timer interrupt that will fix the PWM + resolution. + The PWM period will be PWM_PERIOD times * the timer period. + The braking time is dependant on the timer period too. + */ +/** Number of timer periods that constitutes the PWM period. This is also the + * number of PWM values you can get. */ +#define PWM_PERIOD 5 +void motor_control(void) +{ + static uint8_t pwm_tim; + /* Flippers PWM + * Pulse is stopped here */ + if (pwm_tim == flippers_PWM) + MOT_WINGS_FW_PT &= ~MOT_WINGS_FW_MK; + + /* Spin PWM + * Pulse is stopped here */ + if (pwm_tim == spin_PWM) + MOT_SPIN_PT &= ~MOT_SPIN_MK; + + /* PWM motor management + * Pulse is set here when pwm_tim is at maximum and is + * reset when pwm_tim equals the PWM value set by the user + */ + if (pwm_tim++ == PWM_PERIOD) + { + pwm_tim = 0; + PORTB |= portB_PWM_mask; /* spin and flippers */ + } + + /* Flippers timer to stop the flippers in any position */ + if (flippers_timer) + { + flippers_timer--; + if (!flippers_timer) + { + stopWings(); + } + } + + /* Flippers braking (motor reversed) delay */ + if (flippers_stop_delay) + { + flippers_stop_delay--; + if (!flippers_stop_delay) + { + stopWings(); + flippers_PWM = 0; + } + } + + /* eyes braking (motor reversed) delay */ + if (eyes_stop_delay) + { + eyes_stop_delay--; + if (!eyes_stop_delay) + { + stop_eyes_motor(); + } + } + + /* mouth braking (motor reversed) delay */ + if (mouth_stop_delay) + { + mouth_stop_delay--; + if (!mouth_stop_delay) + { + stopMouth(); + } + } + + /* spin braking (motor reversed) delay */ + if (spin_stop_delay) + { + spin_stop_delay--; + if (!spin_stop_delay) + { + stopSpinMot(); + } + } +} Modified: firmware/tuxcore/trunk/motors.h =================================================================== --- firmware/tuxcore/trunk/motors.h 2007-09-12 09:21:16 UTC (rev 511) +++ firmware/tuxcore/trunk/motors.h 2007-09-12 11:07:13 UTC (rev 512) @@ -68,11 +68,10 @@ { LEFT, RIGHT }; /* counters to stop eye/mouth and flippers at timer int */ -extern uint8_t flippers_stop_delay, flippers_move_counter, flippers_PWM; -extern uint8_t flippers_timer, flippers_revious_timer; -extern uint8_t eyes_stop_delay, eyes_move_counter; -extern uint8_t mouth_stop_delay, mouth_move_counter, mouth_pos; -extern uint8_t spin_stop_delay, spin_move_counter, spin_PWM; +extern uint8_t flippers_move_counter, flippers_PWM; +extern uint8_t eyes_move_counter; +extern uint8_t mouth_move_counter, mouth_pos; +extern uint8_t spin_move_counter, spin_PWM; /* pwm mask registers */ extern uint8_t portB_PWM_mask; @@ -85,82 +84,29 @@ */ void initPosSwitches(void); void closePosSwitches(void); -uint8_t getPosSwitches(void); /* * Basic movements */ - -/** - \brief Spin left for the \c angle amount - \param angle Angle to turn, in 90 unit - \ingroup spin - */ -void spinLeft(uint8_t angle, uint8_t pwm); - -/** - \brief Spin right for the \c angle amount - \param angle Angle to turn, in 90 unit - \ingroup spin - */ -void spinRight(uint8_t angle, uint8_t pwm); - -void waveWings(uint8_t cnt, uint8_t pwm); -void lowerWings(void); -void raiseWings(void); -void resetWings(void); -void stopEyes(void); -void blinkEyes(uint8_t cnt); -void closeEyes(void); -void openEyes(void); +extern void stop_eyes(void); +extern void blink_eyes(uint8_t cnt); +extern void close_eyes(void); +extern void open_eyes(void); void moveMouth(uint8_t cnt); void openMouth(void); void closeMouth(void); - -/** - \brief Resets Tux's absolute angle reference - \ingroup primitives - */ -void resetSpinOri(void); - -/** - \brief Resets Tux's absolute turn reference - \ingroup primitives - - Compared to \c resetSpinOri(), this function only resets the turn count - reference, not the angle. See gStatus.ori - */ -void resetSpinTurns(void); - -/** - \brief Stop the spinning motor - \ingroup primitives - */ +void resetWings(void); +void waveWings(uint8_t cnt, uint8_t pwm); +void lowerWings(void); +void raiseWings(void); void stopSpin(void); +void spinLeft(uint8_t angle, uint8_t pwm); +void spinRight(uint8_t angle, uint8_t pwm); /* * Macro and inline functions definition */ -/** - \brief Stop the eyes motor - \ingroup eyes - */ -#define stopEyes() (MOT_EYES_PT &= ~(MOT_EYES_MK | MOT_IEYES_MK)) - -/** - \brief Start the eyes motor - \ingroup primitives - */ -#define runEyes() {(MOT_EYES_PT &= ~MOT_IEYES_MK); \ - (MOT_EYES_PT |= MOT_EYES_MK);} -#define runIEyes() {(MOT_EYES_PT &= ~MOT_EYES_MK); \ - (MOT_EYES_PT |= MOT_IEYES_MK);} - -/** - \brief Stop the mouth motor - \ingroup mouth - */ #define stopMouth() (MOT_MOUTH_PT &= ~(MOT_MOUTH_MK | MOT_IMOUTH_MK)) /** @@ -219,89 +165,6 @@ #define runSpinRight() (MOT_SPIN_L_PT &= ~MOT_SPIN_L_MK); \ (MOT_SPIN_R_PT |= MOT_SPIN_R_MK) -/** - \brief Control the PWM of the spinning & flippers and motor braking. - \ingroup primitives - * XXX Change group name - * This function should be called from a timer interrupt that will fix the PWM - * resolution. - * The PWM period will be PWM_PERIOD times * the timer period. - * The braking time is dependant on the timer period too. - */ -#define PWM_PERIOD 5 -uint8_t static pwm_tim; +extern void motor_control(void); -static inline void motor_control(void) __attribute__ ((always_inline)); -void motor_control(void) -{ - /* Flippers PWM - * Pulse is stopped here */ - if (pwm_tim == flippers_PWM) - MOT_WINGS_FW_PT &= ~MOT_WINGS_FW_MK; - - /* Spin PWM - * Pulse is stopped here */ - if (pwm_tim == spin_PWM) - MOT_SPIN_PT &= ~MOT_SPIN_MK; - - /* PWM motor management - * Pulse is set here when pwm_tim is at maximum and is - * reset when pwm_tim equals the PWM value set by the user - */ - if (pwm_tim++ == PWM_PERIOD) - { - pwm_tim = 0; - PORTB |= portB_PWM_mask; /* spin and flippers */ - } - /* Flippers timer to stop the flippers in any position */ - if (flippers_timer) - { - flippers_timer--; - if (!flippers_timer) - { - stopWings(); - } - } - - /* Flippers braking (motor reversed) delay */ - if (flippers_stop_delay) - { - flippers_stop_delay--; - if (!flippers_stop_delay) - { - stopWings(); - flippers_PWM = 0; - } - } - - /* eyes braking (motor reversed) delay */ - if (eyes_stop_delay) - { - eyes_stop_delay--; - if (!eyes_stop_delay) - { - stopEyes(); - } - } - - /* mouth braking (motor reversed) delay */ - if (mouth_stop_delay) - { - mouth_stop_delay--; - if (!mouth_stop_delay) - { - stopMouth(); - } - } - - /* spin braking (motor reversed) delay */ - if (spin_move_counter) - { - spin_move_counter--; - if (!spin_move_counter) - { - stopSpinMot(); - } - } -} #endif /* _MOTORS_H_ */ Modified: firmware/tuxcore/trunk/parser.c =================================================================== --- firmware/tuxcore/trunk/parser.c 2007-09-12 09:21:16 UTC (rev 511) +++ firmware/tuxcore/trunk/parser.c 2007-09-12 11:07:13 UTC (rev 512) @@ -70,19 +70,19 @@ /* Moves */ else if (command[0] == BLINK_EYES_CMD) { - blinkEyes(command[1]); + blink_eyes(command[1]); } else if (command[0] == STOP_EYES_CMD) { - stopEyes(); + stop_eyes(); } else if (command[0] == OPEN_EYES_CMD) { - openEyes(); + open_eyes(); } else if (command[0] == CLOSE_EYES_CMD) { - closeEyes(); + close_eyes(); } else if (command[0] == MOVE_MOUTH_CMD) { Modified: firmware/tuxcore/trunk/standalone.c =================================================================== --- firmware/tuxcore/trunk/standalone.c 2007-09-12 09:21:16 UTC (rev 511) +++ firmware/tuxcore/trunk/standalone.c 2007-09-12 11:07:13 UTC (rev 512) @@ -209,7 +209,7 @@ if ((gStatus.sw & GSTATUS_POWERPLUGSW_MK)) { stopSpin(); /* flush the spinning commands */ - spin_stop_delay = 0; + spin_move_counter = 0; } if (remote_mode) @@ -279,7 +279,7 @@ mov_nbr = ir_command; break; case K_UP: - blinkEyes(mov_nbr); + blink_eyes(mov_nbr); break; case K_OK: moveMouth(mov_nbr); |