[tuxdroid-svn] r741 - daemon/trunk/libs
Status: Beta
Brought to you by:
ks156
From: jaguarondi <c2m...@c2...> - 2007-11-28 08:58:59
|
Author: jaguarondi Date: 2007-11-28 09:58:56 +0100 (Wed, 28 Nov 2007) New Revision: 741 Modified: daemon/trunk/libs/USBDaemon_status_table.c daemon/trunk/libs/USBDaemon_status_table.h Log: * BUG: the IR code sent to the API shouldn't include the toggle bit. * BUG: charger status CHARGING and UNPLUGGED were inverted in the API already so I shouldn't have inverted them here, they also makes more sense as they're now: UNPLUGGED=0 and CHARGING=1. Modified: daemon/trunk/libs/USBDaemon_status_table.c =================================================================== --- daemon/trunk/libs/USBDaemon_status_table.c 2007-11-27 16:25:48 UTC (rev 740) +++ daemon/trunk/libs/USBDaemon_status_table.c 2007-11-28 08:58:56 UTC (rev 741) @@ -137,17 +137,16 @@ { tux_status.buttons.RC5_code = code; /* Remove the toggle for logging. */ - log_debug("IR RC5 code : %.2x", code & 0x3F); + log_debug("IR RC5 code : %.2x - T:%d", code & 0x3F, + code & 0x40 ? 1 : 0); tcp_frame_zero(&tcp_frame); - tcp_frame[0] = SOURCE_TUX; tcp_frame[1] = SS_DEFAULT; tcp_frame[2] = DATA_TP_RSP; tcp_frame[3] = SUBDATA_TP_STATUS; tcp_frame[4] = DATA_STATUS_IR_CODE; - tcp_frame[5] = code; - + tcp_frame[5] = code & 0x3F; tcp_server_send_raw(tcp_frame); } } Modified: daemon/trunk/libs/USBDaemon_status_table.h =================================================================== --- daemon/trunk/libs/USBDaemon_status_table.h 2007-11-27 16:25:48 UTC (rev 740) +++ daemon/trunk/libs/USBDaemon_status_table.h 2007-11-28 08:58:56 UTC (rev 741) @@ -287,8 +287,8 @@ /** States of the battery charger */ typedef enum charger_status { - CHARGER_CHARGING = 0, /**< fast charge ongoing */ - CHARGER_UNPLUGGED = 1, /**< unplugged, on batteries */ + CHARGER_UNPLUGGED = 0, /**< unplugged, on batteries */ + CHARGER_CHARGING = 1, /**< fast charge ongoing */ CHARGER_PLUGGED_NO_POWER = 2, /**< transformer plugged on tux but not in the wall socket */ CHARGER_TRICKLE = 3, /**< trickle mode, mainly activated at the end of |