[tuxdroid-svn] r728 - api/python/trunk
Status: Beta
Brought to you by:
ks156
From: jaguarondi <c2m...@c2...> - 2007-11-27 09:08:34
|
Author: jaguarondi Date: 2007-11-27 10:08:35 +0100 (Tue, 27 Nov 2007) New Revision: 728 Modified: api/python/trunk/tuxapi_class.py Log: * Only kept one single status function for the sound flash information. Modified: api/python/trunk/tuxapi_class.py =================================================================== --- api/python/trunk/tuxapi_class.py 2007-11-27 08:29:31 UTC (rev 727) +++ api/python/trunk/tuxapi_class.py 2007-11-27 09:08:35 UTC (rev 728) @@ -1101,7 +1101,7 @@ STATUS_MOUTH_POSITION_COUNTER, STATUS_WINGS_POSITION_COUNTER, STATUS_SPIN_POSITION_COUNTER, STATUS_RIGHT_BLUE_LED, STATUS_RF_CONNECTED, STATUS_IR_CODE, - STATUS_SOUND_COUNT, STATUS_PONG, + STATUS_SOUND_FLASH, STATUS_PONG, STATUS_BATTERY, STATUS_MICRO_ENERGY, ) @@ -3538,6 +3538,7 @@ return self.sounds_count() def sounds_count(self): """ + Deprecated, use tux.status.sound_flash instead. Get the number of sounds stored in the flash memory Return a integer (0..255) @@ -3545,37 +3546,9 @@ Example: >>> var = tux.status.sounds_count() """ - return self.get_one_status(DATAS_STATUS_SOUND_COUNT) + return self.sound_flash()[0] #-------------------------------------------------------------------------- - # Get the flash usage as percentage - #-------------------------------------------------------------------------- - def flash_usage(self): - """ - Get the usage of the sound flash memory as a percentage filled - - Return a integer (0..100) - - Example: - >>> var = tux.status.flash_usage() - """ - return self.get_one_status(DATAS_STATUS_FLASH_USAGE) - - #-------------------------------------------------------------------------- - # Get the sound duration still available to record in the sound flash - #-------------------------------------------------------------------------- - def available_record_time(self): - """ - Get the sound duration still available to record in the sound flash - - Return a integer (0..255) - - Example: - >>> var = tux.status.available_record_time() - """ - return self.get_one_status(DATAS_STATUS_AVAILABLE_RECORD_TIME) - - #-------------------------------------------------------------------------- # Get sound flash information #-------------------------------------------------------------------------- def sound_flash(self): |