[tuxdroid-svn] r725 - daemon/trunk/libs
Status: Beta
Brought to you by:
ks156
From: jaguarondi <c2m...@c2...> - 2007-11-26 16:15:12
|
Author: jaguarondi Date: 2007-11-26 17:00:27 +0100 (Mon, 26 Nov 2007) New Revision: 725 Modified: daemon/trunk/libs/USBDaemon_command_tux.c daemon/trunk/libs/USBDaemon_status_table.h Log: * Added a command to send all sound flash status at once. * Changed the order of the charger states so that it should stay compatible with the python API. Modified: daemon/trunk/libs/USBDaemon_command_tux.c =================================================================== --- daemon/trunk/libs/USBDaemon_command_tux.c 2007-11-26 15:38:58 UTC (rev 724) +++ daemon/trunk/libs/USBDaemon_command_tux.c 2007-11-26 16:00:27 UTC (rev 725) @@ -663,6 +663,11 @@ case DATA_STATUS_AVAILABLE_RECORD_TIME: result[1] = tux_status.sound_flash.available_record_time; break; + case DATA_STATUS_SOUND_FLASH: + result[1] = tux_status.sound_flash.number_of_sounds; + result[2] = tux_status.sound_flash.flash_usage; + result[3] = tux_status.sound_flash.available_record_time; + break; } } Modified: daemon/trunk/libs/USBDaemon_status_table.h =================================================================== --- daemon/trunk/libs/USBDaemon_status_table.h 2007-11-26 15:38:58 UTC (rev 724) +++ daemon/trunk/libs/USBDaemon_status_table.h 2007-11-26 16:00:27 UTC (rev 725) @@ -184,6 +184,7 @@ #define DATA_STATUS_AUDIO 0x26 #define DATA_STATUS_FLASH_USAGE 0x27 #define DATA_STATUS_AVAILABLE_RECORD_TIME 0x28 +#define DATA_STATUS_SOUND_FLASH 0x29 /* tux connection commands available on the usb dongle */ typedef enum @@ -286,13 +287,13 @@ /** States of the battery charger */ typedef enum charger_status { - CHARGER_UNPLUGGED, /**< unplugged, on batteries */ - CHARGER_CHARGING, /**< fast charge ongoing */ - CHARGER_PLUGGED_NO_POWER, /**< transformer plugged on tux but not in the - wall socket */ - CHARGER_TRICKLE, /**< trickle mode, mainly activated at the end of - charge */ - CHARGER_INHIBITED, /**< the CPU has inhibited the charger */ + CHARGER_CHARGING = 0, /**< fast charge ongoing */ + CHARGER_UNPLUGGED = 1, /**< unplugged, on batteries */ + 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 + charge */ + CHARGER_INHIBITED = 4, /**< the CPU has inhibited the charger */ } charger_status_t; /** States of the battery level */ |