[tuxdroid-svn] r1120 - firmware/tuxaudio/trunk
Status: Beta
Brought to you by:
ks156
From: jaguarondi <c2m...@c2...> - 2008-05-06 15:19:19
|
Author: jaguarondi Date: 2008-05-06 17:18:34 +0200 (Tue, 06 May 2008) New Revision: 1120 Modified: firmware/tuxaudio/trunk/parser.c Log: * Minor cleanup. Modified: firmware/tuxaudio/trunk/parser.c =================================================================== --- firmware/tuxaudio/trunk/parser.c 2008-05-06 15:10:03 UTC (rev 1119) +++ firmware/tuxaudio/trunk/parser.c 2008-05-06 15:18:34 UTC (rev 1120) @@ -35,8 +35,6 @@ */ void parse_cmd(uint8_t *cmd) { - static uint8_t pong_received; /* value of the pong received from the behavior */ - static uint8_t pong_missed; /* counting the pong missed on the I2C */ /* * Commands that should be forwarded @@ -45,6 +43,10 @@ /* Ping */ if (cmd[0] == PONG_CMD) { + /* Index of the pong that is supposed to be received from tuxcore */ + static uint8_t pong_received; + /* Counter of the missed pongs */ + static uint8_t pong_missed; if (pong_received-- < cmd[1]) /* new ping, reset */ { pong_received = cmd[1]; @@ -59,13 +61,12 @@ } else if (cmd[0] == SLEEP_CMD) { + /* XXX sleep commented for now */ /* Forwards the cmd to the rf CPU */ - cmd[0] = SLEEP_ACK_CMD; - cmd[1] = 0; - cmd[2] = 0; - cmd[3] = 0; - send_status(cmd); - /* XXX sleep commented for now */ + /*cmd[0] = SLEEP_ACK_CMD;*/ + /*cmd[1] = 0;*/ + /*cmd[2] = 0;*/ + /*cmd[3] = 0;*/ /*pre_sleep_delay = 30; [> handle sleep in its own function <]*/ /*sleep_f = 1;*/ /*statusFlag = 1;*/ @@ -119,6 +120,7 @@ else write_toc = 2; } - cmd = NULL; + /* Drop the command */ + cmd = NULL; } } |