Author: remi
Date: 2008-07-28 11:00:02 +0200 (Mon, 28 Jul 2008)
New Revision: 1399
Modified:
software_suite_v2/middleware/tuxdriver/trunk/src/tux_usb.c
Log:
* updated the behavior when too many frames are empty. Now the driver sent the
"eyes blink" command to unblock the status report from Tuxdroid.
Modified: software_suite_v2/middleware/tuxdriver/trunk/src/tux_usb.c
===================================================================
--- software_suite_v2/middleware/tuxdriver/trunk/src/tux_usb.c 2008-07-28
06:37:57 UTC (rev 1398)
+++ software_suite_v2/middleware/tuxdriver/trunk/src/tux_usb.c 2008-07-28
09:00:02 UTC (rev 1399)
@@ -44,6 +44,7 @@
static char frame_status_request[5] = {1, 1, 0, 0, 0};
static char frame_reset_dongle[5] = {1, 1, 0, 0, 0xFE};
static char frame_reset_rf[5] = {1, 1, 0, 0, 0xFD};
+static char frame_blink_eyes[5] = {0, 0x40, 2, 0, 0};
#ifdef USE_MUTEX
static mutex_t __connected_mutex;
@@ -334,7 +335,7 @@
{
freezed_frame_cnt = 0;
id_frame_last = 999;
- log_error("The USB frame retriving seems to be freezed [%d]",
+ log_error("The USB frame retrieving seems to be freezed [%d]",
TUX_USB_FREEZED_FRAMES_LIMIT);
log_info("The RF connection will be reinitialized");
tux_usb_rf_reset();
@@ -363,8 +364,8 @@
log_error("DONGLE ERROR : Too many consecutive frames without
status [%d], but the RF is online",
TUX_USB_ERROR_LIMIT);
empty_frame_cnt = 0;
- log_info("The RF connection will be reinitialized");
- tux_usb_rf_reset();
+ log_info("Send a command to the eyes.");
+ tux_usb_send_raw(frame_blink_eyes);
}
#else
log_warning("Consecutive frames without status : %d", empty_frame_cnt);
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Tux-droid-svn mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tux-droid-svn