[tuxdroid-svn] r329 - firmware/tuxcore/trunk
Status: Beta
Brought to you by:
ks156
From: jaguarondi <c2m...@c2...> - 2007-05-30 14:01:15
|
Author: jaguarondi Date: 2007-05-30 16:00:23 +0200 (Wed, 30 May 2007) New Revision: 329 Modified: firmware/tuxcore/trunk/standalone.c Log: - BUG: when 2 events are happening at the same time, they are conflicting in the event manager. Modified: firmware/tuxcore/trunk/standalone.c =================================================================== --- firmware/tuxcore/trunk/standalone.c 2007-05-30 12:36:27 UTC (rev 328) +++ firmware/tuxcore/trunk/standalone.c 2007-05-30 14:00:23 UTC (rev 329) @@ -94,70 +94,70 @@ } /* Head button */ - if (cond_flags.head) + else if (cond_flags.head) { cond_flags.head = 0; launchActions((const uint8_t *)&head_e); } /* Left flipper button */ - if (cond_flags.left_flip) + else if (cond_flags.left_flip) { cond_flags.left_flip = 0; launchActions((const uint8_t *)&left_flip_e); } /* Right flipper button */ - if (cond_flags.right_flip) + else if (cond_flags.right_flip) { cond_flags.right_flip = 0; launchActions((const uint8_t *)&right_flip_e); } /* Start charging */ - if (cond_flags.charger_start) + else if (cond_flags.charger_start) { cond_flags.charger_start = 0; launchActions((const uint8_t *)&charger_start_e); } /* Unplug condition */ - if (cond_flags.unplug) + else if (cond_flags.unplug) { cond_flags.unplug = 0; launchActions((const uint8_t *)&unplug_e); } /* Entering sleep mode. */ - if (cond_flags.sleep == COND_PRE_SLEEP) + else if (cond_flags.sleep == COND_PRE_SLEEP) { cond_flags.sleep = COND_SLEEP; launchActions((const uint8_t *)&sleep_enter_e); } /* Exiting sleep mode. */ - if (cond_flags.sleep == COND_POST_SLEEP) + else if (cond_flags.sleep == COND_POST_SLEEP) { launchActions((const uint8_t *)&sleep_exit_e); cond_flags.sleep = COND_NO_SLEEP; } /* RF connection */ - if (cond_flags.rf_conn) + else if (cond_flags.rf_conn) { cond_flags.rf_conn = 0; launchActions((const uint8_t *)&rf_conn_e); } /* RF disconnection */ - if (cond_flags.rf_disconn) + else if (cond_flags.rf_disconn) { cond_flags.rf_disconn = 0; launchActions((const uint8_t *)&rf_disconn_e); } /* Tux greetings */ - if (cond_flags.tux_recog == 0xF0) /* send a greeting */ + else if (cond_flags.tux_recog == 0xF0) /* send a greeting */ { cond_flags.tux_recog++; cond_flags.tux_recog_cnt = 3; /* send reply for few secs */ |