tux-droid-svn Mailing List for Tux Droid CE (Page 214)
Status: Beta
Brought to you by:
ks156
You can subscribe to this list here.
2007 |
Jan
|
Feb
(32) |
Mar
(108) |
Apr
(71) |
May
(38) |
Jun
(128) |
Jul
(1) |
Aug
(14) |
Sep
(77) |
Oct
(104) |
Nov
(90) |
Dec
(71) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2008 |
Jan
(81) |
Feb
(18) |
Mar
(40) |
Apr
(102) |
May
(151) |
Jun
(74) |
Jul
(151) |
Aug
(257) |
Sep
(447) |
Oct
(379) |
Nov
(404) |
Dec
(430) |
2009 |
Jan
(173) |
Feb
(236) |
Mar
(519) |
Apr
(300) |
May
(112) |
Jun
(232) |
Jul
(314) |
Aug
(58) |
Sep
(203) |
Oct
(293) |
Nov
(26) |
Dec
(109) |
2010 |
Jan
(19) |
Feb
(25) |
Mar
(33) |
Apr
(1) |
May
|
Jun
(3) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: jaguarondi <c2m...@c2...> - 2007-11-09 16:49:06
|
Author: jaguarondi Date: 2007-11-09 17:49:06 +0100 (Fri, 09 Nov 2007) New Revision: 681 Added: firmware/tuxcore/tags/0.3.1/ firmware/tuxcore/tags/0.3.1/CHANGES Removed: firmware/tuxcore/tags/0.3.1/CHANGES Modified: firmware/tuxcore/tags/0.3.1/debug.h firmware/tuxcore/tags/0.3.1/version.h Log: * Releasing tuxcore 0.3.1. See CHANGES for details. Copied: firmware/tuxcore/tags/0.3.1 (from rev 679, firmware/tuxcore/trunk) Property changes on: firmware/tuxcore/tags/0.3.1 ___________________________________________________________________ Name: svn:externals + common -r 679 http://svn.tuxisalive.com/firmware/tuxdefs Deleted: firmware/tuxcore/tags/0.3.1/CHANGES =================================================================== --- firmware/tuxcore/trunk/CHANGES 2007-11-09 16:24:15 UTC (rev 679) +++ firmware/tuxcore/tags/0.3.1/CHANGES 2007-11-09 16:49:06 UTC (rev 681) @@ -1,52 +0,0 @@ -$Id$ - -Approximate change log for TUXCORE by version. - -(For more detailed changes, see svn log.) - ----------------------------------------------------------------------- -Current: - -Version 0.3.1: - - * Added doxygen configuration file. - - * Light measurement is now correctly processed in the daemon to have a - somehow linear curve from the 2 different types of measurements (different - resisotr values). Thresholds for changing the resistor have been updated. - - * Major cleanup and commenting. Motor and led modules are considered clean. - - * Fixed #6 nd #9 about the leds that were not updated when the eyes were - closed. - - * Fixed #7 about the eyes commands. - - * Fixed #8 about the flipper movements. - - * Added the missing commands for the motors: CLOSE_EYES_CMD, RAISE_WINGS_CMD, - LOWER_WINGS_CMD, etc. - - * Added the basis for the sleep functions although they are unfinished and - untested. - - * BUG: when 2 events are happening at the same time, they are conflicting in - the event manager. - - * Added programming directives in the Makefile for tuxup, stk500 and jtagice - mkii. - - * Fixed #1 with the patches given by Philippe Teuwen, this now - fixes the location of the version, revision and author structures with a - linker script in the .version section otherwise gcc is free to change the - order. This also fixes the position of the cpu_nbr and ver_major bits in - the byte as again gcc is free to change that order though this is much less - likely to happen. - -Version 0.3.0: - - * Initial public release. This code is considered stable. Most - functionalities are implemented. Handling now all movements, IR emitter, IR - receiver, phototransistor, blue led's and I2C communication. There's also a - standalone behavior implemented but still not configurable from the - computer. Copied: firmware/tuxcore/tags/0.3.1/CHANGES (from rev 680, firmware/tuxcore/trunk/CHANGES) =================================================================== --- firmware/tuxcore/tags/0.3.1/CHANGES (rev 0) +++ firmware/tuxcore/tags/0.3.1/CHANGES 2007-11-09 16:49:06 UTC (rev 681) @@ -0,0 +1,61 @@ +$Id$ + +Approximate change log for TUXCORE by version. + +(For more detailed changes, see svn log.) + +---------------------------------------------------------------------- +Current: + +Version 0.3.1: + + * Added battery level measurement. The ADC module has been completely + refactored. + + * Reorganization of commands.h is on the way. + + * Versioning of the firmware now has a variation field nd a release_type to + mark final releases. + + * Added doxygen configuration file. The documentation can be founf online at + http://doc.tuxisalive.com. + + * Light measurement is now correctly processed in the daemon to have a + somehow linear curve from the 2 different types of measurements (different + resisotr values). Thresholds for changing the resistor have been updated. + + * Major cleanup and commenting. Motor and led modules are considered clean. + + * Fixed #6 nd #9 about the leds that were not updated when the eyes were + closed. + + * Fixed #7 about the eyes commands. + + * Fixed #8 about the flipper movements. + + * Added the missing commands for the motors: CLOSE_EYES_CMD, RAISE_WINGS_CMD, + LOWER_WINGS_CMD, etc. + + * Added the basis for the sleep functions although they are unfinished and + untested. + + * BUG: when 2 events are happening at the same time, they are conflicting in + the event manager. + + * Added programming directives in the Makefile for tuxup, stk500 and jtagice + mkii. + + * Fixed #1 with the patches given by Philippe Teuwen, this now + fixes the location of the version, revision and author structures with a + linker script in the .version section otherwise gcc is free to change the + order. This also fixes the position of the cpu_nbr and ver_major bits in + the byte as again gcc is free to change that order though this is much less + likely to happen. + +Version 0.3.0: + + * Initial public release. This code is considered stable. Most + functionalities are implemented. Handling now all movements, IR emitter, IR + receiver, phototransistor, blue led's and I2C communication. There's also a + standalone behavior implemented but still not configurable from the + computer. Modified: firmware/tuxcore/tags/0.3.1/debug.h =================================================================== --- firmware/tuxcore/trunk/debug.h 2007-11-09 16:24:15 UTC (rev 679) +++ firmware/tuxcore/tags/0.3.1/debug.h 2007-11-09 16:49:06 UTC (rev 681) @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -/* $Id:$ */ +/* $Id$ */ /** * \defgroup debug Debugging aid Modified: firmware/tuxcore/tags/0.3.1/version.h =================================================================== --- firmware/tuxcore/trunk/version.h 2007-11-09 16:24:15 UTC (rev 679) +++ firmware/tuxcore/tags/0.3.1/version.h 2007-11-09 16:49:06 UTC (rev 681) @@ -34,7 +34,7 @@ /** RELEASE should be set to '1' prior to tagging a release, and reset * immediately after. It's like appending (SVN_UNRELEASED) to a version number * when equal to '0'. */ -#define RELEASE 0 +#define RELEASE 1 #define AUTHOR_ID 0 /* official release */ #define VARIATION 0 /* generic firmware */ |
From: jaguarondi <c2m...@c2...> - 2007-11-09 16:43:07
|
Author: jaguarondi Date: 2007-11-09 17:43:02 +0100 (Fri, 09 Nov 2007) New Revision: 680 Modified: firmware/tuxaudio/trunk/CHANGES firmware/tuxcore/trunk/CHANGES Log: * Updated CHANGES for tuxcore and tuxaudio in order to release 0.3.1. Modified: firmware/tuxaudio/trunk/CHANGES =================================================================== --- firmware/tuxaudio/trunk/CHANGES 2007-11-09 16:24:15 UTC (rev 679) +++ firmware/tuxaudio/trunk/CHANGES 2007-11-09 16:43:02 UTC (rev 680) @@ -9,6 +9,14 @@ Version 0.3.1: + * Versioning of the firmware now has a variation field nd a release_type to + mark final releases. + + * Reviewed the flash playing function to use a fifo and to be able to keep + sending the status when a sound is played from the sound flash. Some new + status are now also sent during playing and programming of the sound flash + memory. Bug fixes too. + * Refactored the audio flash module and the flash functions are now moved to their own module (AT26F004), many bug fixes. Modified: firmware/tuxcore/trunk/CHANGES =================================================================== --- firmware/tuxcore/trunk/CHANGES 2007-11-09 16:24:15 UTC (rev 679) +++ firmware/tuxcore/trunk/CHANGES 2007-11-09 16:43:02 UTC (rev 680) @@ -9,8 +9,17 @@ Version 0.3.1: - * Added doxygen configuration file. + * Added battery level measurement. The ADC module has been completely + refactored. + * Reorganization of commands.h is on the way. + + * Versioning of the firmware now has a variation field nd a release_type to + mark final releases. + + * Added doxygen configuration file. The documentation can be founf online at + http://doc.tuxisalive.com. + * Light measurement is now correctly processed in the daemon to have a somehow linear curve from the 2 different types of measurements (different resisotr values). Thresholds for changing the resistor have been updated. |
From: jaguarondi <c2m...@c2...> - 2007-11-09 16:30:36
|
Author: jaguarondi Date: 2007-11-09 15:30:08 +0100 (Fri, 09 Nov 2007) New Revision: 670 Modified: firmware/tuxdefs/config.h Log: * Should add api.h to config.h too. Modified: firmware/tuxdefs/config.h =================================================================== --- firmware/tuxdefs/config.h 2007-11-09 14:27:05 UTC (rev 669) +++ firmware/tuxdefs/config.h 2007-11-09 14:30:08 UTC (rev 670) @@ -25,6 +25,7 @@ #include <avr/eeprom.h> #include "commands.h" +#include "api.h" /* * Standalone events |
From: jaguarondi <c2m...@c2...> - 2007-11-09 16:30:27
|
Author: jaguarondi Date: 2007-11-09 15:27:05 +0100 (Fri, 09 Nov 2007) New Revision: 669 Modified: firmware/tuxdefs/api.h firmware/tuxdefs/defines.h Log: * Added a new member to the revision_t structure for the release type. The point is to be able to differentiate a released from an unreleased version. * Updated comments. Modified: firmware/tuxdefs/api.h =================================================================== --- firmware/tuxdefs/api.h 2007-11-09 09:19:07 UTC (rev 668) +++ firmware/tuxdefs/api.h 2007-11-09 14:27:05 UTC (rev 669) @@ -118,8 +118,8 @@ * - all major and minor numbers should be equal; * - the higher update number of all CPUs will be the update number of the * release package; - * - when increasing the update number, use the highest update number among all - * CPUs + 1. + * - when increasing the update number, use the highest update number among + * all CPUs + 1. */ /** * Return the CPU number and the firmware version in major.minor.update @@ -129,8 +129,8 @@ * structure. * * Parameters: - * - 1 - 3 lower bits are the CPU number, - * 5 higher bits are the major version number. + * - 1 - 3 lower bits are the CPU number, + * 5 higher bits are the major version number. * - 2 - minor version number. * - 3 - update version number. */ @@ -147,7 +147,10 @@ * Parameters: * - 1 - LSB of the revision number. * - 2 - MSB of the revision number. - * - 3 - undefined. + * - 3 - Release type coded as a bit field with the following values: + * - Bit 0: set if local modifications found. + * - Bit 1: set if mixed update revisions found. + * - Bit 2: set for a tagged and original release. */ #define REVISION_CMD 0xC9 Modified: firmware/tuxdefs/defines.h =================================================================== --- firmware/tuxdefs/defines.h 2007-11-09 09:19:07 UTC (rev 668) +++ firmware/tuxdefs/defines.h 2007-11-09 14:27:05 UTC (rev 669) @@ -53,6 +53,8 @@ FUXRF_CPU_NUM = 3, /** 'fuxusb' is the USB CPU inside the dongle. */ FUXUSB_CPU_NUM = 4, + /** We use '-1' to indicate an invalid CPU number. */ + INVALID_CPU_NUM = -1, }; /** @@ -103,6 +105,8 @@ * This version_t type should be used to send the bytes over a channel such as * USB or TCP-IP. Use the macros to set or retrieve values of the cpu_ver_maj * byte. + * + * See also VERSION_CMD. */ typedef struct { @@ -125,13 +129,20 @@ #define CPU_VER_MAJ(cpu_ver_maj) ((cpu_ver_maj & 0xF8) >> 3) /** - * Revision number of the firmware from the subversion repository. + * Revision information from the subversion repository. + * + * See also REVISION_CMD. */ typedef struct { uint8_t revision_cmd; + /** Revision number. */ uint16_t revision; - uint8_t _undefined_; + /** Release type coded as a bit field with the following values: + * - Bit 0: set if local modifications found. + * - Bit 1: set if mixed update revisions found. + * - Bit 2: set for a tagged and original release. */ + uint8_t release_type; } revision_t; /** |
From: jaguarondi <c2m...@c2...> - 2007-11-09 16:24:28
|
Author: jaguarondi Date: 2007-11-09 17:24:15 +0100 (Fri, 09 Nov 2007) New Revision: 679 Modified: firmware/fuxusb/tags/0.3.1/modules/usb/usb_task.c Log: * Minor bug on the versioning. Shouldn't have tagged that quickly :/ Modified: firmware/fuxusb/tags/0.3.1/modules/usb/usb_task.c =================================================================== --- firmware/fuxusb/tags/0.3.1/modules/usb/usb_task.c 2007-11-09 16:11:44 UTC (rev 678) +++ firmware/fuxusb/tags/0.3.1/modules/usb/usb_task.c 2007-11-09 16:24:15 UTC (rev 679) @@ -283,7 +283,7 @@ Usb_write_byte(info_revision.revision_cmd); Usb_write_byte((info_revision.revision&0xFF00)>>8); Usb_write_byte((info_revision.revision&0x00FF)); - Usb_write_byte(info_revision._undefined_); + Usb_write_byte(info_revision.release_type); // AUTHOR_CMD //------------------------------------- |
From: Paul_R <c2m...@c2...> - 2007-11-09 15:56:32
|
Author: Paul_R Date: 2007-11-09 16:23:35 +0100 (Fri, 09 Nov 2007) New Revision: 674 Modified: software/gadgets/settings/trunk/settings.tgf software/gadgets/settings/trunk/settings/Scripts/Python/GUI/widget/other.glade software/gadgets/settings/trunk/settings/Scripts/Python/GUI/widget/other.pyp software/gadgets/settings/trunk/settings/Strings/fr_ALL.xml software/gadgets/settings/trunk/settings/settings.xml software/gadgets/settings/trunk/settings/strings.xml Log: * Added the self test mode. * Added the sleep section. Modified: software/gadgets/settings/trunk/settings/Scripts/Python/GUI/widget/other.glade =================================================================== --- software/gadgets/settings/trunk/settings/Scripts/Python/GUI/widget/other.glade 2007-11-09 15:19:03 UTC (rev 673) +++ software/gadgets/settings/trunk/settings/Scripts/Python/GUI/widget/other.glade 2007-11-09 15:23:35 UTC (rev 674) @@ -72,13 +72,65 @@ <child> <widget class="GtkFixed" id="fixed13"> - <property name="height_request">1</property> + <property name="height_request">0</property> <property name="visible">True</property> <child> + <widget class="GtkLabel" id="lblUsedChannel"> + <property name="width_request">224</property> + <property name="height_request">16</property> + <property name="visible">True</property> + <property name="label" translatable="yes">label5</property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_RIGHT</property> + <property name="wrap">True</property> + <property name="selectable">False</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="x">0</property> + <property name="y">45</property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="lblChannel"> + <property name="width_request">152</property> + <property name="height_request">16</property> + <property name="visible">True</property> + <property name="label" translatable="yes">label7</property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">True</property> + <property name="selectable">False</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="x">240</property> + <property name="y">45</property> + </packing> + </child> + + <child> <widget class="GtkComboBox" id="cbbWifiChannel"> <property name="width_request">120</property> - <property name="height_request">24</property> + <property name="height_request">29</property> <property name="visible">True</property> <property name="items" translatable="yes"></property> <property name="add_tearoffs">False</property> @@ -92,54 +144,141 @@ </child> <child> - <widget class="GtkEntry" id="txtWifiUsed"> - <property name="width_request">72</property> + <widget class="GtkLabel" id="lblWifiAvoidance"> + <property name="width_request">224</property> + <property name="height_request">16</property> + <property name="visible">True</property> + <property name="label" translatable="yes">label4</property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_RIGHT</property> + <property name="wrap">True</property> + <property name="selectable">False</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="x">0</property> + <property name="y">16</property> + </packing> + </child> + </widget> + </child> + </widget> + </child> + + <child> + <widget class="GtkLabel" id="lblConfigWifi"> + <property name="visible">True</property> + <property name="label" translatable="yes"><b>frame14</b></property> + <property name="use_underline">False</property> + <property name="use_markup">True</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="type">label_item</property> + </packing> + </child> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">True</property> + <property name="fill">True</property> + </packing> + </child> + + <child> + <widget class="GtkFrame" id="frame15"> + <property name="border_width">2</property> + <property name="visible">True</property> + <property name="label_xalign">0</property> + <property name="label_yalign">0.5</property> + <property name="shadow_type">GTK_SHADOW_OUT</property> + + <child> + <widget class="GtkAlignment" id="alignment15"> + <property name="visible">True</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xscale">1</property> + <property name="yscale">1</property> + <property name="top_padding">0</property> + <property name="bottom_padding">0</property> + <property name="left_padding">12</property> + <property name="right_padding">0</property> + + <child> + <widget class="GtkFixed" id="fixed14"> + <property name="height_request">0</property> + <property name="visible">True</property> + + <child> + <widget class="GtkCheckButton" id="chkSleepEnable"> + <property name="width_request">280</property> <property name="height_request">24</property> <property name="visible">True</property> <property name="can_focus">True</property> - <property name="editable">True</property> - <property name="visibility">True</property> - <property name="max_length">0</property> - <property name="text" translatable="yes"></property> - <property name="has_frame">True</property> - <property name="invisible_char">●</property> - <property name="activates_default">False</property> + <property name="label" translatable="yes">checkbutton1</property> + <property name="use_underline">True</property> + <property name="relief">GTK_RELIEF_NORMAL</property> + <property name="focus_on_click">True</property> + <property name="active">False</property> + <property name="inconsistent">False</property> + <property name="draw_indicator">True</property> + <signal name="toggled" handler="on_chkSleepEnable_toggled" last_modification_time="Wed, 07 Nov 2007 18:30:05 GMT"/> </widget> <packing> - <property name="x">240</property> - <property name="y">40</property> + <property name="x">8</property> + <property name="y">8</property> </packing> </child> <child> - <widget class="GtkEntry" id="txtWifiAvoid"> + <widget class="GtkSpinButton" id="spinSleepDelay"> <property name="width_request">72</property> - <property name="height_request">24</property> + <property name="height_request">26</property> <property name="visible">True</property> <property name="can_focus">True</property> - <property name="editable">True</property> - <property name="visibility">True</property> - <property name="max_length">0</property> - <property name="text" translatable="yes"></property> - <property name="has_frame">True</property> - <property name="invisible_char">●</property> - <property name="activates_default">False</property> + <property name="climb_rate">1</property> + <property name="digits">0</property> + <property name="numeric">False</property> + <property name="update_policy">GTK_UPDATE_ALWAYS</property> + <property name="snap_to_ticks">False</property> + <property name="wrap">False</property> + <property name="adjustment">5 5 240 5 5 5</property> + <signal name="changed" handler="on_spinSleepDelay_changed" last_modification_time="Wed, 07 Nov 2007 18:42:10 GMT"/> </widget> <packing> - <property name="x">240</property> - <property name="y">68</property> + <property name="x">376</property> + <property name="y">40</property> </packing> </child> <child> - <widget class="GtkLabel" id="lblWifiAvoidance"> - <property name="width_request">224</property> - <property name="height_request">16</property> + <widget class="GtkLabel" id="label2"> + <property name="width_request">64</property> + <property name="height_request">25</property> <property name="visible">True</property> - <property name="label" translatable="yes">label4</property> + <property name="label" translatable="yes">minutes.</property> <property name="use_underline">False</property> <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_RIGHT</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> <property name="wrap">True</property> <property name="selectable">False</property> <property name="xalign">0.5</property> @@ -152,17 +291,17 @@ <property name="angle">0</property> </widget> <packing> - <property name="x">0</property> - <property name="y">16</property> + <property name="x">456</property> + <property name="y">40</property> </packing> </child> <child> - <widget class="GtkLabel" id="lblUsedChannel"> - <property name="width_request">224</property> + <widget class="GtkLabel" id="lblSleepDelay"> + <property name="width_request">360</property> <property name="height_request">16</property> <property name="visible">True</property> - <property name="label" translatable="yes">label5</property> + <property name="label" translatable="yes">label1</property> <property name="use_underline">False</property> <property name="use_markup">False</property> <property name="justify">GTK_JUSTIFY_RIGHT</property> @@ -178,17 +317,17 @@ <property name="angle">0</property> </widget> <packing> - <property name="x">0</property> - <property name="y">45</property> + <property name="x">8</property> + <property name="y">44</property> </packing> </child> <child> - <widget class="GtkLabel" id="lblAvoidChannel"> - <property name="width_request">224</property> + <widget class="GtkLabel" id="lblSleepState"> + <property name="width_request">360</property> <property name="height_request">16</property> <property name="visible">True</property> - <property name="label" translatable="yes">label6</property> + <property name="label" translatable="yes">label1</property> <property name="use_underline">False</property> <property name="use_markup">False</property> <property name="justify">GTK_JUSTIFY_RIGHT</property> @@ -204,19 +343,37 @@ <property name="angle">0</property> </widget> <packing> - <property name="x">0</property> + <property name="x">8</property> <property name="y">72</property> </packing> </child> + + <child> + <widget class="GtkButton" id="btnSleep"> + <property name="width_request">160</property> + <property name="height_request">28</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="label" translatable="yes">button1</property> + <property name="use_underline">True</property> + <property name="relief">GTK_RELIEF_NORMAL</property> + <property name="focus_on_click">True</property> + <signal name="clicked" handler="on_btnSleep_clicked" last_modification_time="Thu, 08 Nov 2007 08:59:37 GMT"/> + </widget> + <packing> + <property name="x">8</property> + <property name="y">96</property> + </packing> + </child> </widget> </child> </widget> </child> <child> - <widget class="GtkLabel" id="lblConfigWifi"> + <widget class="GtkLabel" id="lblConfigSleep"> <property name="visible">True</property> - <property name="label" translatable="yes"><b>frame14</b></property> + <property name="label" translatable="yes"><b>frame15</b></property> <property name="use_underline">False</property> <property name="use_markup">True</property> <property name="justify">GTK_JUSTIFY_LEFT</property> @@ -244,7 +401,7 @@ </child> <child> - <widget class="GtkFrame" id="frame15"> + <widget class="GtkFrame" id="frame16"> <property name="border_width">2</property> <property name="visible">True</property> <property name="label_xalign">0</property> @@ -252,7 +409,7 @@ <property name="shadow_type">GTK_SHADOW_OUT</property> <child> - <widget class="GtkAlignment" id="alignment15"> + <widget class="GtkAlignment" id="alignment16"> <property name="visible">True</property> <property name="xalign">0.5</property> <property name="yalign">0.5</property> @@ -264,7 +421,7 @@ <property name="right_padding">0</property> <child> - <widget class="GtkFixed" id="fixed14"> + <widget class="GtkFixed" id="fixed15"> <property name="visible">True</property> </widget> </child> @@ -272,9 +429,9 @@ </child> <child> - <widget class="GtkLabel" id="lblConfigSleep"> + <widget class="GtkLabel" id="lblConfigID"> <property name="visible">True</property> - <property name="label" translatable="yes"><b>frame15</b></property> + <property name="label" translatable="yes"><b>frame16</b></property> <property name="use_underline">False</property> <property name="use_markup">True</property> <property name="justify">GTK_JUSTIFY_LEFT</property> @@ -302,7 +459,7 @@ </child> <child> - <widget class="GtkFrame" id="frame16"> + <widget class="GtkFrame" id="frame17"> <property name="border_width">2</property> <property name="visible">True</property> <property name="label_xalign">0</property> @@ -310,7 +467,7 @@ <property name="shadow_type">GTK_SHADOW_OUT</property> <child> - <widget class="GtkAlignment" id="alignment16"> + <widget class="GtkAlignment" id="alignment17"> <property name="visible">True</property> <property name="xalign">0.5</property> <property name="yalign">0.5</property> @@ -322,17 +479,51 @@ <property name="right_padding">0</property> <child> - <widget class="GtkFixed" id="fixed15"> + <widget class="GtkFixed" id="fixed16"> <property name="visible">True</property> + + <child> + <widget class="GtkProgressBar" id="progressbar2"> + <property name="width_request">416</property> + <property name="height_request">20</property> + <property name="visible">True</property> + <property name="orientation">GTK_PROGRESS_LEFT_TO_RIGHT</property> + <property name="fraction">0</property> + <property name="pulse_step">0.10000000149</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + </widget> + <packing> + <property name="x">192</property> + <property name="y">12</property> + </packing> + </child> + + <child> + <widget class="GtkButton" id="btnSelfTest"> + <property name="width_request">160</property> + <property name="height_request">28</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="label" translatable="yes">button2</property> + <property name="use_underline">True</property> + <property name="relief">GTK_RELIEF_NORMAL</property> + <property name="focus_on_click">True</property> + <signal name="clicked" handler="on_btnSelfTest_clicked" last_modification_time="Thu, 08 Nov 2007 09:29:07 GMT"/> + </widget> + <packing> + <property name="x">8</property> + <property name="y">8</property> + </packing> + </child> </widget> </child> </widget> </child> <child> - <widget class="GtkLabel" id="lblConfigID"> + <widget class="GtkLabel" id="lblConfigTest"> <property name="visible">True</property> - <property name="label" translatable="yes"><b>frame16</b></property> + <property name="label" translatable="yes"><b>frame17</b></property> <property name="use_underline">False</property> <property name="use_markup">True</property> <property name="justify">GTK_JUSTIFY_LEFT</property> Modified: software/gadgets/settings/trunk/settings/Scripts/Python/GUI/widget/other.pyp =================================================================== --- software/gadgets/settings/trunk/settings/Scripts/Python/GUI/widget/other.pyp 2007-11-09 15:19:03 UTC (rev 673) +++ software/gadgets/settings/trunk/settings/Scripts/Python/GUI/widget/other.pyp 2007-11-09 15:23:35 UTC (rev 674) @@ -5,6 +5,7 @@ from xml.dom.minidom import Document import subprocess import commands +import time class Window(SimpleGladeApp): def __init__(self, @@ -21,6 +22,7 @@ def update(self): self.avoidedchannel = _me.get_param('AvoidChannel') + self.enablesleep = _me.get_param('EnableSleep') self.get_widget('lblTabConfig').set_text(_me.string('lblTabConfig')) self.get_widget('lblTabSound').set_text(_me.string('lblTabSound')) self.get_widget('lblTabVersion').set_text(_me.string('lblTabVersion')) @@ -34,29 +36,39 @@ def ConfigLabelUpdate(self): + #Frame labels self.get_widget('lblConfigWifi').set_text(_me.string('lblConfigWifi')) self.get_widget('lblConfigSleep').set_text(_me.string('lblConfigSleep')) self.get_widget('lblConfigID').set_text(_me.string('lblConfigID')) + self.get_widget('lblConfigTest').set_text(_me.string('lblConfigTest')) + #Wifi labels self.get_widget('lblWifiAvoidance').set_text(_me.string('lblWifiAvoidance')) - self.get_widget('lblUsedChannel').set_text(_me.string('lblUsedChannel')) - self.get_widget('lblAvoidChannel').set_text(_me.string('lblAvoidChannel')) - - self.get_widget('txtWifiUsed').set_text(self.channel) - self.get_widget('txtWifiUsed').set_editable(False) - self.get_widget('txtWifiAvoid').set_text(str(self.avoidedchannel)) - self.get_widget('txtWifiAvoid').set_editable(False) - self.get_widget('cbbWifiChannel').insert_text(0, 'auto') for i in range(13): channel = str(i+1) self.get_widget('cbbWifiChannel').append_text(channel) + #Sleep labels + self.get_widget('chkSleepEnable').set_label(_me.string('chkSleepEnable')) + self.get_widget('chkSleepEnable').set_active(self.enablesleep) + self.get_widget('lblSleepDelay').set_text(_me.string('lblSleepDelay')) + self.get_widget('spinSleepDelay').set_text(str(_me.get_param('SleepDelay'))) - + #Check if tux is sleeping ... + txt = _me.string('lblSleepStateWork') + self.get_widget('lblSleepState').set_text(txt) + self.get_widget('btnSleep').set_label(_me.string('btnSleepSleep')) + self.get_widget('progressbar2').hide() + # ID labels + #Tests labels + self.get_widget('btnSelfTest').set_label(_me.string('btnSelfTest')) def VersionsLabelUpdate(self): + # Hide the check for update button while the function is not implemented + # in the firmware updater gadget + self.get_widget('btnUpdate').hide() self.get_widget('btnUpdate').set_label(_me.string('btnUpdate')) self.get_widget('lblVersions').set_text(_me.string('lblVersions')) self.get_widget('lblLocal').set_text(_me.string('lblLocal')) @@ -162,24 +174,53 @@ def avoidchannel(self): self.get_widget('cbbWifiChannel').set_active(self.avoidedchannel) + if self.channel == -1: + return + if self.avoidedchannel == 0: - self.get_widget('txtWifiAvoid').set_text(str(self.channel)) tux.connect.avoid_wifi(int(self.channel)) else: tux.connect.avoid_wifi(self.avoidedchannel) - self.get_widget('txtWifiAvoid').set_text(str(self.avoidedchannel)) - - def searchWifiChannel(self): a = commands.getoutput('iwlist channel') - channel_idx = a.rfind('Channel ')+8 - channel = a[channel_idx:channel_idx+2] - if channel.find(')') != -1: - channel = channel[0:1] - self.channel = channel + if a.rfind('Current Channel') != -1: + self.get_widget('lblUsedChannel').set_text(_me.string('lblNoChannel')) + self.get_widget('lblChannel').set_text('') + self.channel = -1 + elif a.rfind('Current Frequency') != -1: + channel_idx = a.rfind('(Channel ') + 9 + channel = a[channel_idx:channel_idx + 2] + if channel.find(')') != -1: + channel = channel[0:1] + self.channel = channel + self.get_widget('lblUsedChannel').set_text(_me.string('lblUsedChannel')) + self.get_widget('lblChannel').set_text(str(self.channel)) + def on_chkSleepEnable_toggled(self, widget, *args): + _me.set_param('EnableSleep', widget.get_active()) + self.enablesleep = widget.get_active() + ## Send the active sleep command + def on_spinSleepDelay_changed(self, widget, *args): + self.sleepdelay = self.get_widget('spinSleepDelay').get_text() + _me.set_param('SleepDelay', self.sleepdelay) + ## Send the delay + + def on_btnSleep_clicked(self, widget, *args): + #if sleeping -> change label and send the wakeup command + + #else + self.get_widget('btnSleep').set_label(_me.string('btnSleepWakeup')) + self.get_widget('lblSleepState').set_text(_me.string('lblSleepStateSleep')) + + def on_btnSelfTest_clicked(self, widget, *args): + thread.start_new_thread(self.testmode,()) + + + + + #--------------------------------------------------------------------------- # # VERSION TAB @@ -328,7 +369,7 @@ title = _me.string('itemChangeLog') message = change - dialog = GdgDialog(title, message) + dialog = GdgDialog(title, message, True) os.system('rm -rf /tmp/tuxdroid-firmware*') def flashCPU(self, widget): @@ -602,6 +643,462 @@ tux.cmd.mouth_open() tux.sys.shell("arecord -D %s -d 10 -t wav rec.wav"%soundcard) tux.cmd.mouth_close() + + +#======================================================================================= +# +# Test function +# +#======================================================================================= + def testmode(self): + self.get_widget('progressbar2').show() + self.get_widget('progressbar2').set_fraction(0) + STEPS = 28.0 + fraction = float(1.0 / STEPS) + print fraction + actual_fraction = 0 + path = commands.getoutput('echo $USER') + #Get the local time to create the file + y, m, d, h, mn = time.localtime()[0:5] + date = ('%i%i%i-%i:%i' %(m, d, y, h, mn)) + #date = str(y) + '-' + str(m) + '-' + str(d) + '_' + str(h) + ':' + str(mn) + f = open('/home/%s/TuxSelftest_%s.txt' %(path, date), 'w') + self.f = f + f.write('%s : Self test start \n'%time.asctime()) + f.write('%s : ============================================================= \n'%time.asctime()) + f.write('%s : First step - Reset tux \n'%time.asctime()) + f.write('%s : ------------------------------------------------------------- \n'%time.asctime()) + tux.cmd.raw(0x31, 0, 0, 0) + tux.cmd.mouth_close() + tux.sys.wait(1) + tux.cmd.eyes_open() + f.write('%s :\n'%time.asctime()) + if tux.status.power_plug() == 0: + self.popup(_me.string('Warning'), _me.string('Connect'), True) + tux.sys.wait(0.5) + while self.popup_open == True: + tux.sys.wait(0.5) + if tux.status.power_plug() == 0: + f.write('%s : The power plug is not detected\n'%time.asctime()) + else: + f.write('%s : Power plug detected\n'%time.asctime()) + else: + f.write('%s : Power plug detected\n'%time.asctime()) + + actual_fraction += fraction + print actual_fraction + self.get_widget('progressbar2').set_fraction(actual_fraction) + + tux.sys.wait(2) + if tux.status.charger_state() == 1: + f.write('%s : Battery charger active\n'%time.asctime()) + else: + f.write('%s : Battery charger not active ...\n'%time.asctime()) + + actual_fraction += fraction + self.get_widget('progressbar2').set_fraction(actual_fraction) + + f.write('%s :\n'%time.asctime()) + f.write('%s : Second step : Measures\n'%time.asctime()) + f.write('%s : ------------------------------------------------------------- \n'%time.asctime()) + level1 = tux.status.light_level() + f.write('%s : Light level with the eyes open : %s\n'%(time.asctime(), level1)) + tux.cmd.eyes_close() + tux.sys.wait(0.5) + level2 = tux.status.light_level() + f.write('%s : Light level with the eyes closed : %s\n'%(time.asctime(), level2)) + + actual_fraction += fraction + self.get_widget('progressbar2').set_fraction(actual_fraction) + + level = tux.status.battery_level() + f.write('%s : Battery level : %s'%(time.asctime(), level[0])) + if level[1] == True: + f.write(' with all motors off\n') + else: + f.write(' with one or more motor(s) running\n') + + actual_fraction += fraction + self.get_widget('progressbar2').set_fraction(actual_fraction) + + tux.cmd.eyes_on(0) + tux.sys.wait(0.5) + level = tux.status.battery_level() + tux.cmd.eyes_off() + tux.sys.wait(0.5) + f.write('%s : Battery level : %s'%(time.asctime(), level[0])) + if level[1] == True: + f.write(' with all motors off\n') + else: + f.write(' with one or more motor(s) running\n') + + actual_fraction += fraction + self.get_widget('progressbar2').set_fraction(actual_fraction) + + tux.cmd.eyes_close() + tux.cmd.eyes_open() + + f.write('%s :\n'%time.asctime()) + f.write('%s : Third step : Buttons\n'%time.asctime()) + f.write('%s : ------------------------------------------------------------- \n'%time.asctime()) + + self.head = [False, False] + self.lwing = [False, False] + self.rwing = [False, False] + + actual_fraction += fraction + self.get_widget('progressbar2').set_fraction(actual_fraction) + + self.popup(_me.string('Warning'), _me.string('Switch'), True) + self.wait() + tux.event.on_head_bt_pushed = self.on_head_bt_pushed + tux.event.on_lwing_bt_pushed = self.on_lwing_bt_pushed + tux.event.on_rwing_bt_pushed = self.on_rwing_bt_pushed + tux.event.on_head_bt_released = self.on_head_bt_released + tux.event.on_lwing_bt_released = self.on_lwing_bt_released + tux.event.on_rwing_bt_released = self.on_rwing_bt_released + timer = time.time() + while time.time() <= timer + 15: + if self.rwing[0] and self.rwing[1] and self.lwing[0] and self.lwing[1] and self.head[0] and self.head[1]: + break + tux.sys.wait(0.5) + + actual_fraction += fraction + self.get_widget('progressbar2').set_fraction(actual_fraction) + + f.write('%s : Head button pressed : %s\n'%(time.asctime(), str(self.head[0]))) + f.write('%s : Head button released : %s\n'%(time.asctime(), str(self.head[1]))) + f.write('%s : Left wing pressed : %s\n'%(time.asctime(), str(self.lwing[0]))) + f.write('%s : Left wing released : %s\n'%(time.asctime(), str(self.lwing[1]))) + f.write('%s : Right wing pressed : %s\n'%(time.asctime(), str(self.rwing[0]))) + f.write('%s : Right wing released : %s\n'%(time.asctime(), str(self.rwing[1]))) + + actual_fraction += fraction + self.get_widget('progressbar2').set_fraction(actual_fraction) + + f.write('%s :\n'%time.asctime()) + f.write('%s : Fourth step : IR and LEDs\n'%time.asctime()) + f.write('%s : ------------------------------------------------------------- \n'%time.asctime()) + f.write('%s : Switch on the LEDs '%time.asctime()) + tux.cmd.eyes_open() + tux.cmd.leds_on() + tux.sys.wait(0.5) + lled = tux.status.lled() + rled = tux.status.rled() + f.write(' - status : left = %i | right = %i \n'%(lled, rled)) + f.write('%s : Switch off the right LED '%time.asctime()) + + actual_fraction += fraction + self.get_widget('progressbar2').set_fraction(actual_fraction) + + tux.cmd.ledr_off() + tux.sys.wait(0.5) + lled = tux.status.lled() + rled = tux.status.rled() + f.write(' - status : left = %i | right = %i \n'%(lled, rled)) + f.write('%s : Switch off the left LED '%time.asctime()) + + actual_fraction += fraction + self.get_widget('progressbar2').set_fraction(actual_fraction) + + tux.cmd.ledl_off() + tux.sys.wait(0.5) + lled = tux.status.lled() + rled = tux.status.rled() + f.write(' - status : left = %i | right = %i \n'%(lled, rled)) + f.write('%s : Blink the led 3x (final state : both on)'%time.asctime()) + tux.cmd.leds_blink(3, 100) + tux.sys.wait(1) + lled = tux.status.lled() + rled = tux.status.rled() + f.write(' - status : left = %i | right = %i \n'%(lled, rled)) + + actual_fraction += fraction + self.get_widget('progressbar2').set_fraction(actual_fraction) + + self.popup(_me.string('Warning'), _me.string('IR'), True) + self.wait() + tux.event.on_remote = self.on_remote + self.remote_count = 0 + timer = time.time() + while time.time() <= timer + 15: + if self.remote_count >= 3: + f.write('%s : Tux received correctly the remote control signal\n'%time.asctime()) + break + tux.sys.wait(0.5) + if time.time() >= timer + 15: + f.write('%s : Tux not received correctly the remote control signal\n'%time.asctime()) + + actual_fraction += fraction + self.get_widget('progressbar2').set_fraction(actual_fraction) + + + f.write('%s :\n'%time.asctime()) + f.write('%s : Fifth step : Sound\n'%time.asctime()) + f.write('%s : ------------------------------------------------------------- \n'%time.asctime()) + if tux.status.sounds_count() == 0: + f.write('%s : The sound flash is empty\n'%time.asctime()) + else: + tux.cmd.sound_play(1) + self.OK = False + self.popupQuestion(_me.string('Warning'), _me.string('Sound'), self.btnOK, True) + self.popup_wait() + tux.sys.wait(0.5) + if self.OK != True: + self.popup(_me.string('Warning'), _me.string('Sound1'), True) + self.wait() + tux.cmd.sound_play(1) + self.OK = False + self.popupQuestion(_me.string('Warning'), _me.string('Sound'), self.btnOK, True) + self.popup_wait() + tux.sys.wait(0.5) + if self.OK != True: + f.write('%s : No sound heard\n'%time.asctime()) + else: + f.write('%s : Sound OK at the second time\n'%time.asctime()) + else: + f.write('%s : Sound OK\n'%time.asctime()) + + actual_fraction += fraction + self.get_widget('progressbar2').set_fraction(actual_fraction) + + self.popup(_me.string('Warning'), _me.string('Mic'), True) + self.wait() + tux.cmd.mouth_open() + tux.micro.capture_start('/tmp/capture.wav', 3) + tux.cmd.mouth_close() + + actual_fraction += fraction + self.get_widget('progressbar2').set_fraction(actual_fraction) + + tux.wav.play('/tmp/capture.wav') + self.OK = False + self.popupQuestion(_me.string('Warning'), _me.string('Sound'), self.btnOK, True) + self.popup_wait() + tux.sys.wait(0.5) + if self.OK == True: + f.write('%s : Microphone OK\n'%time.asctime()) + else: + f.write('%s : No micro signal\n'%time.asctime()) + + actual_fraction += fraction + self.get_widget('progressbar2').set_fraction(actual_fraction) + + self.popupQuestion(_me.string('Warning'), _me.string('Out'), self.btnOK, True) + self.popup_wait() + tux.sys.wait(0.5) + if self.OK == True: + tux.cmd.sound_play(1) + self.OK = False + self.popupQuestion(_me.string('Warning'), _me.string('Sound'), self.btnOK, True) + self.popup_wait() + tux.sys.wait(0.5) + if self.OK == True: + f.write('%s : Sound output OK\n'%time.asctime()) + else: + f.write('%s : No sound output\n'%time.asctime()) + else: + f.write('%s : The sound output has not been tested\n'%time.asctime()) + + actual_fraction += fraction + self.get_widget('progressbar2').set_fraction(actual_fraction) + + self.popupQuestion(_me.string('Warning'), _me.string('In'), self.btnOK, True) + self.popup_wait() + tux.sys.wait(0.5) + print 'OK' + if self.OK == True: + tux.sys.wait(5) + self.OK = False + self.popupQuestion(_me.string('Warning'), _me.string('Sound'), self.btnOK, True) + self.popup_wait() + tux.sys.wait(0.5) + if self.OK == True: + f.write('%s : Sound input OK\n'%time.asctime()) + else: + f.write('%s : No sound input\n'%time.asctime()) + else: + f.write('%s : The sound input has not been tested\n'%time.asctime()) + + actual_fraction += fraction + self.get_widget('progressbar2').set_fraction(actual_fraction) + + + f.write('%s :\n'%time.asctime()) + f.write('%s : Sixth step : Motors\n'%time.asctime()) + f.write('%s : ------------------------------------------------------------- \n'%time.asctime()) + self.popup(_me.string('Warning'), _me.string('Disconnect'), True) + self.wait() + self.head = [False, False] + self.lwing = [False, False] + self.rwing = [False, False] + f.write('%s : Reset tux ... '%time.asctime()) + tux.cmd.raw(0x31, 0, 0, 0) + tux.cmd.mouth_close() + tux.sys.wait(1) + tux.cmd.eyes_open() + f.write('done\n') + + actual_fraction += fraction + self.get_widget('progressbar2').set_fraction(actual_fraction) + + f.write('%s : Send a command to raise the wings'%time.asctime()) + self.send_command(tux.cmd.raw(0x39, 0, 0, 0), 0, 0) + + actual_fraction += fraction + self.get_widget('progressbar2').set_fraction(actual_fraction) + + f.write('%s : Send a command to lower the wings'%time.asctime()) + self.send_command(tux.cmd.raw(0x3A, 0, 0, 0), 0, 0) + + actual_fraction += fraction + self.get_widget('progressbar2').set_fraction(actual_fraction) + + f.write('%s : Move the wings 8 time'%time.asctime()) + self.send_command(tux.cmd.wings_on(8), tux.status.wings_counter, 0) + + actual_fraction += fraction + self.get_widget('progressbar2').set_fraction(actual_fraction) + + f.write('%s : Left wing pressed : %s\n'%(time.asctime(), str(self.lwing[0]))) + f.write('%s : Right wing pressed : %s\n'%(time.asctime(), str(self.rwing[0]))) + f.write('%s : Send a command to close the eyes'%time.asctime()) + tux.cmd.eyes_open() + self.send_command(tux.cmd.eyes_close(), tux.status.eyes_closed, 0) + + actual_fraction += fraction + self.get_widget('progressbar2').set_fraction(actual_fraction) + + f.write('%s : Send a command to open the eyes'%time.asctime()) + self.send_command(tux.cmd.eyes_open(), tux.status.eyes_closed, 1) + + actual_fraction += fraction + self.get_widget('progressbar2').set_fraction(actual_fraction) + + f.write('%s : Send a command to open the mouth'%time.asctime()) + self.send_command(tux.cmd.mouth_open(), tux.status.mouth_closed, 1) + + actual_fraction += fraction + self.get_widget('progressbar2').set_fraction(actual_fraction) + + f.write('%s : Send a command to close the mouth'%time.asctime()) + self.send_command(tux.cmd.mouth_close(), tux.status.mouth_closed, 0) + + actual_fraction += fraction + self.get_widget('progressbar2').set_fraction(actual_fraction) + + f.write('%s : Send a command to spin right'%time.asctime()) + self.send_command(tux.cmd.spinr_on(4), tux.status.spin_counter, 0) + + actual_fraction += fraction + self.get_widget('progressbar2').set_fraction(actual_fraction) + + f.write('%s : Send a command to spin left'%time.asctime()) + self.send_command(tux.cmd.spinl_on(4), tux.status.spin_counter, 0) + + actual_fraction += fraction + self.get_widget('progressbar2').set_fraction(actual_fraction) + + f.write('%s\n'%time.asctime()) + tux.sys.wait(2) + if tux.status.charger_state() == 1: + f.write('%s : Battery charger active\n'%time.asctime()) + else: + f.write('%s : Battery charger not active\n'%time.asctime()) + + actual_fraction += fraction + self.get_widget('progressbar2').set_fraction(actual_fraction) + + tux.event.on_head_bt_pushed = None + tux.event.on_lwing_bt_pushed = None + tux.event.on_rwing_bt_pushed = None + tux.event.on_head_bt_released = None + tux.event.on_lwing_bt_released = None + tux.event.on_rwing_bt_released = None + + f.close() + self.get_widget('progressbar2').hide() +#----------------------------- +# Specific test functions +#----------------------------- + def on_head_bt_pushed(self): + self.head[0] = True + def on_lwing_bt_pushed(self): + self.lwing[0] = True + def on_rwing_bt_pushed(self): + self.rwing[0] = True + def on_head_bt_released(self): + self.head[1] = True + def on_lwing_bt_released(self): + self.lwing[1] = True + def on_rwing_bt_released(self): + self.rwing[1] = True + def on_remote(self, key): + self.remote_count += 1 + + def popup(self, title, message, blocked): + self.popup_open = True + gtk.gdk.threads_enter() + dialog = GdgDialog(title, message, blocked) + gtk.gdk.threads_leave() + self.popup_open = False + + def wait(self): + tux.sys.wait(0.5) + while self.popup_open == True: + tux.sys.wait(0.5) + + def popupQuestion(self, title, message, function, blocked): + self.popup_open = True + gtk.gdk.threads_enter() + dialog = GdgDialogQuestion(title, message, function, blocked) + gtk.gdk.threads_leave() + self.popup_open = False + + def popup_wait(self): + self.OK = False + tux.sys.wait(0.5) + while self.popup_open == True: + tux.sys.wait(0.5) + tux.sys.wait(0.5) + + def btnOK(self): + self.OK = True + + def send_command(self, command, status, stat_val): + for i in range(2): + + timer = time.time() + act_time = timer + command + if status != 0: + while status() != stat_val and (timer + 4) >= act_time: + act_time = time.time() + + if timer + 4 >= time.time(): + self.result_control(i) + return + + self.result_control(-1) + + + def result_control(self, val): + if val == -1: + self.f.write(' : fail...\n') + elif val == 0: + self.f.write(' : done\n') + elif val == 1: + self.f.write(' : done after the second command\n') + tux.sys.wait(1) + + def waiting(self, signal, value): + self.wait = False + while signal() == value: + tux.sys.wait(0.1) + self.wait = True + + + Modified: software/gadgets/settings/trunk/settings/Strings/fr_ALL.xml =================================================================== --- software/gadgets/settings/trunk/settings/Strings/fr_ALL.xml 2007-11-09 15:19:03 UTC (rev 673) +++ software/gadgets/settings/trunk/settings/Strings/fr_ALL.xml 2007-11-09 15:23:35 UTC (rev 674) @@ -1,16 +1,19 @@ <?xml version='1.0' encoding='UTF-8'?> <strings> - <lblAvoidChannel type='str'>Cannal rejeté :</lblAvoidChannel> + <chkSleepEnable type='str'>Permettre la mise en veille</chkSleepEnable> <lblLocal type='str'>Versions disponibles</lblLocal> + <Disconnect type='str'>Déconnectez l'alimentation de tux puis fermez cette fenêtre.</Disconnect> <gui_conf_remote_title type='str'>Télécommande</gui_conf_remote_title> <btnSoundRemove type='str'>Enlever</btnSoundRemove> + <Mic type='str'>Après avoir fermer cette fenêtre, dîtes quelque chose à Tux.</Mic> + <btnSleepSleep type='str'>Mettre en veille</btnSleepSleep> <lblSoundExternalFile type='str'>Fichier :</lblSoundExternalFile> <btnSoundAdd type='str'>Ajouter</btnSoundAdd> <treeFile type='str'>Fichier</treeFile> <gui_conf_accept_bt type='str'>Valider</gui_conf_accept_bt> <help_text type='str'> </help_text> - <lblWifiAvoidance type='str'>Eviter le cannal wifi n° :</lblWifiAvoidance> + <lblWifiAvoidance type='str'>Eviter le canal wifi n° :</lblWifiAvoidance> <itemCPU type='str'>Flasher les processeurs</itemCPU> <btnSoundPlayMic type='str'>Lire</btnSoundPlayMic> <lblSoundLocal type='str'>Lire un wave local</lblSoundLocal> @@ -19,33 +22,52 @@ <lblTabConfig type='str'>Configuration</lblTabConfig> <gui_conf_cancel_bt type='str'>Annuler</gui_conf_cancel_bt> <btnUpdate type='str'>Verifier les mises à jour</btnUpdate> + <lblNoChannel type='str'>Pas de connexion wifi trouvée</lblNoChannel> <gui_conf_delay_lb type='str'>Délai (sec)</gui_conf_delay_lb> <btnSoundRecordMic type='str'>Enregistrer</btnSoundRecordMic> - <gui_conf_about_title type='str'>A propos</gui_conf_about_title> - <chkSoundOriginal type='str'>Fichier originaux</chkSoundOriginal> + <lblConfigSleep type='str'>Configuration de la veille</lblConfigSleep> + <btnSleepWakeup type='str'>Reveiller</btnSleepWakeup> <btnSoundClear type='str'>Purger</btnSoundClear> + <Sound1 type='str'>Assurez vous que le réglage de volume soit au maximum</Sound1> + <lblSleepStateSleep type='str'>Tux est actuellement en veille</lblSleepStateSleep> <lblSoundMic type='str'>Microphone</lblSoundMic> + <Sound type='str'>Avez vous correctement entendu le son ?</Sound> <itemChangeLog type='str'>Voir les changements</itemChangeLog> <lblSoundLocalSelect type='str'>Selectionner un son :</lblSoundLocalSelect> <lblSoundExternal type='str'>Lire un wave externe</lblSoundExternal> - <lblConfigSleep type='str'>Configuration de la veille</lblConfigSleep> - <gui_conf_description_lb type='str'>Description</gui_conf_description_lb> + <IR type='str'>Après avoir fermer cette fenêtre, trois touches de la télécommande. +Vous vez 15 secondes pour realiser cette opération.</IR> + <gui_conf_about_title type='str'>A propos</gui_conf_about_title> + <btnSelfTest type='str'>Démarrer les tests</btnSelfTest> + <lblSleepStateWork type='str'>Tux n'est pas en veille pour le moment</lblSleepStateWork> + <Switch type='str'>Après avoir fermer cette fenêtre, pressez successivement sur les ailes puis sur la tête. +Vous vez 15 secondes pour realiser cette opération.</Switch> <gui_conf_author_lb type='str'>Auteur</gui_conf_author_lb> + <lblConfigTest type='str'>Auto tests</lblConfigTest> <treeVersionVer type='str'>Version</treeVersionVer> <lblConfigWifi type='str'>Configuration wifi</lblConfigWifi> - <treeVersionProg type='str'>Component</treeVersionProg> + <treeVersionProg type='str'>Composant</treeVersionProg> <lblSoundExternalPlay type='str'>Lecture</lblSoundExternalPlay> <gui_conf_current_bind_lb type='str'>Assignation</gui_conf_current_bind_lb> <speaker_name type='str'>Bruno8k</speaker_name> <gui_conf_remote_set_bt type='str'>Set</gui_conf_remote_set_bt> <name_to_read type='str'>Parametres de Tux</name_to_read> <gui_conf_window_title type='str'>Paramètres</gui_conf_window_title> - <lblUsedChannel type='str'>Cannal utilisé :</lblUsedChannel> + <lblUsedChannel type='str'>Votre wifi utilise le cannal :</lblUsedChannel> + <lblSleepDelay type='str'>Activer la veille après une période d'inactivité de </lblSleepDelay> <lblTabSound type='str'>Audio</lblTabSound> <btnSoundStore type='str'>Ecrire</btnSoundStore> <lblVersions type='str'>Versions installées</lblVersions> + <chkSoundOriginal type='str'>Fichier originaux</chkSoundOriginal> <btnSoundModify type='str'>Modifier</btnSoundModify> + <Warning type='str'>Attention</Warning> + <gui_conf_description_lb type='str'>Description</gui_conf_description_lb> + <Connect type='str'>Connectez l'alimentation de tux puis fermez cette fenêtre.</Connect> + <In type='str'>Voulez-vous tester l'entrée son de Tux? +Vous devez connecter un périphérique d'entrée dans le connecteur bleu.</In> <lblConfigID type='str'>Configuration de l'ID</lblConfigID> + <Out type='str'>Voulez-vous tester la sortie son de Tux? +Vous devez connecter des haut-parleurs dans la prise verte.</Out> <lblTabVersion type='str'>Versions</lblTabVersion> <btnSoundPlayNum type='str'>Lire</btnSoundPlayNum> <lblSoundStore type='str'>Enregistrer des fichiers wave</lblSoundStore> Modified: software/gadgets/settings/trunk/settings/settings.xml =================================================================== --- software/gadgets/settings/trunk/settings/settings.xml 2007-11-09 15:19:03 UTC (rev 673) +++ software/gadgets/settings/trunk/settings/settings.xml 2007-11-09 15:23:35 UTC (rev 674) @@ -3,13 +3,15 @@ <parameters> <AvoidChannel type='int'>0</AvoidChannel> <hidden_in_manager type='bool'>False</hidden_in_manager> + <SleepDelay type='int'>10</SleepDelay> + <EnableSleep type='bool'>True</EnableSleep> </parameters> <general> <gui_state> <widget> - <y type='int'>176</y> + <y type='int'>147</y> <visible type='bool'>True</visible> - <x type='int'>1019</x> + <x type='int'>417</x> </widget> <conf> <y type='int'>50</y> @@ -20,6 +22,7 @@ <language type='str'>en_US</language> <notified type='bool'>True</notified> <notify_delay type='int'>60</notify_delay> + <framework_version type='str'>0.0.0</framework_version> <menu_active type='bool'>True</menu_active> <main_priority type='int'>4</main_priority> <speaker type='int'>3</speaker> Modified: software/gadgets/settings/trunk/settings/strings.xml =================================================================== --- software/gadgets/settings/trunk/settings/strings.xml 2007-11-09 15:19:03 UTC (rev 673) +++ software/gadgets/settings/trunk/settings/strings.xml 2007-11-09 15:23:35 UTC (rev 674) @@ -1,9 +1,12 @@ <?xml version='1.0' encoding='UTF-8'?> <strings> - <lblAvoidChannel type='str'>Avoided channel :</lblAvoidChannel> + <chkSleepEnable type='str'>Enable sleep mode</chkSleepEnable> <lblLocal type='str'>Available versions</lblLocal> + <Disconnect type='str'>Please disconnect the power plug andpress the 'OK' button.</Disconnect> <gui_conf_remote_title type='str'>Remote</gui_conf_remote_title> <btnSoundRemove type='str'>Remove</btnSoundRemove> + <Mic type='str'>After closing this window, say anything to Tux.</Mic> + <treeVersionProg type='str'>Component</treeVersionProg> <lblSoundExternalFile type='str'>File :</lblSoundExternalFile> <btnSoundAdd type='str'>Add</btnSoundAdd> <treeFile type='str'>Fichier</treeFile> @@ -19,33 +22,52 @@ <lblTabConfig type='str'>Configuration</lblTabConfig> <gui_conf_cancel_bt type='str'>Cancel</gui_conf_cancel_bt> <btnUpdate type='str'>Check for updates</btnUpdate> + <lblNoChannel type='str'>No wifi connection found</lblNoChannel> <gui_conf_delay_lb type='str'>Delay (sec)</gui_conf_delay_lb> <btnSoundRecordMic type='str'>Record</btnSoundRecordMic> - <gui_conf_about_title type='str'>About</gui_conf_about_title> - <chkSoundOriginal type='str'>Include originals</chkSoundOriginal> + <lblConfigSleep type='str'>Sleep configuration</lblConfigSleep> + <btnSleepWakeup type='str'>Wakeup</btnSleepWakeup> <btnSoundClear type='str'>Clear list</btnSoundClear> + <Sound1 type='str'>Be sure that the sound volume control is at the maximum.</Sound1> + <lblSleepStateSleep type='str'>Tux is currently sleeping</lblSleepStateSleep> <speaker_name type='str'>Ryan8k</speaker_name> + <Sound type='str'>Have you heard the sound ?</Sound> <itemChangeLog type='str'>Show ChangeLog</itemChangeLog> <lblSoundLocalSelect type='str'>Select sound</lblSoundLocalSelect> <lblSoundExternal type='str'>Play external wave file</lblSoundExternal> - <lblConfigSleep type='str'>Sleep configuration</lblConfigSleep> - <gui_conf_description_lb type='str'>Description</gui_conf_description_lb> + <IR type='str'>After closing this window, press the keys '1', '2' and '3' of the remote control. +You've 15 seconds to perform this task.</IR> + <gui_conf_about_title type='str'>About</gui_conf_about_title> + <btnSelfTest type='str'>Start self test</btnSelfTest> + <lblSleepStateWork type='str'>Tux isn't in sleep mode</lblSleepStateWork> + <Switch type='str'>After closing this window, press on the wings and on the head. +You've 15 seconds to perform this task.</Switch> <gui_conf_author_lb type='str'>Author</gui_conf_author_lb> + <lblConfigTest type='str'>Self tests</lblConfigTest> <treeVersionVer type='str'>Version</treeVersionVer> <lblConfigWifi type='str'>Wifi configuration</lblConfigWifi> - <treeVersionProg type='str'>Component</treeVersionProg> + <btnSleepSleep type='str'>Sleep</btnSleepSleep> <lblSoundExternalPlay type='str'>Play</lblSoundExternalPlay> <gui_conf_current_bind_lb type='str'>Current</gui_conf_current_bind_lb> <lblSoundMic type='str'>Microphone</lblSoundMic> <gui_conf_remote_set_bt type='str'>Set</gui_conf_remote_set_bt> <name_to_read type='str'>Tux settings</name_to_read> <gui_conf_window_title type='str'>Parameters</gui_conf_window_title> - <lblUsedChannel type='str'>Used channel :</lblUsedChannel> + <lblUsedChannel type='str'>Your wifi use the channel :</lblUsedChannel> + <lblSleepDelay type='str'>Active the sleep mode after a inactivity period of</lblSleepDelay> <lblTabSound type='str'>Audio</lblTabSound> <btnSoundStore type='str'>Store</btnSoundStore> <lblVersions type='str'>Installed versions</lblVersions> + <chkSoundOriginal type='str'>Include originals</chkSoundOriginal> <btnSoundModify type='str'>Modify</btnSoundModify> + <Warning type='str'>Warning</Warning> + <gui_conf_description_lb type='str'>Description</gui_conf_description_lb> + <Connect type='str'>Please connect the power plug, and press the 'OK' button</Connect> + <In type='str'>Would you like to test the sound input interface? +To do this, you need to connect an input device in the blue connector and then click 'Yes'.</In> <lblConfigID type='str'>ID configuration</lblConfigID> + <Out type='str'>Would you like to test the sound output interface? +To do this, you need to connect loudspeakers in the green connector, and press the 'Yes' button.</Out> <lblTabVersion type='str'>Versions</lblTabVersion> <btnSoundPlayNum type='str'>Play</btnSoundPlayNum> <lblSoundStore type='str'>Store wave files locally</lblSoundStore> Modified: software/gadgets/settings/trunk/settings.tgf =================================================================== (Binary files differ) |
From: jaguarondi <c2m...@c2...> - 2007-11-09 15:56:31
|
Author: jaguarondi Date: 2007-11-09 15:33:01 +0100 (Fri, 09 Nov 2007) New Revision: 671 Modified: daemon/trunk/TODO Log: * TODO updated. Modified: daemon/trunk/TODO =================================================================== --- daemon/trunk/TODO 2007-11-09 14:30:08 UTC (rev 670) +++ daemon/trunk/TODO 2007-11-09 14:33:01 UTC (rev 671) @@ -1,7 +1,13 @@ $Id$ -- Use the GNU Autotools framework to configure and compile the daemon. +- Replace all status with a few structures. +- Add asynchronous retrieving of the dongle status. + +- Use cmake to configure and compile the daemon. + - Support multiple dongles. -- SNMP Support. +- SNMP Support? + +- Use xml-rpc to standardize the protocol. |
From: Paul_R <c2m...@c2...> - 2007-11-09 15:48:38
|
Author: Paul_R Date: 2007-11-09 16:48:35 +0100 (Fri, 09 Nov 2007) New Revision: 677 Modified: software/gadgets/battery_monitor/trunk/Battery_monitor.tgf software/gadgets/battery_monitor/trunk/Battery_monitor_svn/Scripts/Python/Battery_class.py software/gadgets/battery_monitor/trunk/Battery_monitor_svn/Scripts/Python/GUI/conf/other.pyp software/gadgets/battery_monitor/trunk/Battery_monitor_svn/Strings/fr_ALL.xml software/gadgets/battery_monitor/trunk/Battery_monitor_svn/about.xml software/gadgets/battery_monitor/trunk/Battery_monitor_svn/settings.xml software/gadgets/battery_monitor/trunk/Battery_monitor_svn/strings.xml software/gadgets/light_monitor/trunk/Light_monitor.tgf software/gadgets/light_monitor/trunk/Light_monitor/Scripts/Python/GUI/widget/other.pyp software/gadgets/light_monitor/trunk/Light_monitor/Scripts/Python/lightGraph_class.py software/gadgets/light_monitor/trunk/Light_monitor/about.xml software/gadgets/light_monitor/trunk/Light_monitor/settings.xml software/gadgets/light_monitor/trunk/Light_monitor/strings.xml Log: * Removed all 'print' Modified: software/gadgets/battery_monitor/trunk/Battery_monitor.tgf =================================================================== (Binary files differ) Modified: software/gadgets/battery_monitor/trunk/Battery_monitor_svn/Scripts/Python/Battery_class.py =================================================================== --- software/gadgets/battery_monitor/trunk/Battery_monitor_svn/Scripts/Python/Battery_class.py 2007-11-09 15:39:21 UTC (rev 676) +++ software/gadgets/battery_monitor/trunk/Battery_monitor_svn/Scripts/Python/Battery_class.py 2007-11-09 15:48:35 UTC (rev 677) @@ -309,7 +309,6 @@ return False def absolute_threshold_high(self, value, value_off): - print self.absolute_threshold_high_flag if self.absolute_threshold_high_flag == False: val = self.convert_value([0, 1, 0, value]) val_act = (self.val_table[len(self.val_table)-1]*100) / self.RANGE Modified: software/gadgets/battery_monitor/trunk/Battery_monitor_svn/Scripts/Python/GUI/conf/other.pyp =================================================================== --- software/gadgets/battery_monitor/trunk/Battery_monitor_svn/Scripts/Python/GUI/conf/other.pyp 2007-11-09 15:39:21 UTC (rev 676) +++ software/gadgets/battery_monitor/trunk/Battery_monitor_svn/Scripts/Python/GUI/conf/other.pyp 2007-11-09 15:48:35 UTC (rev 677) @@ -172,7 +172,6 @@ ########################################################### def on_row_selected(self, obj): path = obj.get_selected_rows() - print path self.__iter = self.value_list.get_iter(path[1][0]) index = self.value_list.get_value(self.__iter, 0) event = self.value_list.get_value(self.__iter, 1) Modified: software/gadgets/battery_monitor/trunk/Battery_monitor_svn/Strings/fr_ALL.xml =================================================================== --- software/gadgets/battery_monitor/trunk/Battery_monitor_svn/Strings/fr_ALL.xml 2007-11-09 15:39:21 UTC (rev 676) +++ software/gadgets/battery_monitor/trunk/Battery_monitor_svn/Strings/fr_ALL.xml 2007-11-09 15:48:35 UTC (rev 677) @@ -11,7 +11,7 @@ <widget_lblControl type='str'>Contrôle</widget_lblControl> <Increase type='str'>Le niveau de la batterie est passé en dessus du seuil</Increase> <full type='str'>Les batteries sont pleines</full> - <widget_lblChangeD type='str'>Changement inf.</widget_lblChangeD> + <gui_conf_accept_bt type='str'>Valider</gui_conf_accept_bt> <lblLowThreshold type='str'>Limite inférieure</lblLowThreshold> <help_text type='str'>-- Les évènements : Deux grands types d'évènements peuvent avoir lieu, contenant chacun diverses options : @@ -73,7 +73,7 @@ <MainBehavior type='str'>Comportement principal</MainBehavior> <speaker_name type='str'>Bruno8k</speaker_name> <conf_lblSample type='str'>Points</conf_lblSample> - <conf_lblType type='str'>Type</conf_lblType> + <charging type='str'>En charge</charging> <Change type='str'>Le niveau de la batterie a changé</Change> <Both type='str'>Le niveau de la batterie a passé le seuil</Both> <conf_btnModify type='str'>Modifier</conf_btnModify> @@ -102,18 +102,18 @@ <gui_conf_remote_set_bt type='str'>Set</gui_conf_remote_set_bt> <widget_lblChange type='str'>Changement</widget_lblChange> <name_to_read type='str'>Moniteur de batteries</name_to_read> - <gui_conf_window_title type='str'>Paramètres</gui_conf_window_title> + <conf_lblNotNotified type='str'>Non notifié</conf_lblNotNotified> <Drop type='str'>Le niveau de la batterie a chuté</Drop> <conf_lblDrop type='str'>Chute</conf_lblDrop> - <conf_lblNotNotified type='str'>Non notifié</conf_lblNotNotified> + <gui_conf_window_title type='str'>Paramètres</gui_conf_window_title> <Raise type='str'>Le niveau de la batterie a augmenté</Raise> - <charging type='str'>En charge</charging> + <conf_lblType type='str'>Type</conf_lblType> <widget_lblSet type='str'>Ajouter a la config.</widget_lblSet> <Decrease type='str'>Le niveau de la batterie est passé en dessous du seuil</Decrease> <conf_lblValue type='str'>Valeur (V)</conf_lblValue> <conf_lblRate type='str'>Rafraichissement</conf_lblRate> <widget_lblBehavior type='str'>Activer le script</widget_lblBehavior> - <gui_conf_accept_bt type='str'>Valider</gui_conf_accept_bt> + <widget_lblChangeD type='str'>Changement inf.</widget_lblChangeD> <conf_lblTime type='str'>Temps (sec.)</conf_lblTime> <conf_lblControl type='str'>Contrôle</conf_lblControl> <conf_lblNotified type='str'>Notifié ?</conf_lblNotified> Modified: software/gadgets/battery_monitor/trunk/Battery_monitor_svn/about.xml =================================================================== --- software/gadgets/battery_monitor/trunk/Battery_monitor_svn/about.xml 2007-11-09 15:39:21 UTC (rev 676) +++ software/gadgets/battery_monitor/trunk/Battery_monitor_svn/about.xml 2007-11-09 15:48:35 UTC (rev 677) @@ -1,7 +1,7 @@ <?xml version='1.0' encoding='UTF-8'?> <about> - <gadget_description type='str'>Battery monitor for tux droid</gadget_description> <gadget_author type='str'>Paul Rathgeb</gadget_author> + <gadget_version type='str'>0.0.1</gadget_version> <gadget_name type='str'>battery_monitor</gadget_name> - <gadget_version type='str'>0.0.1</gadget_version> + <gadget_description type='str'>Battery monitor for tux droid</gadget_description> </about> Modified: software/gadgets/battery_monitor/trunk/Battery_monitor_svn/settings.xml =================================================================== --- software/gadgets/battery_monitor/trunk/Battery_monitor_svn/settings.xml 2007-11-09 15:39:21 UTC (rev 676) +++ software/gadgets/battery_monitor/trunk/Battery_monitor_svn/settings.xml 2007-11-09 15:48:35 UTC (rev 677) @@ -1,11 +1,11 @@ <?xml version='1.0' encoding='UTF-8'?> <settings> <parameters> - <test_tab type='list'>[[1, 0, 0, 0.10000000000000001, 20.0, True, 'None', False, 0]]</test_tab> + <Sample type='float'>600.0</Sample> + <low_threshold type='float'>4.8</low_threshold> <chkMotors type='bool'>True</chkMotors> - <low_threshold type='float'>4.8</low_threshold> <MainScript type='str'>None</MainScript> - <Sample type='float'>600.0</Sample> + <test_tab type='list'>[[1, 0, 0, 0.10000000000000001, 20.0, True, 'None', False, 0]]</test_tab> <Rate type='float'>1.0</Rate> <high_threshold type='float'>6.0</high_threshold> <config type='list'>[]</config> @@ -18,14 +18,19 @@ <x type='int'>133</x> </widget> <conf> - <visible type='bool'>False</visible> + <y type='int'>27</y> + <visible type='bool'>True</visible> + <x type='int'>0</x> </conf> </gui_state> <language type='str'>en_US</language> <notified type='bool'>True</notified> <notify_delay type='int'>1</notify_delay> + <framework_version type='str'>0.0.0</framework_version> <menu_active type='bool'>True</menu_active> + <main_priority type='int'>4</main_priority> <speaker type='int'>3</speaker> <pitch type='int'>100</pitch> + <notify_priority type='int'>4</notify_priority> </general> </settings> Modified: software/gadgets/battery_monitor/trunk/Battery_monitor_svn/strings.xml =================================================================== --- software/gadgets/battery_monitor/trunk/Battery_monitor_svn/strings.xml 2007-11-09 15:39:21 UTC (rev 676) +++ software/gadgets/battery_monitor/trunk/Battery_monitor_svn/strings.xml 2007-11-09 15:48:35 UTC (rev 677) @@ -3,20 +3,15 @@ <conf_lblIncrease type='str'>Increase</conf_lblIncrease> <conf_lblThreshold type='str'>Threshold</conf_lblThreshold> <gui_conf_remote_title type='str'>Control</gui_conf_remote_title> - <conf_lblTime type='str'>Time (sec.)</conf_lblTime> <battery type='str'>On battery</battery> - <gui_conf_accept_bt type='str'>Accept</gui_conf_accept_bt> <conf_lblRaise type='str'>Raise</conf_lblRaise> - <widget_lblTest type='str'>Notifications</widget_lblTest> <gui_conf_description_lb type='str'>Description</gui_conf_description_lb> <conf_lblEvent type='str'>Event</conf_lblEvent> <widget_lblControl type='str'>Control</widget_lblControl> <Increase type='str'>The battery level exceeded the threshold</Increase> - <conf_btnModify type='str'>Modify</conf_btnModify> + <full type='str'>The level of the batteries is full</full> <widget_lblChangeD type='str'>Drop and raise</widget_lblChangeD> - <lblLowThreshold type='str'>Lower limit</lblLowThreshold> - <gui_conf_remote_set_bt type='str'>Set</gui_conf_remote_set_bt> - <lblMotors type='str'>Disable measurement when the motors are running</lblMotors> + <gui_conf_delay_lb type='str'>Delay (sec)</gui_conf_delay_lb> <help_text type='str'>--The events: Two main types of events can take place, each containing various options: @@ -52,38 +47,41 @@ When this window is displayed, the events stored in the settings window are not notified. This window makes it possible to try various configurations and to add them in the settings table.</help_text> <end_of_charge type='str'>The load of the battery is finished</end_of_charge> + <conf_btnRemove type='str'>Remove</conf_btnRemove> <conf_lblChange type='str'>Change</conf_lblChange> <conf_lblBoth type='str'>Both</conf_lblBoth> <widget_lblBtnApply type='str'>Apply changes</widget_lblBtnApply> <widget_lblChangeU type='str'>Raise and drop</widget_lblChangeU> <widget_lblNotified type='str'>Notified</widget_lblNotified> - <conf_lblNotNotified type='str'>Not notified</conf_lblNotNotified> <gui_conf_version_lb type='str'>Version</gui_conf_version_lb> <gui_conf_update_title type='str'>Update</gui_conf_update_title> <conf_lblChangeU type='str'>Raise and drop</conf_lblChangeU> <gui_conf_cancel_bt type='str'>Cancel</gui_conf_cancel_bt> + <widget_lblBoth type='str'>Both direction</widget_lblBoth> + <gui_conf_rate_lb type='str'>Refresh rate :</gui_conf_rate_lb> <absolute_threshold_high type='str'>The batteries are full</absolute_threshold_high> + <conf_lblType type='str'>Type</conf_lblType> <mainscript type='str'>I've found the light !</mainscript> - <gui_conf_delay_lb type='str'>Delay (sec)</gui_conf_delay_lb> + <MainBehavior type='str'>Main behavior</MainBehavior> + <lblLowThreshold type='str'>Lower limit</lblLowThreshold> <plugged type='str'>Plugged</plugged> + <ChangeU type='str'>The battery level raised and dropped</ChangeU> <conf_btnBehavior type='str'>Clear path</conf_btnBehavior> <charge type='str'>and the batteries are recharging</charge> <gui_conf_about_title type='str'>About</gui_conf_about_title> <conf_lblChangeD type='str'>Drop and raise</conf_lblChangeD> <low type='str'>The level of the batteries is weak</low> - <conf_btnAdd type='str'>Add</conf_btnAdd> - <conf_lblBehavior type='str'>Behavior script</conf_lblBehavior> + <speaker_name type='str'>Ryan8k</speaker_name> <conf_lblSample type='str'>Samples</conf_lblSample> - <conf_lblType type='str'>Type</conf_lblType> + <charging type='str'>Charging</charging> <Change type='str'>The battery level changed</Change> - <conf_lblValue type='str'>Value (V)</conf_lblValue> <Both type='str'>The battery level reached the threshold</Both> - <full type='str'>The level of the batteries is full</full> + <conf_btnModify type='str'>Modify</conf_btnModify> <widget_lblEvent type='str'>Event</widget_lblEvent> <normal type='str'>The level of the batteries is good</normal> <widget_lblIncrease type='str'>Increasing</widget_lblIncrease> <widget_lblRaise type='str'>Raise</widget_lblRaise> - <gui_conf_rate_lb type='str'>Refresh rate :</gui_conf_rate_lb> + <conf_btnAdd type='str'>Add</conf_btnAdd> <on_battery type='str'>and I'm powered by the battery</on_battery> <widget_lblDecrease type='str'>Decreasing</widget_lblDecrease> <gui_conf_sample_lb type='str'>Sample :</gui_conf_sample_lb> @@ -91,31 +89,33 @@ <conf_lblNotifiedBehavior type='str'>Notified</conf_lblNotifiedBehavior> <gui_conf_author_lb type='str'>Author</gui_conf_author_lb> <widget_lblDrop type='str'>Drop</widget_lblDrop> - <conf_lblNotified type='str'>Notified ?</conf_lblNotified> - <widget_lblBoth type='str'>Both direction</widget_lblBoth> + <ChangeD type='str'>The battery level dropped and raised</ChangeD> + <absolute_threshold type='str'>Weak batteries </absolute_threshold> + <lblMotors type='str'>Disable measurement when the motors are running</lblMotors> <conf_lblDecrease type='str'>Decrease</conf_lblDecrease> + <lblHighThreshold type='str'>Upper limit</lblHighThreshold> <widget_lblValue type='str'>Value (V)</widget_lblValue> <conf_lblDefaultBehavior type='str'>Default behavior</conf_lblDefaultBehavior> - <speaker_name type='str'>Ryan8k</speaker_name> + <widget_lblDisplayThreshold type='str'>Display threshold on graph</widget_lblDisplayThreshold> + <conf_lblBehavior type='str'>Behavior script</conf_lblBehavior> <plug type='str'>and the power supply is plugged</plug> - <absolute_threshold type='str'>Weak batteries </absolute_threshold> + <gui_conf_remote_set_bt type='str'>Set</gui_conf_remote_set_bt> <widget_lblChange type='str'>Change</widget_lblChange> <name_to_read type='str'>Battery monitor</name_to_read> - <lblHighThreshold type='str'>Upper limit</lblHighThreshold> <gui_conf_window_title type='str'>Parameters</gui_conf_window_title> <Drop type='str'>The battery level dropped</Drop> <conf_lblDrop type='str'>Drop</conf_lblDrop> - <ChangeD type='str'>The battery level dropped and raised</ChangeD> + <conf_lblNotNotified type='str'>Not notified</conf_lblNotNotified> <Raise type='str'>The battery level raised</Raise> - <charging type='str'>Charging</charging> + <conf_lblNotified type='str'>Notified ?</conf_lblNotified> <widget_lblSet type='str'>Add to config</widget_lblSet> <Decrease type='str'>The battery level passed below the threshold</Decrease> - <widget_lblDisplayThreshold type='str'>Display threshold on graph</widget_lblDisplayThreshold> + <conf_lblValue type='str'>Value (V)</conf_lblValue> <conf_lblRate type='str'>Refresh rate</conf_lblRate> <widget_lblBehavior type='str'>Enable behavior script</widget_lblBehavior> - <MainBehavior type='str'>Main behavior</MainBehavior> - <ChangeU type='str'>The battery level raised and dropped</ChangeU> + <gui_conf_accept_bt type='str'>Accept</gui_conf_accept_bt> + <conf_lblTime type='str'>Time (sec.)</conf_lblTime> <conf_lblControl type='str'>Control</conf_lblControl> - <conf_btnRemove type='str'>Remove</conf_btnRemove> + <widget_lblTest type='str'>Notifications</widget_lblTest> <widget_lblThreshold type='str'>Threshold</widget_lblThreshold> </strings> Modified: software/gadgets/light_monitor/trunk/Light_monitor/Scripts/Python/GUI/widget/other.pyp =================================================================== --- software/gadgets/light_monitor/trunk/Light_monitor/Scripts/Python/GUI/widget/other.pyp 2007-11-09 15:39:21 UTC (rev 676) +++ software/gadgets/light_monitor/trunk/Light_monitor/Scripts/Python/GUI/widget/other.pyp 2007-11-09 15:48:35 UTC (rev 677) @@ -112,7 +112,6 @@ self.light_measure.light_search = True self.light_measure.light_value = 3000 self.light_measure.search_event = [_me.string('light1'), _me.string('light2'), _me.string('light3'),_me.string('light4'), _me.string('light5')] - print self.light_measure.search_event self.config_light_search() def on_btnDark_clicked(self, widget, *args): Modified: software/gadgets/light_monitor/trunk/Light_monitor/Scripts/Python/lightGraph_class.py =================================================================== --- software/gadgets/light_monitor/trunk/Light_monitor/Scripts/Python/lightGraph_class.py 2007-11-09 15:39:21 UTC (rev 676) +++ software/gadgets/light_monitor/trunk/Light_monitor/Scripts/Python/lightGraph_class.py 2007-11-09 15:48:35 UTC (rev 677) @@ -475,7 +475,6 @@ else: self.light_value = min(self.val_table[len(self.val_table) - self.count: len(self.val_table)]) self.light_value += 10 - print 'done' self.timer = 10 self.count = 0 @@ -506,8 +505,6 @@ def timer_control(self): self.timer -= 1 - print self.count - if self.count == 10: self.test_default_behavior(self.search_event[0]) if self.count == 40: Modified: software/gadgets/light_monitor/trunk/Light_monitor/about.xml =================================================================== --- software/gadgets/light_monitor/trunk/Light_monitor/about.xml 2007-11-09 15:39:21 UTC (rev 676) +++ software/gadgets/light_monitor/trunk/Light_monitor/about.xml 2007-11-09 15:48:35 UTC (rev 677) @@ -1,7 +1,7 @@ <?xml version='1.0' encoding='UTF-8'?> <about> + <gadget_author type='str'>Paul Rathgeb</gadget_author> + <gadget_version type='str'>0.0.1</gadget_version> <gadget_name type='str'>light_monitor</gadget_name> - <gadget_author type='str'>Paul Rathgeb</gadget_author> <gadget_description type='str'>Light monitor for tux droid</gadget_description> - <gadget_version type='str'>0.0.1</gadget_version> </about> Modified: software/gadgets/light_monitor/trunk/Light_monitor/settings.xml =================================================================== --- software/gadgets/light_monitor/trunk/Light_monitor/settings.xml 2007-11-09 15:39:21 UTC (rev 676) +++ software/gadgets/light_monitor/trunk/Light_monitor/settings.xml 2007-11-09 15:48:35 UTC (rev 677) @@ -10,12 +10,13 @@ <changeD_rad type='bool'>False</changeD_rad> <threshold type='float'>50.0</threshold> <decrease_rad type='bool'>False</decrease_rad> - <behavior_file_threshold type='NoneType'>None</behavior_file_threshold> + <Sample type='float'>500.0</Sample> <raise type='float'>10.0</raise> <changeU_rad type='bool'>False</changeU_rad> <threshold_notified type='bool'>False</threshold_notified> <config type='list'>[]</config> <behavior_file_change type='NoneType'>None</behavior_file_change> + <drop_rad type='bool'>True</drop_rad> <raise_rad type='bool'>False</raise_rad> <changeD type='float'>10.0</changeD> <drop_time type='float'>1.0</drop_time> @@ -23,10 +24,9 @@ <changeU type='float'>10.0</changeU> <raise_time type='float'>1.0</raise_time> <drop type='float'>10.0</drop> - <drop_rad type='bool'>True</drop_rad> <MainScript type='str'> </MainScript> - <Sample type='float'>500.0</Sample> + <behavior_file_threshold type='NoneType'>None</behavior_file_threshold> <threshold_chk type='bool'>False</threshold_chk> <Rate type='float'>0.1</Rate> <changeD_time type='float'>1.0</changeD_time> @@ -48,8 +48,11 @@ <language type='str'>en_US</language> <notified type='bool'>True</notified> <notify_delay type='int'>1</notify_delay> + <framework_version type='str'>0.0.0</framework_version> <menu_active type='bool'>True</menu_active> + <main_priority type='int'>4</main_priority> <speaker type='int'>3</speaker> <pitch type='int'>100</pitch> + <notify_priority type='int'>4</notify_priority> </general> </settings> Modified: software/gadgets/light_monitor/trunk/Light_monitor/strings.xml =================================================================== --- software/gadgets/light_monitor/trunk/Light_monitor/strings.xml 2007-11-09 15:39:21 UTC (rev 676) +++ software/gadgets/light_monitor/trunk/Light_monitor/strings.xml 2007-11-09 15:48:35 UTC (rev 677) @@ -1,6 +1,6 @@ <?xml version='1.0' encoding='UTF-8'?> <strings> - <gui_conf_remote_title type='str'>Control</gui_conf_remote_title> + <conf_lblSample type='str'>Samples</conf_lblSample> <conf_lblRaise type='str'>Raise</conf_lblRaise> <conf_lblEvent type='str'>Event</conf_lblEvent> <widget_lblControl type='str'>Control</widget_lblControl> @@ -40,7 +40,7 @@ In the test part with two buttons you can make Tux search for the light source or darkest spot. Two example scripts can be found in /tmp/Light_monitor/Data.</help_text> - <conf_lblSample type='str'>Samples</conf_lblSample> + <gui_conf_remote_title type='str'>Control</gui_conf_remote_title> <widget_lblLight type='str'>Search light</widget_lblLight> <conf_lblNotifiedBehavior type='str'>Notified</conf_lblNotifiedBehavior> <Change type='str'>The light level changed</Change> @@ -53,36 +53,34 @@ <widget_lblSet type='str'>Add to config</widget_lblSet> <conf_lblValue type='str'>Value (%)</conf_lblValue> <conf_lblTime type='str'>Time (sec.)</conf_lblTime> - <widget_lblTest type='str'>Notifications</widget_lblTest> + <widget_lblDark type='str'>Search darkness</widget_lblDark> <conf_lblThreshold type='str'>Threshold</conf_lblThreshold> <gui_conf_accept_bt type='str'>Accept</gui_conf_accept_bt> <power_supply type='str'>You must disconnect the power supply</power_supply> <widget_lblNotified type='str'>Notified</widget_lblNotified> <conf_btnBehavior type='str'>Clear path</conf_btnBehavior> <conf_lblType type='str'>Type</conf_lblType> - <Drop type='str'>The light level dropped</Drop> + <dark2 type='str'>And darker here.</dark2> <widget_lblEvent type='str'>Event</widget_lblEvent> - <dark4 type='str'>This is the darkest spot.</dark4> - <widget_lblBoth type='str'>Both direction</widget_lblBoth> + <widget_lblDecrease type='str'>Decreasing</widget_lblDecrease> + <gui_conf_update_title type='str'>Update</gui_conf_update_title> <gui_conf_remote_set_bt type='str'>Set</gui_conf_remote_set_bt> <search type='str'>I seek ...</search> <conf_lblNotNotified type='str'>Not notified</conf_lblNotNotified> <ChangeD type='str'>The light level dropped and raised</ChangeD> - <conf_lblNotified type='str'>Notified ?</conf_lblNotified> + <widget_lblThreshold type='str'>Threshold</widget_lblThreshold> <light2 type='str'>ow wait, even lighter here.</light2> <light3 type='str'>or here ...</light3> <light1 type='str'>Seeing more light over here.</light1> <light4 type='str'>I think the light is coming from this direction.</light4> <light5 type='str'>I can't find the direction of the light.</light5> <ChangeU type='str'>The light level raised and dropped</ChangeU> - <widget_lblThreshold type='str'>Threshold</widget_lblThreshold> <gui_conf_description_lb type='str'>Description</gui_conf_description_lb> - <widget_lblDark type='str'>Search darkness</widget_lblDark> <Increase type='str'>The light level exceeded the threshold</Increase> <conf_lblBoth type='str'>Both</conf_lblBoth> <conf_lblDecrease type='str'>Decrease</conf_lblDecrease> <gui_conf_version_lb type='str'>Version</gui_conf_version_lb> - <gui_conf_update_title type='str'>Update</gui_conf_update_title> + <widget_lblBoth type='str'>Both direction</widget_lblBoth> <widget_lblValue type='str'>Value (%)</widget_lblValue> <gui_conf_cancel_bt type='str'>Cancel</gui_conf_cancel_bt> <mainscript type='str'>I've found the light !</mainscript> @@ -90,6 +88,7 @@ <widget_lblIncrease type='str'>Increasing</widget_lblIncrease> <conf_btnAdd type='str'>Add</conf_btnAdd> <gui_conf_author_lb type='str'>Author</gui_conf_author_lb> + <widget_lblTest type='str'>Notifications</widget_lblTest> <conf_lblDrop type='str'>Drop</conf_lblDrop> <Raise type='str'>The light level raised</Raise> <Decrease type='str'>The light level passed below the threshold</Decrease> @@ -111,14 +110,15 @@ <conf_btnModify type='str'>Modify</conf_btnModify> <dark1 type='str'>It's pretty dark here.</dark1> <dark3 type='str'>hmm, but it's even more dark over here!</dark3> - <dark2 type='str'>And darker here.</dark2> + <Drop type='str'>The light level dropped</Drop> <dark5 type='str'>I can't find the darkest spot...</dark5> - <widget_lblDecrease type='str'>Decreasing</widget_lblDecrease> + <dark4 type='str'>This is the darkest spot.</dark4> <gui_conf_sample_lb type='str'>Sample :</gui_conf_sample_lb> <disable type='str'>Disable measurement when the eyes are closed</disable> <conf_lblDefaultBehavior type='str'>Default behavior</conf_lblDefaultBehavior> <speaker_name type='str'>Ryan8k</speaker_name> <widget_lblBehavior type='str'>Enable behavior script</widget_lblBehavior> + <conf_lblNotified type='str'>Notified ?</conf_lblNotified> <Threshold type='str'>The light reached the threshold</Threshold> <MainBehavior type='str'>Main behavior</MainBehavior> </strings> Modified: software/gadgets/light_monitor/trunk/Light_monitor.tgf =================================================================== (Binary files differ) |
From: jaguarondi <c2m...@c2...> - 2007-11-09 15:39:54
|
Author: jaguarondi Date: 2007-11-09 16:19:03 +0100 (Fri, 09 Nov 2007) New Revision: 673 Modified: firmware/tuxaudio/trunk/main.c firmware/tuxaudio/trunk/version.h firmware/tuxcore/trunk/global.c firmware/tuxcore/trunk/global.h firmware/tuxcore/trunk/version.h Log: * Added VARIATION and RELEASE_TYPE to versioning of tuxcore and tuxaudio. Modified: firmware/tuxaudio/trunk/main.c =================================================================== --- firmware/tuxaudio/trunk/main.c 2007-11-09 14:39:27 UTC (rev 672) +++ firmware/tuxaudio/trunk/main.c 2007-11-09 15:19:03 UTC (rev 673) @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -/* $Id: */ +/* $Id: $*/ #include <avr/io.h> #include <avr/interrupt.h> @@ -26,6 +26,7 @@ #include <avr/sleep.h> #include "common/defines.h" +#include "common/api.h" #include "init.h" #include "varis.h" #include "spi.h" @@ -48,14 +49,11 @@ #define CPU_NUMBER TUXAUDIO_CPU_NUM /* audio CPU */ const author_t author __attribute__ ((section("version.3"))) = -{ - AUTHOR_CMD, AUTHOR_ID, 0}; +{AUTHOR_CMD, AUTHOR_ID, VARIATION}; const revision_t svn_revision __attribute__ ((section("version.2"))) = -{ - REVISION_CMD, SVN_REV, SVN_STATUS}; +{REVISION_CMD, SVN_REV, RELEASE_TYPE}; const version_t tag_version __attribute__ ((section("version.1"))) = -{ - VERSION_CMD, CPU_VER_JOIN(CPU_NUMBER, VER_MAJOR), VER_MINOR, VER_UPDATE}; +{VERSION_CMD, CPU_VER_JOIN(CPU_NUMBER, VER_MAJOR), VER_MINOR, VER_UPDATE}; static uint8_t info_flg = 0; /* indicates if version information should be sent */ static uint8_t pre_sleep_delay = 0; /* set when sleep should be entered */ Modified: firmware/tuxaudio/trunk/version.h =================================================================== --- firmware/tuxaudio/trunk/version.h 2007-11-09 14:39:27 UTC (rev 672) +++ firmware/tuxaudio/trunk/version.h 2007-11-09 15:19:03 UTC (rev 673) @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -/* $Id: */ +/* $Id: $*/ #ifndef VERSION_H #define VERSION_H @@ -31,7 +31,14 @@ #define VER_MAJOR 0 #define VER_MINOR 3 #define VER_UPDATE 1 +/** RELEASE should be set to '1' prior to tagging a release, and reset + * immediately after. It's like appending (SVN_UNRELEASED) to a version number + * when equal to '0'. */ +#define RELEASE 0 -#define AUTHOR_ID 0 /* official release */ +#define AUTHOR_ID 0 /* official release */ +#define VARIATION 0 /* generic firmware */ +#define RELEASE_TYPE (SVN_STATUS | (RELEASE << 2)) + #endif /* VERSION_H */ Modified: firmware/tuxcore/trunk/global.c =================================================================== --- firmware/tuxcore/trunk/global.c 2007-11-09 14:39:27 UTC (rev 672) +++ firmware/tuxcore/trunk/global.c 2007-11-09 15:19:03 UTC (rev 673) @@ -53,11 +53,8 @@ #define CPU_NUMBER TUXCORE_CPU_NUM /* tuxcore CPU */ const author_t author __attribute__ ((section("version.3"))) = -{ -AUTHOR_CMD, AUTHOR_ID, 0}; +{AUTHOR_CMD, AUTHOR_ID, VARIATION}; const revision_t svn_revision __attribute__ ((section("version.2"))) = -{ -REVISION_CMD, SVN_REV, SVN_STATUS}; +{REVISION_CMD, SVN_REV, RELEASE_TYPE}; const version_t tag_version __attribute__ ((section("version.1"))) = -{ -VERSION_CMD, CPU_VER_JOIN(CPU_NUMBER, VER_MAJOR), VER_MINOR, VER_UPDATE}; +{VERSION_CMD, CPU_VER_JOIN(CPU_NUMBER, VER_MAJOR), VER_MINOR, VER_UPDATE}; Modified: firmware/tuxcore/trunk/global.h =================================================================== --- firmware/tuxcore/trunk/global.h 2007-11-09 14:39:27 UTC (rev 672) +++ firmware/tuxcore/trunk/global.h 2007-11-09 15:19:03 UTC (rev 673) @@ -233,4 +233,12 @@ extern struct condition_table cond_flags; +/* + * Version number + */ + +extern const author_t author; +extern const revision_t svn_revision; +extern const version_t tag_version; + #endif /* _GLOBAL_H_ */ Modified: firmware/tuxcore/trunk/version.h =================================================================== --- firmware/tuxcore/trunk/version.h 2007-11-09 14:39:27 UTC (rev 672) +++ firmware/tuxcore/trunk/version.h 2007-11-09 15:19:03 UTC (rev 673) @@ -31,11 +31,14 @@ #define VER_MAJOR 0 #define VER_MINOR 3 #define VER_UPDATE 1 +/** RELEASE should be set to '1' prior to tagging a release, and reset + * immediately after. It's like appending (SVN_UNRELEASED) to a version number + * when equal to '0'. */ +#define RELEASE 0 -#define AUTHOR_ID 0 /* official release */ +#define AUTHOR_ID 0 /* official release */ +#define VARIATION 0 /* generic firmware */ -extern const author_t author; -extern const revision_t svn_revision; -extern const version_t tag_version; +#define RELEASE_TYPE (SVN_STATUS | (RELEASE << 2)) #endif /* VERSION_H */ |
From: jaguarondi <c2m...@c2...> - 2007-11-09 15:39:54
|
Author: jaguarondi Date: 2007-11-09 15:39:27 +0100 (Fri, 09 Nov 2007) New Revision: 672 Modified: daemon/trunk/libs/USBDaemon_status_table.c daemon/trunk/libs/USBDaemon_usb.c Log: * Check that the CPU number returned by the INFO command is valid. Modified: daemon/trunk/libs/USBDaemon_status_table.c =================================================================== --- daemon/trunk/libs/USBDaemon_status_table.c 2007-11-09 14:33:01 UTC (rev 671) +++ daemon/trunk/libs/USBDaemon_status_table.c 2007-11-09 14:39:27 UTC (rev 672) @@ -41,7 +41,7 @@ unsigned char CMD_status = 0; unsigned char pong_received; unsigned char cmd_status_flag; -static unsigned char current_cpu; +static int current_cpu = INVALID_CPU_NUM; static unsigned char last_remote_key = 0xFF; static unsigned char last_toggle_key = 0xFF; unsigned char sound_flash_count = 0; @@ -66,13 +66,22 @@ { struct firmware_version_t *firmware; - /* Select the corresponding CPU entry in the status table. */ - firmware = &tux_status.firmware[current_cpu]; /* When returning 'information', the firmware starts by sending this - * version information which includes the cpu number (id). This number is + * version information which includes the CPU number. This number is * used to determine which CPU is sending the upcoming information data * like revision and author. So we should save that number. */ current_cpu = CPU_VER_CPU(data[1]); + /* Check if the value received is a valid CPU number. */ + if ((current_cpu < 0) || (current_cpu > 4)) + { + log_error("received an INVALID CPU number: %d", current_cpu); + /* Mark current_cpu as invalid to discard any new information data + * until a valid CPU number is received. */ + current_cpu = INVALID_CPU_NUM; + return; + } + /* Select the corresponding CPU entry in the status table. */ + firmware = &tux_status.firmware[current_cpu]; /* Save major, minor and update numbers. */ firmware->version_major = CPU_VER_MAJ(data[1]); firmware->version_minor = data[2]; @@ -83,12 +92,15 @@ firmware->version_update); } -/** +/** * Update tux_status with the given firmware revision data. */ static void update_firmware_revision(const unsigned char *data) { struct firmware_version_t *firmware; + /* Check that a valid CPU number has been received. */ + if (current_cpu == INVALID_CPU_NUM) + return; /* Select the corresponding CPU entry in the status table. */ firmware = &tux_status.firmware[current_cpu]; /* Save revision number. */ @@ -103,6 +115,9 @@ static void update_firmware_author(const unsigned char *data) { struct firmware_version_t *firmware; + /* Check that a valid CPU number has been received. */ + if (current_cpu == INVALID_CPU_NUM) + return; /* Select the corresponding CPU entry in the status table. */ firmware = &tux_status.firmware[current_cpu]; /* Save author. */ @@ -719,7 +734,19 @@ tcp_frame[2] = DATA_TP_RSP; tcp_frame[3] = SUBDATA_TP_STATUS; - DONGLE_status = new_status[0]; + /* RF connection change. */ + if (new_status[0] != DONGLE_status) + { + DONGLE_status = new_status[0]; + if (DONGLE_status == 1) + /* RF connected */ + { + } + else + /* RF disconnected */ + { + } + } /*RF status change */ if (RF_status != new_status[1]) Modified: daemon/trunk/libs/USBDaemon_usb.c =================================================================== --- daemon/trunk/libs/USBDaemon_usb.c 2007-11-09 14:33:01 UTC (rev 671) +++ daemon/trunk/libs/USBDaemon_usb.c 2007-11-09 14:39:27 UTC (rev 672) @@ -140,7 +140,7 @@ while (!tux_device); /* Old firmware should be discarded here */ - if (tux_device->descriptor.bcdDevice < 0x100) + if (tux_device->descriptor.bcdDevice < 0x030) { log_error("Your dongle firmware is too old.\n" "This version is not compatible with this daemon, please \ |
From: jaguarondi <c2m...@c2...> - 2007-11-09 15:39:28
|
Author: jaguarondi Date: 2007-11-09 16:39:21 +0100 (Fri, 09 Nov 2007) New Revision: 676 Modified: firmware/tuxaudio/trunk/AT26F004.c firmware/tuxaudio/trunk/AT26F004.h firmware/tuxaudio/trunk/PC_communication.c firmware/tuxaudio/trunk/PC_communication.h firmware/tuxaudio/trunk/bootloader.c firmware/tuxaudio/trunk/communication.c firmware/tuxaudio/trunk/communication.h firmware/tuxaudio/trunk/config.c firmware/tuxaudio/trunk/config.h firmware/tuxaudio/trunk/fifo.c firmware/tuxaudio/trunk/fifo.h firmware/tuxaudio/trunk/flash.c firmware/tuxaudio/trunk/flash.h firmware/tuxaudio/trunk/hardware.h firmware/tuxaudio/trunk/i2c.c firmware/tuxaudio/trunk/i2c.h firmware/tuxaudio/trunk/init.c firmware/tuxaudio/trunk/init.h firmware/tuxaudio/trunk/interrupt.c firmware/tuxaudio/trunk/main.c firmware/tuxaudio/trunk/pwm.c firmware/tuxaudio/trunk/spi.c firmware/tuxaudio/trunk/spi.h firmware/tuxaudio/trunk/svnrev.tmpl.h firmware/tuxaudio/trunk/varis.c firmware/tuxaudio/trunk/varis.h firmware/tuxaudio/trunk/version.h Log: * Oops, wrong keyword for svn:keywords. Modified: firmware/tuxaudio/trunk/AT26F004.c =================================================================== --- firmware/tuxaudio/trunk/AT26F004.c 2007-11-09 15:36:26 UTC (rev 675) +++ firmware/tuxaudio/trunk/AT26F004.c 2007-11-09 15:39:21 UTC (rev 676) @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -/* $Id: $ */ +/* $Id$ */ #include <avr/io.h> #include "AT26F004.h" Property changes on: firmware/tuxaudio/trunk/AT26F004.c ___________________________________________________________________ Name: svn:keyword - Id Name: svn:keywords + Id Modified: firmware/tuxaudio/trunk/AT26F004.h =================================================================== --- firmware/tuxaudio/trunk/AT26F004.h 2007-11-09 15:36:26 UTC (rev 675) +++ firmware/tuxaudio/trunk/AT26F004.h 2007-11-09 15:39:21 UTC (rev 676) @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -/* $Id: $ */ +/* $Id$ */ /** \defgroup at26f004 AT26F004 flash memory \ingroup at26f004 Property changes on: firmware/tuxaudio/trunk/AT26F004.h ___________________________________________________________________ Name: svn:keyword - Id Name: svn:keywords + Id Modified: firmware/tuxaudio/trunk/PC_communication.c =================================================================== --- firmware/tuxaudio/trunk/PC_communication.c 2007-11-09 15:36:26 UTC (rev 675) +++ firmware/tuxaudio/trunk/PC_communication.c 2007-11-09 15:39:21 UTC (rev 676) @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -/* $Id: $ */ +/* $Id$ */ #include <avr/io.h> #include <avr/interrupt.h> Property changes on: firmware/tuxaudio/trunk/PC_communication.c ___________________________________________________________________ Name: svn:keyword - Id Name: svn:keywords + Id Modified: firmware/tuxaudio/trunk/PC_communication.h =================================================================== --- firmware/tuxaudio/trunk/PC_communication.h 2007-11-09 15:36:26 UTC (rev 675) +++ firmware/tuxaudio/trunk/PC_communication.h 2007-11-09 15:39:21 UTC (rev 676) @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -/* $Id: $ */ +/* $Id$ */ #ifndef PC_COMMUNICATION_H #define PC_COMMUNICATION_H Property changes on: firmware/tuxaudio/trunk/PC_communication.h ___________________________________________________________________ Name: svn:keyword - Id Name: svn:keywords + Id Modified: firmware/tuxaudio/trunk/bootloader.c =================================================================== --- firmware/tuxaudio/trunk/bootloader.c 2007-11-09 15:36:26 UTC (rev 675) +++ firmware/tuxaudio/trunk/bootloader.c 2007-11-09 15:39:21 UTC (rev 676) @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -/* $Id: $ */ +/* $Id$ */ #include <avr/io.h> #include <avr/boot.h> Property changes on: firmware/tuxaudio/trunk/bootloader.c ___________________________________________________________________ Name: svn:keyword - Id Name: svn:keywords + Id Modified: firmware/tuxaudio/trunk/communication.c =================================================================== --- firmware/tuxaudio/trunk/communication.c 2007-11-09 15:36:26 UTC (rev 675) +++ firmware/tuxaudio/trunk/communication.c 2007-11-09 15:39:21 UTC (rev 676) @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -/* $Id: $ */ +/* $Id$ */ #include <avr/io.h> #include <avr/interrupt.h> Property changes on: firmware/tuxaudio/trunk/communication.c ___________________________________________________________________ Name: svn:keyword - Id Name: svn:keywords + Id Modified: firmware/tuxaudio/trunk/communication.h =================================================================== --- firmware/tuxaudio/trunk/communication.h 2007-11-09 15:36:26 UTC (rev 675) +++ firmware/tuxaudio/trunk/communication.h 2007-11-09 15:39:21 UTC (rev 676) @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -/* $Id: $ */ +/* $Id$ */ #ifndef COMMUNICATION_H #define COMMUNICATION_H Property changes on: firmware/tuxaudio/trunk/communication.h ___________________________________________________________________ Name: svn:keyword - Id Name: svn:keywords + Id Modified: firmware/tuxaudio/trunk/config.c =================================================================== --- firmware/tuxaudio/trunk/config.c 2007-11-09 15:36:26 UTC (rev 675) +++ firmware/tuxaudio/trunk/config.c 2007-11-09 15:39:21 UTC (rev 676) @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -/* $Id: $ */ +/* $Id$ */ #include <avr/eeprom.h> #include "common/config.h" Property changes on: firmware/tuxaudio/trunk/config.c ___________________________________________________________________ Name: svn:keyword - Id Name: svn:keywords + Id Modified: firmware/tuxaudio/trunk/config.h =================================================================== --- firmware/tuxaudio/trunk/config.h 2007-11-09 15:36:26 UTC (rev 675) +++ firmware/tuxaudio/trunk/config.h 2007-11-09 15:39:21 UTC (rev 676) @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -/* $Id: $ */ +/* $Id$ */ #ifndef CONFIG_H #define CONFIG_H Property changes on: firmware/tuxaudio/trunk/config.h ___________________________________________________________________ Name: svn:keyword - Id Name: svn:keywords + Id Modified: firmware/tuxaudio/trunk/fifo.c =================================================================== --- firmware/tuxaudio/trunk/fifo.c 2007-11-09 15:36:26 UTC (rev 675) +++ firmware/tuxaudio/trunk/fifo.c 2007-11-09 15:39:21 UTC (rev 676) @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -/* $Id: $ */ +/* $Id$ */ #include <avr/io.h> #include <inttypes.h> Property changes on: firmware/tuxaudio/trunk/fifo.c ___________________________________________________________________ Name: svn:keyword - Id Name: svn:keywords + Id Modified: firmware/tuxaudio/trunk/fifo.h =================================================================== --- firmware/tuxaudio/trunk/fifo.h 2007-11-09 15:36:26 UTC (rev 675) +++ firmware/tuxaudio/trunk/fifo.h 2007-11-09 15:39:21 UTC (rev 676) @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -/* $Id: $ */ +/* $Id$ */ #ifndef FIFO_H #define FIFO_H Property changes on: firmware/tuxaudio/trunk/fifo.h ___________________________________________________________________ Name: svn:keyword - Id Name: svn:keywords + Id Modified: firmware/tuxaudio/trunk/flash.c =================================================================== --- firmware/tuxaudio/trunk/flash.c 2007-11-09 15:36:26 UTC (rev 675) +++ firmware/tuxaudio/trunk/flash.c 2007-11-09 15:39:21 UTC (rev 676) @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -/* $Id: $ */ +/* $Id$ */ #include <avr/io.h> #include <avr/interrupt.h> Property changes on: firmware/tuxaudio/trunk/flash.c ___________________________________________________________________ Name: svn:keyword - Id Name: svn:keywords + Id Modified: firmware/tuxaudio/trunk/flash.h =================================================================== --- firmware/tuxaudio/trunk/flash.h 2007-11-09 15:36:26 UTC (rev 675) +++ firmware/tuxaudio/trunk/flash.h 2007-11-09 15:39:21 UTC (rev 676) @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -/* $Id: $ */ +/* $Id$ */ /** \defgroup flash Flash memory \ingroup flash Property changes on: firmware/tuxaudio/trunk/flash.h ___________________________________________________________________ Name: svn:keyword - Id Name: svn:keywords + Id Modified: firmware/tuxaudio/trunk/hardware.h =================================================================== --- firmware/tuxaudio/trunk/hardware.h 2007-11-09 15:36:26 UTC (rev 675) +++ firmware/tuxaudio/trunk/hardware.h 2007-11-09 15:39:21 UTC (rev 676) @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -/* $Id: $ */ +/* $Id$ */ #include <avr/io.h> Property changes on: firmware/tuxaudio/trunk/hardware.h ___________________________________________________________________ Name: svn:keyword - Id Name: svn:keywords + Id Modified: firmware/tuxaudio/trunk/i2c.c =================================================================== --- firmware/tuxaudio/trunk/i2c.c 2007-11-09 15:36:26 UTC (rev 675) +++ firmware/tuxaudio/trunk/i2c.c 2007-11-09 15:39:21 UTC (rev 676) @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -/* $Id: $ */ +/* $Id$ */ #include <avr/io.h> #include <avr/interrupt.h> Property changes on: firmware/tuxaudio/trunk/i2c.c ___________________________________________________________________ Name: svn:keyword - Id Name: svn:keywords + Id Modified: firmware/tuxaudio/trunk/i2c.h =================================================================== --- firmware/tuxaudio/trunk/i2c.h 2007-11-09 15:36:26 UTC (rev 675) +++ firmware/tuxaudio/trunk/i2c.h 2007-11-09 15:39:21 UTC (rev 676) @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -/* $Id: $ */ +/* $Id$ */ #ifndef I2C_H #define I2C_H Property changes on: firmware/tuxaudio/trunk/i2c.h ___________________________________________________________________ Name: svn:keyword - Id Name: svn:keywords + Id Modified: firmware/tuxaudio/trunk/init.c =================================================================== --- firmware/tuxaudio/trunk/init.c 2007-11-09 15:36:26 UTC (rev 675) +++ firmware/tuxaudio/trunk/init.c 2007-11-09 15:39:21 UTC (rev 676) @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -/* $Id: $ */ +/* $Id$ */ #include <avr/io.h> #include "init.h" Property changes on: firmware/tuxaudio/trunk/init.c ___________________________________________________________________ Name: svn:keyword - Id Name: svn:keywords + Id Modified: firmware/tuxaudio/trunk/init.h =================================================================== --- firmware/tuxaudio/trunk/init.h 2007-11-09 15:36:26 UTC (rev 675) +++ firmware/tuxaudio/trunk/init.h 2007-11-09 15:39:21 UTC (rev 676) @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -/* $Id: $ */ +/* $Id$ */ #ifndef INIT_H #define INIT_H Property changes on: firmware/tuxaudio/trunk/init.h ___________________________________________________________________ Name: svn:keyword - Id Name: svn:keywords + Id Modified: firmware/tuxaudio/trunk/interrupt.c =================================================================== --- firmware/tuxaudio/trunk/interrupt.c 2007-11-09 15:36:26 UTC (rev 675) +++ firmware/tuxaudio/trunk/interrupt.c 2007-11-09 15:39:21 UTC (rev 676) @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -/* $Id: $ */ +/* $Id$ */ #include <avr/io.h> #include <avr/interrupt.h> Property changes on: firmware/tuxaudio/trunk/interrupt.c ___________________________________________________________________ Name: svn:keyword - Id Name: svn:keywords + Id Modified: firmware/tuxaudio/trunk/main.c =================================================================== --- firmware/tuxaudio/trunk/main.c 2007-11-09 15:36:26 UTC (rev 675) +++ firmware/tuxaudio/trunk/main.c 2007-11-09 15:39:21 UTC (rev 676) @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -/* $Id: $ */ +/* $Id$ */ #include <avr/io.h> #include <avr/interrupt.h> Property changes on: firmware/tuxaudio/trunk/main.c ___________________________________________________________________ Name: svn:keyword - Id Name: svn:keywords + Id Property changes on: firmware/tuxaudio/trunk/pwm.c ___________________________________________________________________ Name: svn:keyword - Id Name: svn:keywords + Id Modified: firmware/tuxaudio/trunk/spi.c =================================================================== --- firmware/tuxaudio/trunk/spi.c 2007-11-09 15:36:26 UTC (rev 675) +++ firmware/tuxaudio/trunk/spi.c 2007-11-09 15:39:21 UTC (rev 676) @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -/* $Id: $ */ +/* $Id$ */ #include <avr/io.h> #include "spi.h" Property changes on: firmware/tuxaudio/trunk/spi.c ___________________________________________________________________ Name: svn:keyword - Id Name: svn:keywords + Id Modified: firmware/tuxaudio/trunk/spi.h =================================================================== --- firmware/tuxaudio/trunk/spi.h 2007-11-09 15:36:26 UTC (rev 675) +++ firmware/tuxaudio/trunk/spi.h 2007-11-09 15:39:21 UTC (rev 676) @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -/* $Id: $ */ +/* $Id$ */ #ifndef SPI_H #define SPI_H Property changes on: firmware/tuxaudio/trunk/spi.h ___________________________________________________________________ Name: svn:keyword - Id Name: svn:keywords + Id Modified: firmware/tuxaudio/trunk/svnrev.tmpl.h =================================================================== --- firmware/tuxaudio/trunk/svnrev.tmpl.h 2007-11-09 15:36:26 UTC (rev 675) +++ firmware/tuxaudio/trunk/svnrev.tmpl.h 2007-11-09 15:39:21 UTC (rev 676) @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -/* $Id: $ */ +/* $Id$ */ /* This file is a template to generate svnrev.h automatically. * SubWCRev performs keyword susbstitution whith SVN information. Property changes on: firmware/tuxaudio/trunk/svnrev.tmpl.h ___________________________________________________________________ Name: svn:keyword - Id Name: svn:keywords + Id Modified: firmware/tuxaudio/trunk/varis.c =================================================================== --- firmware/tuxaudio/trunk/varis.c 2007-11-09 15:36:26 UTC (rev 675) +++ firmware/tuxaudio/trunk/varis.c 2007-11-09 15:39:21 UTC (rev 676) @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -/* $Id: $ */ +/* $Id$ */ #include <avr/io.h> #include "fifo.h" Property changes on: firmware/tuxaudio/trunk/varis.c ___________________________________________________________________ Name: svn:keyword - Id Name: svn:keywords + Id Modified: firmware/tuxaudio/trunk/varis.h =================================================================== --- firmware/tuxaudio/trunk/varis.h 2007-11-09 15:36:26 UTC (rev 675) +++ firmware/tuxaudio/trunk/varis.h 2007-11-09 15:39:21 UTC (rev 676) @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -/* $Id: $ */ +/* $Id$ */ #ifndef VARIS_H #define VARIS_H Property changes on: firmware/tuxaudio/trunk/varis.h ___________________________________________________________________ Name: svn:keyword - Id Name: svn:keywords + Id Modified: firmware/tuxaudio/trunk/version.h =================================================================== --- firmware/tuxaudio/trunk/version.h 2007-11-09 15:36:26 UTC (rev 675) +++ firmware/tuxaudio/trunk/version.h 2007-11-09 15:39:21 UTC (rev 676) @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -/* $Id: $ */ +/* $Id$ */ #ifndef VERSION_H #define VERSION_H Property changes on: firmware/tuxaudio/trunk/version.h ___________________________________________________________________ Name: svn:keyword - Id Name: svn:keywords + Id |
From: jaguarondi <c2m...@c2...> - 2007-11-09 15:36:46
|
Author: jaguarondi Date: 2007-11-09 16:36:26 +0100 (Fri, 09 Nov 2007) New Revision: 675 Modified: firmware/tuxaudio/trunk/AT26F004.c firmware/tuxaudio/trunk/AT26F004.h firmware/tuxaudio/trunk/PC_communication.c firmware/tuxaudio/trunk/PC_communication.h firmware/tuxaudio/trunk/bootloader.c firmware/tuxaudio/trunk/communication.c firmware/tuxaudio/trunk/communication.h firmware/tuxaudio/trunk/config.c firmware/tuxaudio/trunk/config.h firmware/tuxaudio/trunk/fifo.c firmware/tuxaudio/trunk/fifo.h firmware/tuxaudio/trunk/flash.h firmware/tuxaudio/trunk/hardware.h firmware/tuxaudio/trunk/i2c.c firmware/tuxaudio/trunk/i2c.h firmware/tuxaudio/trunk/init.c firmware/tuxaudio/trunk/init.h firmware/tuxaudio/trunk/interrupt.c firmware/tuxaudio/trunk/main.c firmware/tuxaudio/trunk/svnrev.tmpl.h firmware/tuxaudio/trunk/varis.c firmware/tuxaudio/trunk/varis.h firmware/tuxaudio/trunk/version.h Log: * Cleanup. Property changes on: firmware/tuxaudio/trunk/AT26F004.c ___________________________________________________________________ Name: svn:keyword + Id Name: svn:eol-style + native Modified: firmware/tuxaudio/trunk/AT26F004.h =================================================================== --- firmware/tuxaudio/trunk/AT26F004.h 2007-11-09 15:23:35 UTC (rev 674) +++ firmware/tuxaudio/trunk/AT26F004.h 2007-11-09 15:36:26 UTC (rev 675) @@ -17,6 +17,8 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +/* $Id: $ */ + /** \defgroup at26f004 AT26F004 flash memory \ingroup at26f004 Property changes on: firmware/tuxaudio/trunk/AT26F004.h ___________________________________________________________________ Name: svn:keyword + Id Name: svn:eol-style + native Modified: firmware/tuxaudio/trunk/PC_communication.c =================================================================== --- firmware/tuxaudio/trunk/PC_communication.c 2007-11-09 15:23:35 UTC (rev 674) +++ firmware/tuxaudio/trunk/PC_communication.c 2007-11-09 15:36:26 UTC (rev 675) @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -/* $Id: */ +/* $Id: $ */ #include <avr/io.h> #include <avr/interrupt.h> Property changes on: firmware/tuxaudio/trunk/PC_communication.c ___________________________________________________________________ Name: svn:keyword + Id Name: svn:eol-style + native Property changes on: firmware/tuxaudio/trunk/PC_communication.h ___________________________________________________________________ Name: svn:keyword + Id Name: svn:eol-style + native Modified: firmware/tuxaudio/trunk/bootloader.c =================================================================== --- firmware/tuxaudio/trunk/bootloader.c 2007-11-09 15:23:35 UTC (rev 674) +++ firmware/tuxaudio/trunk/bootloader.c 2007-11-09 15:36:26 UTC (rev 675) @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -/* $Id: */ +/* $Id: $ */ #include <avr/io.h> #include <avr/boot.h> Modified: firmware/tuxaudio/trunk/communication.c =================================================================== --- firmware/tuxaudio/trunk/communication.c 2007-11-09 15:23:35 UTC (rev 674) +++ firmware/tuxaudio/trunk/communication.c 2007-11-09 15:36:26 UTC (rev 675) @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -/* $Id: */ +/* $Id: $ */ #include <avr/io.h> #include <avr/interrupt.h> Modified: firmware/tuxaudio/trunk/communication.h =================================================================== --- firmware/tuxaudio/trunk/communication.h 2007-11-09 15:23:35 UTC (rev 674) +++ firmware/tuxaudio/trunk/communication.h 2007-11-09 15:36:26 UTC (rev 675) @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -/* $Id: */ +/* $Id: $ */ #ifndef COMMUNICATION_H #define COMMUNICATION_H Modified: firmware/tuxaudio/trunk/config.c =================================================================== --- firmware/tuxaudio/trunk/config.c 2007-11-09 15:23:35 UTC (rev 674) +++ firmware/tuxaudio/trunk/config.c 2007-11-09 15:36:26 UTC (rev 675) @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -/* $Id: */ +/* $Id: $ */ #include <avr/eeprom.h> #include "common/config.h" Modified: firmware/tuxaudio/trunk/config.h =================================================================== --- firmware/tuxaudio/trunk/config.h 2007-11-09 15:23:35 UTC (rev 674) +++ firmware/tuxaudio/trunk/config.h 2007-11-09 15:36:26 UTC (rev 675) @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -/* $Id: */ +/* $Id: $ */ #ifndef CONFIG_H #define CONFIG_H Modified: firmware/tuxaudio/trunk/fifo.c =================================================================== --- firmware/tuxaudio/trunk/fifo.c 2007-11-09 15:23:35 UTC (rev 674) +++ firmware/tuxaudio/trunk/fifo.c 2007-11-09 15:36:26 UTC (rev 675) @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -/* $Id: */ +/* $Id: $ */ #include <avr/io.h> #include <inttypes.h> Modified: firmware/tuxaudio/trunk/fifo.h =================================================================== --- firmware/tuxaudio/trunk/fifo.h 2007-11-09 15:23:35 UTC (rev 674) +++ firmware/tuxaudio/trunk/fifo.h 2007-11-09 15:36:26 UTC (rev 675) @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -/* $Id: */ +/* $Id: $ */ #ifndef FIFO_H #define FIFO_H Modified: firmware/tuxaudio/trunk/flash.h =================================================================== --- firmware/tuxaudio/trunk/flash.h 2007-11-09 15:23:35 UTC (rev 674) +++ firmware/tuxaudio/trunk/flash.h 2007-11-09 15:36:26 UTC (rev 675) @@ -17,9 +17,9 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -/* $Id: */ +/* $Id: $ */ -/** \defgroup flash Flash memory +/** \defgroup flash Flash memory \ingroup flash This module control all the functions to read / write the flash memory. Modified: firmware/tuxaudio/trunk/hardware.h =================================================================== --- firmware/tuxaudio/trunk/hardware.h 2007-11-09 15:23:35 UTC (rev 674) +++ firmware/tuxaudio/trunk/hardware.h 2007-11-09 15:36:26 UTC (rev 675) @@ -17,6 +17,8 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +/* $Id: $ */ + #include <avr/io.h> #ifndef HARDWARE_H Property changes on: firmware/tuxaudio/trunk/hardware.h ___________________________________________________________________ Name: svn:keyword + Id Name: svn:eol-style + native Modified: firmware/tuxaudio/trunk/i2c.c =================================================================== --- firmware/tuxaudio/trunk/i2c.c 2007-11-09 15:23:35 UTC (rev 674) +++ firmware/tuxaudio/trunk/i2c.c 2007-11-09 15:36:26 UTC (rev 675) @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -/* $Id: */ +/* $Id: $ */ #include <avr/io.h> #include <avr/interrupt.h> Modified: firmware/tuxaudio/trunk/i2c.h =================================================================== --- firmware/tuxaudio/trunk/i2c.h 2007-11-09 15:23:35 UTC (rev 674) +++ firmware/tuxaudio/trunk/i2c.h 2007-11-09 15:36:26 UTC (rev 675) @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -/* $Id: */ +/* $Id: $ */ #ifndef I2C_H #define I2C_H Modified: firmware/tuxaudio/trunk/init.c =================================================================== --- firmware/tuxaudio/trunk/init.c 2007-11-09 15:23:35 UTC (rev 674) +++ firmware/tuxaudio/trunk/init.c 2007-11-09 15:36:26 UTC (rev 675) @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -/* $Id: */ +/* $Id: $ */ #include <avr/io.h> #include "init.h" Modified: firmware/tuxaudio/trunk/init.h =================================================================== --- firmware/tuxaudio/trunk/init.h 2007-11-09 15:23:35 UTC (rev 674) +++ firmware/tuxaudio/trunk/init.h 2007-11-09 15:36:26 UTC (rev 675) @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -/* $Id: */ +/* $Id: $ */ #ifndef INIT_H #define INIT_H Modified: firmware/tuxaudio/trunk/interrupt.c =================================================================== --- firmware/tuxaudio/trunk/interrupt.c 2007-11-09 15:23:35 UTC (rev 674) +++ firmware/tuxaudio/trunk/interrupt.c 2007-11-09 15:36:26 UTC (rev 675) @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -/* $Id: */ +/* $Id: $ */ #include <avr/io.h> #include <avr/interrupt.h> Modified: firmware/tuxaudio/trunk/main.c =================================================================== --- firmware/tuxaudio/trunk/main.c 2007-11-09 15:23:35 UTC (rev 674) +++ firmware/tuxaudio/trunk/main.c 2007-11-09 15:36:26 UTC (rev 675) @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -/* $Id: $*/ +/* $Id: $ */ #include <avr/io.h> #include <avr/interrupt.h> @@ -39,7 +39,7 @@ #include "PC_communication.h" /* XXX AT26F004.h must be included here read_data function is used in - * send_info(). + * send_info(). */ #include "AT26F004.h" @@ -339,7 +339,6 @@ audioIntParser(); sendCommands(); /* Send commands on I2C */ - /* Send information to the computer. */ @@ -349,7 +348,6 @@ /* Sleep mode */ if (pre_sleep_delay == 1) sleep(); - } } Modified: firmware/tuxaudio/trunk/svnrev.tmpl.h =================================================================== --- firmware/tuxaudio/trunk/svnrev.tmpl.h 2007-11-09 15:23:35 UTC (rev 674) +++ firmware/tuxaudio/trunk/svnrev.tmpl.h 2007-11-09 15:36:26 UTC (rev 675) @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -/* $Id: */ +/* $Id: $ */ /* This file is a template to generate svnrev.h automatically. * SubWCRev performs keyword susbstitution whith SVN information. Modified: firmware/tuxaudio/trunk/varis.c =================================================================== --- firmware/tuxaudio/trunk/varis.c 2007-11-09 15:23:35 UTC (rev 674) +++ firmware/tuxaudio/trunk/varis.c 2007-11-09 15:36:26 UTC (rev 675) @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -/* $Id: */ +/* $Id: $ */ #include <avr/io.h> #include "fifo.h" Modified: firmware/tuxaudio/trunk/varis.h =================================================================== --- firmware/tuxaudio/trunk/varis.h 2007-11-09 15:23:35 UTC (rev 674) +++ firmware/tuxaudio/trunk/varis.h 2007-11-09 15:36:26 UTC (rev 675) @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -/* $Id: */ +/* $Id: $ */ #ifndef VARIS_H #define VARIS_H Modified: firmware/tuxaudio/trunk/version.h =================================================================== --- firmware/tuxaudio/trunk/version.h 2007-11-09 15:23:35 UTC (rev 674) +++ firmware/tuxaudio/trunk/version.h 2007-11-09 15:36:26 UTC (rev 675) @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -/* $Id: $*/ +/* $Id: $ */ #ifndef VERSION_H #define VERSION_H |
From: jaguarondi <c2m...@c2...> - 2007-11-09 09:19:13
|
Author: jaguarondi Date: 2007-11-09 10:19:07 +0100 (Fri, 09 Nov 2007) New Revision: 668 Modified: daemon/trunk/libs/USBDaemon_command_tux.c Log: * Status of the right led was missing, it was never returned when requested. Modified: daemon/trunk/libs/USBDaemon_command_tux.c =================================================================== --- daemon/trunk/libs/USBDaemon_command_tux.c 2007-11-08 15:45:41 UTC (rev 667) +++ daemon/trunk/libs/USBDaemon_command_tux.c 2007-11-09 09:19:07 UTC (rev 668) @@ -566,6 +566,9 @@ case DATA_STATUS_LEFT_BLUE_LED: result[1] = portc.bits.PB2; break; + case DATA_STATUS_RIGHT_BLUE_LED: + result[1] = portc.bits.PB3; + break; case DATA_STATUS_HEAD_MOTOR_FOR_MOUTH: result[1] = portd.bits.PB1; break; |
From: jaguarondi <c2m...@c2...> - 2007-11-08 15:45:49
|
Author: jaguarondi Date: 2007-11-08 16:45:41 +0100 (Thu, 08 Nov 2007) New Revision: 667 Modified: firmware/tuxcore/trunk/doc/Doxyfile Log: * Added very nice looking graphs on the firmware doc, see by yourself at http://doc.tuxisalive.com/tuxcore/config_8h.html You can even click on the dependencies to get to their documentation. Modified: firmware/tuxcore/trunk/doc/Doxyfile =================================================================== --- firmware/tuxcore/trunk/doc/Doxyfile 2007-11-08 14:46:53 UTC (rev 666) +++ firmware/tuxcore/trunk/doc/Doxyfile 2007-11-08 15:45:41 UTC (rev 667) @@ -1141,7 +1141,7 @@ # toolkit from AT&T and Lucent Bell Labs. The other options in this section # have no effect if this option is set to NO (the default) -HAVE_DOT = NO +HAVE_DOT = YES # If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen # will generate a graph for each documented class showing the direct and |
From: jaguarondi <c2m...@c2...> - 2007-11-08 14:46:52
|
Author: jaguarondi Date: 2007-11-08 15:46:53 +0100 (Thu, 08 Nov 2007) New Revision: 666 Modified: firmware/tuxcore/trunk/svnrev.tmpl.h Log: * Typo in SVN_REV. Modified: firmware/tuxcore/trunk/svnrev.tmpl.h =================================================================== --- firmware/tuxcore/trunk/svnrev.tmpl.h 2007-11-08 14:19:22 UTC (rev 665) +++ firmware/tuxcore/trunk/svnrev.tmpl.h 2007-11-08 14:46:53 UTC (rev 666) @@ -23,8 +23,8 @@ * SubWCRev performs keyword susbstitution whith SVN information. */ -#ifndef SVNREH_H -#define SVNREV_H +#ifndef _SVNREV_H_ +#define _SVNREV_H_ #define SVN_REV $WCREV$ #define SVN_REVSTR "$WCREV$" @@ -35,4 +35,4 @@ #define SVN_RANGE "$WCRANGE$" #define SVN_URL "$WCURL$" -#endif /* SVNREV_H */ +#endif /* _SVNREV_H_ */ |
From: jaguarondi <c2m...@c2...> - 2007-11-08 14:19:31
|
Author: jaguarondi Date: 2007-11-08 15:19:22 +0100 (Thu, 08 Nov 2007) New Revision: 665 Added: firmware/tuxdefs/api.h firmware/tuxdefs/defines.h Modified: daemon/trunk/libs/USBDaemon_status_table.c daemon/trunk/libs/USBDaemon_status_table.h firmware/tuxaudio/trunk/main.c firmware/tuxcore/trunk/global.h firmware/tuxdefs/commands.h firmware/tuxup/trunk/main.c Log: * Updated Doxygen comments of the firmware api (commands.h). * Reorganized commands.h, now split into api.h and defines.h. This is a work in progress, commands.h will be removed once all elements have been documented and moved to the right header file. Updated the daemon, tuxup, tuxcore and tuxaudio accordingly. Hope they still work. Modified: daemon/trunk/libs/USBDaemon_status_table.c =================================================================== --- daemon/trunk/libs/USBDaemon_status_table.c 2007-11-08 09:50:57 UTC (rev 664) +++ daemon/trunk/libs/USBDaemon_status_table.c 2007-11-08 14:19:22 UTC (rev 665) @@ -28,6 +28,7 @@ #include "USBDaemon_log.h" #include "USBDaemon_tcp_server.h" #include "../tuxdefs/commands.h" +#include "../tuxdefs/defines.h" /*_____________________ V A R I A B L E S __________________________________*/ _PORT_BYTE_ portb; Modified: daemon/trunk/libs/USBDaemon_status_table.h =================================================================== --- daemon/trunk/libs/USBDaemon_status_table.h 2007-11-08 09:50:57 UTC (rev 664) +++ daemon/trunk/libs/USBDaemon_status_table.h 2007-11-08 14:19:22 UTC (rev 665) @@ -24,7 +24,7 @@ #define __USBDAEMON_STATUS_TABLE_H__ /*_____________________ I N C L U D E S____________________________________ */ -#include "../tuxdefs/commands.h" +#include "../tuxdefs/api.h" #include <stdbool.h> /*_____________________ D E F I N E S ______________________________________*/ @@ -269,11 +269,6 @@ extern unsigned char cmd_status_flag; extern unsigned char pong_received; -extern version_t hw_version[4]; -extern revision_t hw_revision[4]; -extern author_t hw_author[4]; -extern unsigned char sound_flash_count; - /** * Tux status table. * Modified: firmware/tuxaudio/trunk/main.c =================================================================== --- firmware/tuxaudio/trunk/main.c 2007-11-08 09:50:57 UTC (rev 664) +++ firmware/tuxaudio/trunk/main.c 2007-11-08 14:19:22 UTC (rev 665) @@ -25,6 +25,7 @@ #include <util/delay.h> #include <avr/sleep.h> +#include "common/defines.h" #include "init.h" #include "varis.h" #include "spi.h" Modified: firmware/tuxcore/trunk/global.h =================================================================== --- firmware/tuxcore/trunk/global.h 2007-11-08 09:50:57 UTC (rev 664) +++ firmware/tuxcore/trunk/global.h 2007-11-08 14:19:22 UTC (rev 665) @@ -28,6 +28,8 @@ #include <avr/io.h> #include "common/commands.h" +#include "common/defines.h" +#include "common/api.h" /* * Custom types Added: firmware/tuxdefs/api.h =================================================================== --- firmware/tuxdefs/api.h (rev 0) +++ firmware/tuxdefs/api.h 2007-11-08 14:19:22 UTC (rev 665) @@ -0,0 +1,192 @@ +/* + * TUXDEFS - Common defines used by the firmware and daemon of tuxdroid + * Copyright (C) 2007 C2ME S.A. <tux...@c2...> + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* $Id$*/ + +/** \file api.h + \brief Firmware API + \ingroup api +*/ + +/** \defgroup api Firmware API + + These firmware commands constitute the program interface between all CPUs + and the computer. Both actions (also called commands) and status are + controlled by these commands. + */ +/*! @{ */ + +#ifndef _API_H_ +#define _API_H_ + +#include <stdint.h> + +/* + * COMMANDS + * + * Commands are divided in 4 groups depending on the number of parameters they + * have: + * - 0b00xxxxxx (0x00-0x3F) for void functions + * - 0b01xxxxxx (0x40-0x7F) for functions requesting 1 parameter + * - 0b10xxxxxx (0x80-0xBF) for functions requesting 2 parameters + * - 0b11xxxxxx (0xC0-0xFF) for functions requesting 3 parameters + * + * The same definition of commands are used for all communications between the + * computer and Tux. But depending on the communication way, the set of + * commands will differ. There will be 3 sets based on Tux's architecture: + * Tux's commands, audio commands, and status. + * + * 1. Tux's commands are sent from the computer to Tux in order to control all + * actuators: motors, LEDs, IR, etc. They can have any number of parameters + * (from 0 to 3) and are defined in "Tux's core API"; + * + * 2. Audio commands are sent from the computer or from Tux to the audio chip. + * They never have 3 parameters; + * + * 3. Status are sent from Tux back to the computer in order to give feedback + * on sensor states or send some received IR code. + * + * Note: Audio commands are sent from the computer or from Tux to the audio + * chip. The audio chip also receives status which it transfers to the + * computer. In order to differentiate status from audio commands easily, we + * chose to have audio commands <0xC0 which means they can have 0, 1 or 2 + * parameters but not 3. Status commands will always have 3 parameters has we + * always want to send as much information as possible anyway. + * + * \todo TODO this is still relevant but should be clarified, use this filed to + * explain the api on a higher level. The command flow through all CPUs need to + * be reviewed prior to update this. + */ + +/** + * \name Request general information + * These commands request some general information of the CPUs and their + * firmware. This includes identifiers, versions, revisions, author, etc. + * @{ */ + +/** Request generic informations from tuxcore. */ +#define INFO_TUXCORE_CMD 0x02 +/** Request generic informations from tuxcaudio. */ +#define INFO_TUXAUDIO_CMD 0x03 +/** Request generic informations from tuxrf. */ +#define INFO_TUXRF_CMD 0x04 +/** Request generic informations from fuxrf. */ +#define INFO_FUXRF_CMD 0x05 +/** Request generic informations from fuxusb. */ +#define INFO_FUXUSB_CMD 0x06 + +/*! @} */ + +/** + * \name Return general information + * These commands return some general information of the CPUs and their + * firmware. This includes identifiers, versions, revisions, author, etc. + * + * Only the version command includes the CPU identifier. This command should + * then be sent first so that the daemon knows which CPU is sending all their + * information commands. + * @{ */ +/** + * \page versioning Versioning + * + * Tuxdroid is made of 5 CPUs having each their own firmware. Releasing a new + * tuxdroid firmware only makes sense in releasing all 5 firmware as there's a + * lot of interactions between them. + * + * We then have 5 firmware version numbers and added a 6th version number for + * the package that will group all 5 firmware. This package will be called the + * firmware release. + * + * In order to keep all numbers coherent, we decided to follow these rules when + * releasing a new set of firmware: + * - all major and minor numbers should be equal; + * - the higher update number of all CPUs will be the update number of the + * release package; + * - when increasing the update number, use the highest update number among all + * CPUs + 1. + */ +/** + * Return the CPU number and the firmware version in major.minor.update + * format. + * + * In the current implementation, each firmware simply fetches the version_t + * structure. + * + * Parameters: + * - 1 - 3 lower bits are the CPU number, + * 5 higher bits are the major version number. + * - 2 - minor version number. + * - 3 - update version number. + */ +#define VERSION_CMD 0xC8 + +/** + * Return the firmware revision number. + * + * In the current implementation, each firmware simply fetches the revision_t + * structure. + * As the AVR is little-endian, the 16 bits revision is sent with the LSB + * first. + * + * Parameters: + * - 1 - LSB of the revision number. + * - 2 - MSB of the revision number. + * - 3 - undefined. + */ +#define REVISION_CMD 0xC9 + +/** + * Return the firmware author information. + * + * In the current implementation, each firmware simply fetches the author_t + * structure. + * As the AVR is little-endian, the 16 bits author number is sent with the LSB + * first. + * + * The author id can be used to differentiate official firmware from other + * custom versions. + * The variation number can be used by one author to differentiate multiple + * variations of a firmware. This is useful if someone develops a couple of + * firmware that would require specific external sensors for example, or . + * firmware that implements some functions differently like the flash usage, or + * driving the motors another way. + * + * Official firmware from Kysoh has the author id '0'. If you're developing + * firmware, use another number. + * + * Parameters: + * - 1 - LSB of the author id. + * - 2 - MSB of the author id. + * - 3 - variation number. + */ +#define AUTHOR_CMD 0xCA + +/** + * Return the sound flash information. + * + * Parameters: + * - 1 - number of sounds stored in the flash. + */ +#define SOUND_VAR_CMD 0xCB + +/*! @} */ + +/*! @} */ +#endif /* _API_H_ */ + Property changes on: firmware/tuxdefs/api.h ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:keywords + Id Name: svn:eol-style + native Modified: firmware/tuxdefs/commands.h =================================================================== --- firmware/tuxdefs/commands.h 2007-11-08 09:50:57 UTC (rev 664) +++ firmware/tuxdefs/commands.h 2007-11-08 14:19:22 UTC (rev 665) @@ -24,7 +24,7 @@ \ingroup commands */ -/** \defgroup commands Firmware API +/** \defgroup commands Firmware interface (DEPRECATED) These firmware commands constitute the program interface between all CPUs and the computer. Both actions (also called commands) and status are @@ -35,221 +35,7 @@ #define _COMMAND_H_ #include <stdint.h> - -/** - * \name Request information - * These commands request some general information of the CPUs and their - * firmware. This includes identifiers, versions, revisions, author, etc. - * @{ */ -/** - * \brief CPU identifiers - */ -enum CPU_IDENTIFIERS -{ - /** 'tuxcore' is the core CPU of tuxdroid, it manages the sensors and - * actuators. */ - TUXCORE_CPU_NUM = 0, - /** 'tuxaudio' is the CPU of tuxdroid that handles audio (microphone, - * speaker and the audio flash) and communications between the RF and - * tuxcore. */ - TUXAUDIO_CPU_NUM = 1, - /** 'tuxrf' is the RF CPU of tuxdroid. */ - TUXRF_CPU_NUM = 2, - /** 'fuxrf' is the RF CPU inside the dongle. */ - FUXRF_CPU_NUM = 3, - /** 'fuxusb' is the USB CPU inside the dongle. */ - FUXUSB_CPU_NUM = 4, -}; - -/** - * /brief I2C addresses of all CPUs - * - * tuxcore, tuxaudio, tuxrf and fuxrf have different I2C addresses when they're - * running in normal or bootloader mode. - */ -enum I2C_ADDRESSES -{ - TUXCORE_BL_ADDR = 0X30, - TUXAUDIO_BL_ADDR = 0X31, - TUXRF_BL_ADDR = 0X32, - FUXRF_BL_ADDR = 0X33, - /* XXX we should remove these TWAR stuff from here */ - TUXCORE_BL_TWAR = (TUXCORE_BL_ADDR << 1), - TUXAUDIO_BL_TWAR = (TUXAUDIO_BL_ADDR << 1), - TUXRF_BL_TWAR = (TUXRF_BL_ADDR << 1), - FUXRF_BL_TWAR = (FUXRF_BL_ADDR << 1), -}; - /* - * COMMANDS - * - * Commands are divided in 4 groups depending on the number of parameters they - * have: - * - 0b00xxxxxx (0x00-0x3F) for void functions - * - 0b01xxxxxx (0x40-0x7F) for functions requesting 1 parameter - * - 0b10xxxxxx (0x80-0xBF) for functions requesting 2 parameters - * - 0b11xxxxxx (0xC0-0xFF) for functions requesting 3 parameters - * - * The same definition of commands are used for all communications between the - * computer and Tux. But depending on the communication way, the set of - * commands will differ. There will be 3 sets based on Tux's architecture: - * Tux's commands, audio commands, and status. - * - * 1. Tux's commands are sent from the computer to Tux in order to control all - * actuators: motors, LEDs, IR, etc. They can have any number of parameters - * (from 0 to 3) and are defined in "Tux's core API"; - * - * 2. Audio commands are sent from the computer or from Tux to the audio chip. - * They never have 3 parameters; - * - * 3. Status are sent from Tux back to the computer in order to give feedback - * on sensor states or send some received IR code. - * - * Note: Audio commands are sent from the computer or from Tux to the audio - * chip. The audio chip also receives status which it transfers to the - * computer. In order to differentiate status from audio commands easily, we - * chose to have audio commands <0xC0 which means they can have 0, 1 or 2 - * parameters but not 3. Status commands will always have 3 parameters has we - * always want to send as much information as possible anyway. - * - * /todo TODO this is still relevant but should be clarified - */ - - -/* - * Version commands - */ -/** Request generic informations from tuxcore. */ -#define INFO_TUXCORE_CMD 0x02 -/** Request generic informations from tuxcaudio. */ -#define INFO_TUXAUDIO_CMD 0x03 -/** Request generic informations from tuxrf. */ -#define INFO_TUXRF_CMD 0x04 -/** Request generic informations from fuxrf. */ -#define INFO_FUXRF_CMD 0x05 -/** Request generic informations from fuxusb. */ -#define INFO_FUXUSB_CMD 0x06 - -/** - * Return the CPU number and the firmware version in major.minor.update - * format. - * - * In the current implementation, each firmware simply fetches the version_t - * structure. - */ -#define VERSION_CMD 0xC8 - -/** - * Version structure (DEPRECATED) - * This version_bf_t type can't be used to send the bytes over a channel as the - * order of the bits in the bit field may be freely rearranged by GCC. - * - * /todo TODO check that no firmware is using this anymore and delete this. - */ -typedef struct -{ - uint8_t version_cmd; - uint8_t cpu_nbr:3; /* 3 lower bits are the CPU number */ - uint8_t ver_major:5; /* 5 higher bits are the major version number */ - uint8_t ver_minor; - uint8_t ver_update; -} version_bf_t; - -/** - * Version structure that holds the raw data that will be sent when the - * VERSION_CMD is received. - * - * This version_t type should be used to send the bytes over a channel such as - * USB or TCP-IP. Use the macros to set or retrieve values of the cpu_ver_maj - * byte. - */ -typedef struct -{ - uint8_t version_cmd; - uint8_t cpu_ver_maj; /** 3 lower bits are the CPU number, 5 higher bits are - the major version number */ - uint8_t ver_minor; - uint8_t ver_update; -} version_t; - -/** Concatenate the CPU number and the major version number to create - * 'cpu_ver_maj'. - * /param[cpu_nbr] CPU number - * /param[ver_major] major version number - * /return true if successful, false otherwise */ -#define CPU_VER_JOIN(cpu_nbr, ver_major) ((cpu_nbr & 0x7) + (ver_major << 3)) -/** Retrieve the CPU number from 'cpu_ver_maj'. */ -#define CPU_VER_CPU(cpu_ver_maj) (cpu_ver_maj & 0x07) -/** Retrieve the major version number from 'cpu_ver_maj'. */ -#define CPU_VER_MAJ(cpu_ver_maj) ((cpu_ver_maj & 0xF8) >> 3) - -/** - * Return the firmware revision number. - * - * In the current implementation, each firmware simply fetches the revision_t - * structure. - * As the AVR is little-endian, the 16 bits revision is sent with the LSB - * first. - * - * 1st parameter: LSB of the revision number. - * 2nd parameter: MSB of the revision number. - * 3rd parameter: undefined. - */ -#define REVISION_CMD 0xC9 -/** - * Revision number of the firmware from the subversion repository. - */ -typedef struct -{ - uint8_t revision_cmd; - uint16_t revision; - uint8_t _undefined_; -} revision_t; - -/** - * Return the firmware author information. - * - * In the current implementation, each firmware simply fetches the author_t - * structure. - * As the AVR is little-endian, the 16 bits author number is sent with the LSB - * first. - * - * The author id can be used to differentiate official firmware from other - * custom versions. - * The variation number can be used by one author to differentiate multiple - * variations of a firmware. This is useful if someone develops a couple of - * firmware that would require specific external sensors for example, or . - * firmware that implements some functions differently like the flash usage, or - * driving the motors another way. - * - * Official firmware from Kysoh has the author id '0'. If you're developing - * firmware, use another number. - * - * 1st parameter: LSB of the author id. - * 2nd parameter: MSB of the author id. - * 3rd parameter: variation number. - */ -#define AUTHOR_CMD 0xCA -/** - * Author information of the firmware. - */ -typedef struct -{ - uint8_t author_cmd; - uint16_t author_id; - uint8_t variation; -} author_t; - -/** - * Return the sound flash information. - * - * 1st parameter: number of sounds stored in the flash. - */ -#define SOUND_VAR_CMD 0xCB - -/*! @} */ - -/* * Move commands */ Added: firmware/tuxdefs/defines.h =================================================================== --- firmware/tuxdefs/defines.h (rev 0) +++ firmware/tuxdefs/defines.h 2007-11-08 14:19:22 UTC (rev 665) @@ -0,0 +1,152 @@ +/* + * TUXDEFS - Common defines used by the firmware and daemon of tuxdroid + * Copyright (C) 2007 C2ME S.A. <tux...@c2...> + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* $Id$*/ + +/** \file defines.h + \brief Common firmware constants, structures and types. + + \ingroup common +*/ + +/** \defgroup common Common firmware constants, structures and types. + */ +/*! @{ */ + +#ifndef _DEFINES_H_ +#define _DEFINES_H_ + +/** + * \name Identifiers and addresses. + * @{ */ +/** + * CPU identifiers. + */ +enum CPU_IDENTIFIERS +{ + /** 'tuxcore' is the core CPU of tuxdroid, it manages the sensors and + * actuators. */ + TUXCORE_CPU_NUM = 0, + /** 'tuxaudio' is the CPU of tuxdroid that handles audio (microphone, + * speaker and the audio flash) and communications between the RF and + * tuxcore. */ + TUXAUDIO_CPU_NUM = 1, + /** 'tuxrf' is the RF CPU of tuxdroid. */ + TUXRF_CPU_NUM = 2, + /** 'fuxrf' is the RF CPU inside the dongle. */ + FUXRF_CPU_NUM = 3, + /** 'fuxusb' is the USB CPU inside the dongle. */ + FUXUSB_CPU_NUM = 4, +}; + +/** + * I2C addresses of all CPUs. + * + * tuxcore, tuxaudio, tuxrf and fuxrf have different I2C addresses when they're + * running in normal or bootloader mode. + */ +enum I2C_ADDRESSES +{ + TUXCORE_BL_ADDR = 0X30, + TUXAUDIO_BL_ADDR = 0X31, + TUXRF_BL_ADDR = 0X32, + FUXRF_BL_ADDR = 0X33, + /* XXX we should remove these TWAR stuff from here */ + TUXCORE_BL_TWAR = (TUXCORE_BL_ADDR << 1), + TUXAUDIO_BL_TWAR = (TUXAUDIO_BL_ADDR << 1), + TUXRF_BL_TWAR = (TUXRF_BL_ADDR << 1), + FUXRF_BL_TWAR = (FUXRF_BL_ADDR << 1), +}; + +/*! @} */ + +/** + * \name Versioning + */ +/*! @{ */ +/** + * Version structure (DEPRECATED). + * This version_bf_t type can't be used to send the bytes over a channel as the + * order of the bits in the bit field may be freely rearranged by GCC. + * + * \todo TODO check that no firmware is using this anymore and delete this. + */ +typedef struct +{ + uint8_t version_cmd; + uint8_t cpu_nbr:3; /**< 3 lower bits are the CPU number */ + uint8_t ver_major:5; /**< 5 higher bits are the major version number */ + uint8_t ver_minor; + uint8_t ver_update; +} version_bf_t; + +/** + * Version structure that holds the raw data that will be sent when the + * VERSION_CMD is received. + * + * This version_t type should be used to send the bytes over a channel such as + * USB or TCP-IP. Use the macros to set or retrieve values of the cpu_ver_maj + * byte. + */ +typedef struct +{ + uint8_t version_cmd; + uint8_t cpu_ver_maj; /** 3 lower bits are the CPU number, 5 higher bits are + the major version number */ + uint8_t ver_minor; + uint8_t ver_update; +} version_t; + +/** Concatenate the CPU number and the major version number to create + * 'cpu_ver_maj'. + * \param cpu_nbr CPU number. + * \param ver_major major version number. + * \return cpu_ver_maj byte.*/ +#define CPU_VER_JOIN(cpu_nbr, ver_major) ((cpu_nbr & 0x7) + (ver_major << 3)) +/** Return the CPU number from 'cpu_ver_maj'. */ +#define CPU_VER_CPU(cpu_ver_maj) (cpu_ver_maj & 0x07) +/** Return the major version number from 'cpu_ver_maj'. */ +#define CPU_VER_MAJ(cpu_ver_maj) ((cpu_ver_maj & 0xF8) >> 3) + +/** + * Revision number of the firmware from the subversion repository. + */ +typedef struct +{ + uint8_t revision_cmd; + uint16_t revision; + uint8_t _undefined_; +} revision_t; + +/** + * Author information of the firmware. + */ +typedef struct +{ + uint8_t author_cmd; + uint16_t author_id; + uint8_t variation; +} author_t; + +/*! @} */ + +/*! @} */ + +#endif /* _DEFINES_H_ */ + Property changes on: firmware/tuxdefs/defines.h ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:keywords + Id Name: svn:eol-style + native Modified: firmware/tuxup/trunk/main.c =================================================================== --- firmware/tuxup/trunk/main.c 2007-11-08 09:50:57 UTC (rev 664) +++ firmware/tuxup/trunk/main.c 2007-11-08 14:19:22 UTC (rev 665) @@ -29,7 +29,7 @@ #include "usb-connection.h" #include "bootloader.h" #include "version.h" -#include "common/commands.h" +#include "common/defines.h" /* Messages. */ static const char *msg_old_firmware = |
From: jaguarondi <c2m...@c2...> - 2007-11-08 09:51:04
|
Author: jaguarondi Date: 2007-11-08 10:50:57 +0100 (Thu, 08 Nov 2007) New Revision: 664 Modified: daemon/trunk/libs/USBDaemon_command_tux.c daemon/trunk/libs/USBDaemon_status_table.c daemon/trunk/libs/USBDaemon_status_table.h Log: * Added a new structure which will hold all status of tux: tux_status. * Updated functions for versions, revisions, author and sound flash information to use the new structure. Added comments. Modified: daemon/trunk/libs/USBDaemon_command_tux.c =================================================================== --- daemon/trunk/libs/USBDaemon_command_tux.c 2007-11-08 09:36:40 UTC (rev 663) +++ daemon/trunk/libs/USBDaemon_command_tux.c 2007-11-08 09:50:57 UTC (rev 664) @@ -637,7 +637,7 @@ result[1] = RF_status; break; case DATA_STATUS_SOUND_COUNT: - result[1] = sound_flash_count; + result[1] = tux_status.sound_flash.number_of_sounds; break; } } @@ -992,21 +992,19 @@ /************************************************************************ */ static void tux_req_info(unsigned char const data[], unsigned char result[]) { + struct firmware_version_t const *const firmware = &tux_status.firmware[data[1]]; + result[0] = data[0]; if (data[0] == TUX_REQ_INFO_VERSION) { - version_t *ver = &hw_version[data[1]]; - revision_t *rev = &hw_revision[data[1]]; - author_t *auth = &hw_author[data[1]]; - - result[1] = CPU_VER_MAJ(ver->cpu_ver_maj); - result[2] = ver->ver_minor; - result[3] = ver->ver_update; - result[4] = (unsigned char)((rev->revision & 0xFF00) >> 8); - result[5] = (unsigned char)(rev->revision & 0x00FF); - result[6] = (unsigned char)((auth->author_id & 0xFF00) >> 8); - result[7] = (unsigned char)(auth->author_id & 0x00FF); + result[1] = firmware->version_major; + result[2] = firmware->version_minor; + result[3] = firmware->version_update; + result[4] = (unsigned char)((firmware->revision & 0xFF00) >> 8); + result[5] = (unsigned char)(firmware->revision & 0x00FF); + result[6] = (unsigned char)((firmware->author& 0xFF00) >> 8); + result[7] = (unsigned char)(firmware->author& 0x00FF); } } Modified: daemon/trunk/libs/USBDaemon_status_table.c =================================================================== --- daemon/trunk/libs/USBDaemon_status_table.c 2007-11-08 09:36:40 UTC (rev 663) +++ daemon/trunk/libs/USBDaemon_status_table.c 2007-11-08 09:50:57 UTC (rev 664) @@ -40,64 +40,84 @@ unsigned char CMD_status = 0; unsigned char pong_received; unsigned char cmd_status_flag; -version_t hw_version[4]; -revision_t hw_revision[4]; -author_t hw_author[4]; -static unsigned char last_cpu_ver; +static unsigned char current_cpu; static unsigned char last_remote_key = 0xFF; static unsigned char last_toggle_key = 0xFF; unsigned char sound_flash_count = 0; /** - * \brief Status table and settings of the dongle and RF modules + * Tux status table. + * + * This hierarchical structure holds all current status of tux and the dongle. + * As soon as a new status is received from tux, the structure is updated. */ +struct tux_status_t tux_status; + +/** + * Status table and settings of the dongle and RF modules + */ struct connection_status_t connection_status; -/*_____________________ F U N C T I O N S __________________________________*/ - -static void update_version_table(const unsigned char *new_status) +/** + * Update tux_status with the given firmware version data. + */ +void update_firmware_version(const unsigned char *data) { - unsigned long tmp; - version_t *hw_ver; + struct firmware_version_t *firmware; - tmp = (new_status[3] << 24) + (new_status[2] << 16) + (new_status[1] << 8) - + (new_status[0]); - hw_ver = (version_t *)&tmp; - last_cpu_ver = CPU_VER_CPU(hw_ver->cpu_ver_maj); - hw_version[last_cpu_ver] = *hw_ver; - log_debug("version of %i: %i.%i.%i", CPU_VER_CPU(hw_ver->cpu_ver_maj), - CPU_VER_MAJ(hw_ver->cpu_ver_maj), hw_ver->ver_minor, - hw_ver->ver_update); + /* Select the corresponding CPU entry in the status table. */ + firmware = &tux_status.firmware[current_cpu]; + /* When returning 'information', the firmware starts by sending this + * version information which includes the cpu number (id). This number is + * used to determine which CPU is sending the upcoming information data + * like revision and author. So we should save that number. */ + current_cpu = CPU_VER_CPU(data[1]); + /* Save major, minor and update numbers. */ + firmware->version_major = CPU_VER_MAJ(data[1]); + firmware->version_minor = data[2]; + firmware->version_update = data[3]; + + log_debug("version of %i: %i.%i.%i", CPU_VER_CPU(current_cpu), + CPU_VER_MAJ(firmware->version_major), firmware->version_minor, + firmware->version_update); } -static void update_revision_table(const unsigned char *new_status) +/** + * Update tux_status with the given firmware revision data. + */ +static void update_firmware_revision(const unsigned char *data) { - unsigned long tmp; - revision_t *hw_rev; + struct firmware_version_t *firmware; + /* Select the corresponding CPU entry in the status table. */ + firmware = &tux_status.firmware[current_cpu]; + /* Save revision number. */ + firmware->revision = (data[2] << 8) + data[1]; - tmp = (new_status[3] << 24) + (new_status[2] << 16) + (new_status[1] << 8) - + (new_status[0]); - hw_rev = (revision_t *)&tmp; - hw_revision[last_cpu_ver] = *hw_rev; - log_debug("revision of %i: %i", last_cpu_ver, hw_rev->revision); + log_debug("revision of %i: %i", current_cpu, firmware->revision); } -static void update_author_table(const unsigned char *new_status) +/** + * Update tux_status with the given firmware author data. + */ +static void update_firmware_author(const unsigned char *data) { - unsigned long tmp; - author_t *hw_aut; + struct firmware_version_t *firmware; + /* Select the corresponding CPU entry in the status table. */ + firmware = &tux_status.firmware[current_cpu]; + /* Save author. */ + firmware->author = (data[2] << 8) + data[1]; - tmp = (new_status[3] << 24) + (new_status[2] << 16) + (new_status[1] << 8) - + (new_status[0]); - hw_aut = (author_t *)&tmp; - hw_author[last_cpu_ver] = *hw_aut; - log_debug("author of %i: %i", last_cpu_ver, hw_aut->author_id); + log_debug("author of %i: %i", current_cpu, firmware->author); } -static void update_sound_flash_count(const unsigned char *new_status) +/** + * Update tux_status with the given properties of the sound flash. + */ +static void update_sound_flash_properties(const unsigned char *data) { - sound_flash_count = new_status[1]; - log_debug("%i sounds in flash", sound_flash_count); + tux_status.sound_flash.number_of_sounds = data[1]; + + log_debug("%i sounds in flash", tux_status.sound_flash.number_of_sounds); } static void update_ir(const unsigned char *new_status) @@ -605,7 +625,7 @@ if (new_status[3] == 0) light_level = light_level / 8 + 1000; /* 1128 is the maximum value when there is no light - * We substract here to represent the lightness instead of darkness + * We subtract here to represent the lightness instead of darkness */ light_level = 1128 - light_level; sensors2_changed(light_level); @@ -655,19 +675,19 @@ break; case VERSION_CMD: - update_version_table(new_status); + update_firmware_version(new_status); break; case REVISION_CMD: - update_revision_table(new_status); + update_firmware_revision(new_status); break; case AUTHOR_CMD: - update_author_table(new_status); + update_firmware_author(new_status); break; case SOUND_VAR_CMD: - update_sound_flash_count(new_status); + update_sound_flash_properties(new_status); break; case STATUS_IR_CMD: Modified: daemon/trunk/libs/USBDaemon_status_table.h =================================================================== --- daemon/trunk/libs/USBDaemon_status_table.h 2007-11-08 09:36:40 UTC (rev 663) +++ daemon/trunk/libs/USBDaemon_status_table.h 2007-11-08 09:50:57 UTC (rev 664) @@ -274,6 +274,29 @@ extern author_t hw_author[4]; extern unsigned char sound_flash_count; +/** + * Tux status table. + * + * This hierarchical structure holds all available status of tux and the dongle. + */ +struct tux_status_t +{ + /** Firmware version numbers, svn revision and author. */ + struct firmware_version_t + { + int version_major; + int version_minor; + int version_update; + int revision; + int author; + } firmware[5]; + /** Sound flash properties. */ + struct sound_flash_t + { + int number_of_sounds; + } sound_flash; +}; + struct connection_status_t { /** USB request flag set when a USB command is issued and reset @@ -289,6 +312,8 @@ uint8_t wifi_channel; }; +extern struct tux_status_t tux_status; + extern struct connection_status_t connection_status; extern void update_raw_status_table(const unsigned char *new_status); |
From: jaguarondi <c2m...@c2...> - 2007-11-08 09:37:01
|
Author: jaguarondi Date: 2007-11-08 10:36:40 +0100 (Thu, 08 Nov 2007) New Revision: 663 Modified: firmware/tuxdefs/commands.h Log: * Added a 'variation' member to the author structure. * Added doxygen comments on all information commands, reorganized them and sis some cleaning. Modified: firmware/tuxdefs/commands.h =================================================================== --- firmware/tuxdefs/commands.h 2007-11-07 15:35:18 UTC (rev 662) +++ firmware/tuxdefs/commands.h 2007-11-08 09:36:40 UTC (rev 663) @@ -19,35 +19,68 @@ /* $Id$*/ +/** \file commands.h + \brief Firmware API + \ingroup commands +*/ + +/** \defgroup commands Firmware API + + These firmware commands constitute the program interface between all CPUs + and the computer. Both actions (also called commands) and status are + transmitted by these commands. + * @{ */ + #ifndef _COMMAND_H_ #define _COMMAND_H_ #include <stdint.h> -/* - * Version numbers +/** + * \name Request information + * These commands request some general information of the CPUs and their + * firmware. This includes identifiers, versions, revisions, author, etc. + * @{ */ +/** + * \brief CPU identifiers */ +enum CPU_IDENTIFIERS +{ + /** 'tuxcore' is the core CPU of tuxdroid, it manages the sensors and + * actuators. */ + TUXCORE_CPU_NUM = 0, + /** 'tuxaudio' is the CPU of tuxdroid that handles audio (microphone, + * speaker and the audio flash) and communications between the RF and + * tuxcore. */ + TUXAUDIO_CPU_NUM = 1, + /** 'tuxrf' is the RF CPU of tuxdroid. */ + TUXRF_CPU_NUM = 2, + /** 'fuxrf' is the RF CPU inside the dongle. */ + FUXRF_CPU_NUM = 3, + /** 'fuxusb' is the USB CPU inside the dongle. */ + FUXUSB_CPU_NUM = 4, +}; -#define TUXCORE_CPU_NUM 0x00 -#define TUXAUDIO_CPU_NUM 0x01 -#define TUXRF_CPU_NUM 0x02 -#define FUXRF_CPU_NUM 0x03 -#define FUXUSB_CPU_NUM 0x04 +/** + * /brief I2C addresses of all CPUs + * + * tuxcore, tuxaudio, tuxrf and fuxrf have different I2C addresses when they're + * running in normal or bootloader mode. + */ +enum I2C_ADDRESSES +{ + TUXCORE_BL_ADDR = 0X30, + TUXAUDIO_BL_ADDR = 0X31, + TUXRF_BL_ADDR = 0X32, + FUXRF_BL_ADDR = 0X33, + /* XXX we should remove these TWAR stuff from here */ + TUXCORE_BL_TWAR = (TUXCORE_BL_ADDR << 1), + TUXAUDIO_BL_TWAR = (TUXAUDIO_BL_ADDR << 1), + TUXRF_BL_TWAR = (TUXRF_BL_ADDR << 1), + FUXRF_BL_TWAR = (FUXRF_BL_ADDR << 1), +}; /* - * I2C Adresses - */ -/* Bootloader */ -#define TUXCORE_BL_ADDR 0X30 -#define TUXAUDIO_BL_ADDR 0X31 -#define TUXRF_BL_ADDR 0X32 -#define FUXRF_BL_ADDR 0X33 -#define TUXCORE_BL_TWAR (TUXCORE_BL_ADDR << 1) -#define TUXAUDIO_BL_TWAR (TUXAUDIO_BL_ADDR << 1) -#define TUXRF_BL_TWAR (TUXRF_BL_ADDR << 1) -#define FUXRF_BL_TWAR (FUXRF_BL_ADDR << 1) - -/*! * COMMANDS * * Commands are divided in 4 groups depending on the number of parameters they @@ -63,7 +96,7 @@ * Tux's commands, audio commands, and status. * * 1. Tux's commands are sent from the computer to Tux in order to control all - * actuators: motors, leds, IR, etc. They can have any number of parameters + * actuators: motors, LEDs, IR, etc. They can have any number of parameters * (from 0 to 3) and are defined in "Tux's core API"; * * 2. Audio commands are sent from the computer or from Tux to the audio chip. @@ -71,41 +104,61 @@ * * 3. Status are sent from Tux back to the computer in order to give feedback * on sensor states or send some received IR code. - */ - -/* + * * Note: Audio commands are sent from the computer or from Tux to the audio * chip. The audio chip also receives status which it transfers to the * computer. In order to differentiate status from audio commands easily, we - * choosed to have audio commands < 0xC0 which means they can have 0, 1 or 2 + * chose to have audio commands <0xC0 which means they can have 0, 1 or 2 * parameters but not 3. Status commands will always have 3 parameters has we * always want to send as much information as possible anyway. + * + * /todo TODO this is still relevant but should be clarified */ + /* * Version commands */ -#define INFO_TUXCORE_CMD 0x02 -#define INFO_TUXAUDIO_CMD 0x03 -#define INFO_TUXRF_CMD 0x04 -#define INFO_FUXRF_CMD 0x05 -#define INFO_FUXUSB_CMD 0x06 +/** Request generic informations from tuxcore. */ +#define INFO_TUXCORE_CMD 0x02 +/** Request generic informations from tuxcaudio. */ +#define INFO_TUXAUDIO_CMD 0x03 +/** Request generic informations from tuxrf. */ +#define INFO_TUXRF_CMD 0x04 +/** Request generic informations from fuxrf. */ +#define INFO_FUXRF_CMD 0x05 +/** Request generic informations from fuxusb. */ +#define INFO_FUXUSB_CMD 0x06 -#define VERSION_CMD 0xC8 -/* +/** + * Return the CPU number and the firmware version in major.minor.update + * format. + * + * In the current implementation, each firmware simply fetches the version_t + * structure. + */ +#define VERSION_CMD 0xC8 + +/** + * Version structure (DEPRECATED) * This version_bf_t type can't be used to send the bytes over a channel as the - * order of the bits in the bitfield may be freely rearranged by GCC. + * order of the bits in the bit field may be freely rearranged by GCC. + * + * /todo TODO check that no firmware is using this anymore and delete this. */ typedef struct { uint8_t version_cmd; - uint8_t cpu_nbr:3; /* 3 lower bits are the CPU number */ - uint8_t ver_major:5; /* 5 higher bits are the major version number */ + uint8_t cpu_nbr:3; /* 3 lower bits are the CPU number */ + uint8_t ver_major:5; /* 5 higher bits are the major version number */ uint8_t ver_minor; uint8_t ver_update; } version_bf_t; -/* +/** + * Version structure that holds the raw data that will be sent when the + * VERSION_CMD is received. + * * This version_t type should be used to send the bytes over a channel such as * USB or TCP-IP. Use the macros to set or retrieve values of the cpu_ver_maj * byte. @@ -113,37 +166,89 @@ typedef struct { uint8_t version_cmd; - uint8_t cpu_ver_maj; /* 3 lower bits are the CPU number, 5 higher bits are the major version number */ + uint8_t cpu_ver_maj; /** 3 lower bits are the CPU number, 5 higher bits are + the major version number */ uint8_t ver_minor; uint8_t ver_update; } version_t; +/** Concatenate the CPU number and the major version number to create + * 'cpu_ver_maj'. + * /param[cpu_nbr] CPU number + * /param[ver_major] major version number + * /return true if successful, false otherwise */ #define CPU_VER_JOIN(cpu_nbr, ver_major) ((cpu_nbr & 0x7) + (ver_major << 3)) -#define CPU_VER_CPU(cpu_ver_maj) (cpu_ver_maj & 0x07) /* cpu_nbr: 3 lower bits */ -#define CPU_VER_MAJ(cpu_ver_maj) ((cpu_ver_maj & 0xF8) >> 3) /* ver_major: 5 higher bits */ +/** Retrieve the CPU number from 'cpu_ver_maj'. */ +#define CPU_VER_CPU(cpu_ver_maj) (cpu_ver_maj & 0x07) +/** Retrieve the major version number from 'cpu_ver_maj'. */ +#define CPU_VER_MAJ(cpu_ver_maj) ((cpu_ver_maj & 0xF8) >> 3) -#define REVISION_CMD 0xC9 +/** + * Return the firmware revision number. + * + * In the current implementation, each firmware simply fetches the revision_t + * structure. + * As the AVR is little-endian, the 16 bits revision is sent with the LSB + * first. + * + * 1st parameter: LSB of the revision number. + * 2nd parameter: MSB of the revision number. + * 3rd parameter: undefined. + */ +#define REVISION_CMD 0xC9 +/** + * Revision number of the firmware from the subversion repository. + */ typedef struct { uint8_t revision_cmd; uint16_t revision; - uint8_t _undefined_; /* XXX reserved, maybe a branch ID? */ + uint8_t _undefined_; } revision_t; -#define AUTHOR_CMD 0xCA +/** + * Return the firmware author information. + * + * In the current implementation, each firmware simply fetches the author_t + * structure. + * As the AVR is little-endian, the 16 bits author number is sent with the LSB + * first. + * + * The author id can be used to differentiate official firmware from other + * custom versions. + * The variation number can be used by one author to differentiate multiple + * variations of a firmware. This is useful if someone develops a couple of + * firmware that would require specific external sensors for example, or . + * firmware that implements some functions differently like the flash usage, or + * driving the motors another way. + * + * Official firmware from Kysoh has the author id '0'. If you're developing + * firmware, use another number. + * + * 1st parameter: LSB of the author id. + * 2nd parameter: MSB of the author id. + * 3rd parameter: variation number. + */ +#define AUTHOR_CMD 0xCA +/** + * Author information of the firmware. + */ typedef struct { uint8_t author_cmd; - uint16_t author_id; /* official releases have id=0, other authors can have their own id's */ - uint8_t _undefined_; /* XXX reserved */ + uint16_t author_id; + uint8_t variation; } author_t; -/* - * Various information commands +/** + * Return the sound flash information. + * + * 1st parameter: number of sounds stored in the flash. */ -#define SOUND_VAR_CMD 0xCB -/* 1st parameter: number of sounds stored in the flash */ +#define SOUND_VAR_CMD 0xCB +/*! @} */ + /* * Move commands */ @@ -162,26 +267,26 @@ #define WAVE_WINGS_CMD 0x80 /* move the wings up and down */ /* 1st parameter: number of movements before the wings will stop */ -/* 2nd parameter: pwm value between 1 (slow) and 5 (fast) */ +/* 2nd parameter: PWM value between 1 (slow) and 5 (fast) */ #define STOP_WINGS_CMD 0x30 /* stop the wings motor */ -#define RESET_WINGS_CMD 0x31 /* reset the wings in the low position */ -#define RAISE_WINGS_CMD 0x39 /* move the wings in the upper position */ -#define LOWER_WINGS_CMD 0x3A /* move the wings in the lower position */ +#define RESET_WINGS_CMD 0x31 /* reset the wings in the low position */ +#define RAISE_WINGS_CMD 0x39 /* move the wings in the upper position */ +#define LOWER_WINGS_CMD 0x3A /* move the wings in the lower position */ #define SPIN_LEFT_CMD 0x82 /* spin left of a given angle */ /* 1st parameter: angle to turn, the unit is approximately 1/8th of a turn */ -/* 2nd parameter: pwm value between 1 (slow) and 5 (fast) */ +/* 2nd parameter: PWM value between 1 (slow) and 5 (fast) */ #define SPIN_RIGHT_CMD 0x83 /* spin right of a given angle */ /* 1st parameter: angle to turn, the unit is approximately 1/8th of a turn */ -/* 2nd parameter: pwm value between 1 (slow) and 5 (fast) */ +/* 2nd parameter: PWM value between 1 (slow) and 5 (fast) */ #define STOP_SPIN_CMD 0x37 /* stop the spinning motor */ /* * IR commands */ -#define TURN_IR_ON_CMD 0x17 /* turn IR led on */ -#define TURN_IR_OFF_CMD 0x18 /* turn IR led off */ +#define TURN_IR_ON_CMD 0x17 /* turn IR LED on */ +#define TURN_IR_OFF_CMD 0x18 /* turn IR LED off */ #define IR_SEND_RC5_CMD 0x91 /* send RC5 ir code */ /* 1st parameter: address - xxTAAAAA (T: toggle bit, A: RC5 5 bits address) */ /* 2nd parameter: command - xxCCCCCC (C: RC5 6 bits command) */ @@ -190,31 +295,31 @@ * LED commands */ -#define LED_ON_CMD 0x1A /* Turn all leds on */ -#define LED_OFF_CMD 0x1B /* Turn all leds off */ -#define LED_L_ON_CMD 0x1C /* Turn left led on */ -#define LED_L_OFF_CMD 0x1D /* Turn left led off */ -#define LED_R_ON_CMD 0x1E /* Turn right led on */ -#define LED_R_OFF_CMD 0x1F /* Turn right led off */ -#define LED_BLINK_CMD 0x9A /* Blink both leds multiple time */ -/* 1st parameter: number of led toggles */ -/* 2nd parameter: delay between each led toggle, in multiple of 4ms */ +#define LED_ON_CMD 0x1A /* Turn all LEDs on */ +#define LED_OFF_CMD 0x1B /* Turn all LEDs off */ +#define LED_L_ON_CMD 0x1C /* Turn left LED on */ +#define LED_L_OFF_CMD 0x1D /* Turn left LED off */ +#define LED_R_ON_CMD 0x1E /* Turn right LED on */ +#define LED_R_OFF_CMD 0x1F /* Turn right LED off */ +#define LED_BLINK_CMD 0x9A /* Blink both LEDs multiple time */ +/* 1st parameter: number of LED toggles */ +/* 2nd parameter: delay between each LED toggle, in multiple of 4ms */ /* * Audio commands * * Audio commands can't have 3 parameters, see the above note for details */ -#define PLAY_SOUND_CMD 0x90 /* play a sound from the flash sound bank */ +#define PLAY_SOUND_CMD 0x90 /* play a sound from the flash sound bank */ /* 1st parameter: sound number */ /* 2nd parameter: sound volume */ -#define STORE_SOUND_CMD 0x52 /* start flash sound bank storage [1] */ +#define STORE_SOUND_CMD 0x52 /* start flash sound bank storage [1] */ /* 1st parameter: number of sounds to store */ -#define STORE_INDEX_CMD 0xD0 /* get indexes of the flash sound bank [1] */ +#define STORE_INDEX_CMD 0xD0 /* get indexes of the flash sound bank [1] */ /* 1st parameter: lower address byte */ /* 2nd parameter: middle address byte */ /* 3rd parameter: higher address byte */ -#define TEST_SOUND_CMD 0x10 /* test the audio input and output [1] */ +#define TEST_SOUND_CMD 0x10 /* test the audio input and output [1] */ #define MUTE_CMD 0x92 /* mute/unmute the audio amplifier */ /* 1st parameter: mute state 0:unmute 1:mute */ /* 2nd parameter: reserved */ @@ -234,7 +339,7 @@ #define DEEPSLEEP_MODE 1 /* minimal power consumption, can't wake-up from this mode */ #define SLEEP_MODE 2 /* standard sleep mode */ -#define SLEEP_ACK_CMD 0xF7 /* acknowledge of the sleep mode command */ +#define SLEEP_ACK_CMD 0xF7 /* acknowledge of the sleep mode command */ /* 1st parameter: acknowledge of tuxcore */ /* 2nd parameter: acknowledge of tuxaudio */ /* 3rd parameter: acknowledge of tuxrf */ @@ -257,8 +362,8 @@ /* 2nd parameter: PORTC * PC0: phototransistor pull-up load * PC1: wings position switch - * PC2: right blue led - * PC3: left blue led + * PC2: right blue LED + * PC3: left blue LED * PC4: i2c SDA line * PC5: i2c SCL line * PC6: reset @@ -269,21 +374,24 @@ * PD2: IR receiver signal * PD3: spin position switch * PD4: wings motor forward - * PD5: IR led + * PD5: IR LED * PD6: eyes open position switch * PD7: eyes closed position switch */ -#define SEND_AUDIOSENSORS_CMD 0xF0 /* send sensors status of the audio CPU to the core CPU */ -#define STATUS_SENSORS1_CMD 0xC1 /* send sensors status of the audio CPU to the computer */ +/* send sensors status of the audio CPU to the core CPU */ +#define SEND_AUDIOSENSORS_CMD 0xF0 +/* send sensors status of the audio CPU to the computer */ +#define STATUS_SENSORS1_CMD 0xC1 /* 1st parameter: switches and status from the audio CPU * .0: left wing push button * .1: right wing push button * .2: power plug insertion switch * .3: head push button - * .4: charger led status - * .5: rf connection status (0: disconnected, 1: connected) - * .6: internal power switch for the audio amplifier, motor drivers and IR led + * .4: charger LED status + * .5: RF connection status (0: disconnected, 1: connected) + * .6: internal power switch for the audio amplifier, motor drivers and IR + * LED * .7: mute status (0: muted, 1: unmuted) */ #define STATUS_LEFTWINGBTN_MK 0x01 @@ -302,12 +410,14 @@ /* 2nd parameter: light level low byte */ /* 3rd parameter: light mode: 0: low light, 1:strong light */ -#define STATUS_POSITION1_CMD 0xC3 /* send position counters which is related to the motor status */ +/* send position counters which is related to the motor status */ +#define STATUS_POSITION1_CMD 0xC3 /* 1st parameter: eyes position counter */ /* 2nd parameter: mouth position counter */ /* 3rd parameter: wings position counter */ -#define STATUS_POSITION2_CMD 0xC4 /* send position counters which is related to the motor status */ +/* send position counters which is related to the motor status */ +#define STATUS_POSITION2_CMD 0xC4 /* 1st parameter: spin position counter */ /* 2nd parameter: */ /* 3rd parameter: */ @@ -320,7 +430,7 @@ /* 2nd parameter: undefined */ /* 3rd parameter: undefined */ -#define STATUS_ID_CMD 0xC6 +#define STATUS_ID_CMD 0xC6 /* 1st parameter: Tux ID number (MSB) */ /* 2nd parameter: Tux ID number (LSB) */ @@ -334,7 +444,7 @@ /* 2nd parameter: Programming steps : * 0 : no programming * 1 : Flash erased - * 2 : TOC + * 2 : TOC * 3 : Sounds track */ /* 3rd parameter: The track number which is programming*/ @@ -355,7 +465,7 @@ /* 1st parameter: number of pongs pending */ /* 2nd parameter: number of pongs lost by the I2C */ /* 3rd parameter: number of pongs lost by the RF link */ -#define COND_RESET_CMD 0x3E /* reset conditional flags that are resettable */ +#define COND_RESET_CMD 0x3E /* reset conditional flags that are resettable */ /* * Error numbers @@ -364,7 +474,8 @@ enum error_numbers_t { E_STACK_CORRUPTION, - /* 3rd parameter: see source code, depends on the function that report the error */ + /* 3rd parameter: see source code, depends on the function that report the + * error */ E_STATUS_INVALID, /* 3rd parameter: invalid status value */ }; @@ -375,4 +486,5 @@ #define RESERVED 0 +/*! @} */ #endif /* _COMMAND_H_ */ |
From: Paul_R <c2m...@c2...> - 2007-11-07 15:35:24
|
Author: Paul_R Date: 2007-11-07 16:35:18 +0100 (Wed, 07 Nov 2007) New Revision: 662 Modified: software/gadgets/settings/trunk/settings.tgf software/gadgets/settings/trunk/settings/Scripts/Python/GUI/widget/other.glade software/gadgets/settings/trunk/settings/Scripts/Python/GUI/widget/other.pyp software/gadgets/settings/trunk/settings/Strings/fr_ALL.xml software/gadgets/settings/trunk/settings/about.xml software/gadgets/settings/trunk/settings/settings.xml software/gadgets/settings/trunk/settings/strings.xml Log: * Finish the version tab : The links with the irmware updater gadget must be created. * Fixed a bug in the Sound tab - clear list button * Added the Wifi config Modified: software/gadgets/settings/trunk/settings/Scripts/Python/GUI/widget/other.glade =================================================================== --- software/gadgets/settings/trunk/settings/Scripts/Python/GUI/widget/other.glade 2007-11-06 20:28:52 UTC (rev 661) +++ software/gadgets/settings/trunk/settings/Scripts/Python/GUI/widget/other.glade 2007-11-07 15:35:18 UTC (rev 662) @@ -45,7 +45,325 @@ <property name="spacing">0</property> <child> - <placeholder/> + <widget class="GtkVBox" id="vbox5"> + <property name="visible">True</property> + <property name="homogeneous">False</property> + <property name="spacing">0</property> + + <child> + <widget class="GtkFrame" id="frame14"> + <property name="border_width">2</property> + <property name="visible">True</property> + <property name="label_xalign">0</property> + <property name="label_yalign">0.5</property> + <property name="shadow_type">GTK_SHADOW_OUT</property> + + <child> + <widget class="GtkAlignment" id="alignment14"> + <property name="visible">True</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xscale">1</property> + <property name="yscale">1</property> + <property name="top_padding">0</property> + <property name="bottom_padding">0</property> + <property name="left_padding">12</property> + <property name="right_padding">0</property> + + <child> + <widget class="GtkFixed" id="fixed13"> + <property name="height_request">1</property> + <property name="visible">True</property> + + <child> + <widget class="GtkComboBox" id="cbbWifiChannel"> + <property name="width_request">120</property> + <property name="height_request">24</property> + <property name="visible">True</property> + <property name="items" translatable="yes"></property> + <property name="add_tearoffs">False</property> + <property name="focus_on_click">True</property> + <signal name="changed" handler="on_cbbWifiChannel_changed" last_modification_time="Wed, 07 Nov 2007 14:23:17 GMT"/> + </widget> + <packing> + <property name="x">240</property> + <property name="y">11</property> + </packing> + </child> + + <child> + <widget class="GtkEntry" id="txtWifiUsed"> + <property name="width_request">72</property> + <property name="height_request">24</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="editable">True</property> + <property name="visibility">True</property> + <property name="max_length">0</property> + <property name="text" translatable="yes"></property> + <property name="has_frame">True</property> + <property name="invisible_char">●</property> + <property name="activates_default">False</property> + </widget> + <packing> + <property name="x">240</property> + <property name="y">40</property> + </packing> + </child> + + <child> + <widget class="GtkEntry" id="txtWifiAvoid"> + <property name="width_request">72</property> + <property name="height_request">24</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="editable">True</property> + <property name="visibility">True</property> + <property name="max_length">0</property> + <property name="text" translatable="yes"></property> + <property name="has_frame">True</property> + <property name="invisible_char">●</property> + <property name="activates_default">False</property> + </widget> + <packing> + <property name="x">240</property> + <property name="y">68</property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="lblWifiAvoidance"> + <property name="width_request">224</property> + <property name="height_request">16</property> + <property name="visible">True</property> + <property name="label" translatable="yes">label4</property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_RIGHT</property> + <property name="wrap">True</property> + <property name="selectable">False</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="x">0</property> + <property name="y">16</property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="lblUsedChannel"> + <property name="width_request">224</property> + <property name="height_request">16</property> + <property name="visible">True</property> + <property name="label" translatable="yes">label5</property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_RIGHT</property> + <property name="wrap">True</property> + <property name="selectable">False</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="x">0</property> + <property name="y">45</property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="lblAvoidChannel"> + <property name="width_request">224</property> + <property name="height_request">16</property> + <property name="visible">True</property> + <property name="label" translatable="yes">label6</property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_RIGHT</property> + <property name="wrap">True</property> + <property name="selectable">False</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="x">0</property> + <property name="y">72</property> + </packing> + </child> + </widget> + </child> + </widget> + </child> + + <child> + <widget class="GtkLabel" id="lblConfigWifi"> + <property name="visible">True</property> + <property name="label" translatable="yes"><b>frame14</b></property> + <property name="use_underline">False</property> + <property name="use_markup">True</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="type">label_item</property> + </packing> + </child> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">True</property> + <property name="fill">True</property> + </packing> + </child> + + <child> + <widget class="GtkFrame" id="frame15"> + <property name="border_width">2</property> + <property name="visible">True</property> + <property name="label_xalign">0</property> + <property name="label_yalign">0.5</property> + <property name="shadow_type">GTK_SHADOW_OUT</property> + + <child> + <widget class="GtkAlignment" id="alignment15"> + <property name="visible">True</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xscale">1</property> + <property name="yscale">1</property> + <property name="top_padding">0</property> + <property name="bottom_padding">0</property> + <property name="left_padding">12</property> + <property name="right_padding">0</property> + + <child> + <widget class="GtkFixed" id="fixed14"> + <property name="visible">True</property> + </widget> + </child> + </widget> + </child> + + <child> + <widget class="GtkLabel" id="lblConfigSleep"> + <property name="visible">True</property> + <property name="label" translatable="yes"><b>frame15</b></property> + <property name="use_underline">False</property> + <property name="use_markup">True</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="type">label_item</property> + </packing> + </child> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">True</property> + <property name="fill">True</property> + </packing> + </child> + + <child> + <widget class="GtkFrame" id="frame16"> + <property name="border_width">2</property> + <property name="visible">True</property> + <property name="label_xalign">0</property> + <property name="label_yalign">0.5</property> + <property name="shadow_type">GTK_SHADOW_OUT</property> + + <child> + <widget class="GtkAlignment" id="alignment16"> + <property name="visible">True</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xscale">1</property> + <property name="yscale">1</property> + <property name="top_padding">0</property> + <property name="bottom_padding">0</property> + <property name="left_padding">12</property> + <property name="right_padding">0</property> + + <child> + <widget class="GtkFixed" id="fixed15"> + <property name="visible">True</property> + </widget> + </child> + </widget> + </child> + + <child> + <widget class="GtkLabel" id="lblConfigID"> + <property name="visible">True</property> + <property name="label" translatable="yes"><b>frame16</b></property> + <property name="use_underline">False</property> + <property name="use_markup">True</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="type">label_item</property> + </packing> + </child> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">True</property> + <property name="fill">True</property> + </packing> + </child> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">True</property> + <property name="fill">True</property> + </packing> </child> </widget> <packing> @@ -227,6 +545,36 @@ <property name="fill">True</property> </packing> </child> + + <child> + <widget class="GtkFixed" id="fixed12"> + <property name="height_request">43</property> + <property name="visible">True</property> + + <child> + <widget class="GtkButton" id="btnUpdate"> + <property name="width_request">192</property> + <property name="height_request">24</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="label" translatable="yes">button1</property> + <property name="use_underline">True</property> + <property name="relief">GTK_RELIEF_NORMAL</property> + <property name="focus_on_click">True</property> + <signal name="clicked" handler="on_btnUpdate_clicked" last_modification_time="Wed, 07 Nov 2007 13:54:56 GMT"/> + </widget> + <packing> + <property name="x">16</property> + <property name="y">8</property> + </packing> + </child> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> </widget> <packing> <property name="padding">0</property> Modified: software/gadgets/settings/trunk/settings/Scripts/Python/GUI/widget/other.pyp =================================================================== --- software/gadgets/settings/trunk/settings/Scripts/Python/GUI/widget/other.pyp 2007-11-06 20:28:52 UTC (rev 661) +++ software/gadgets/settings/trunk/settings/Scripts/Python/GUI/widget/other.pyp 2007-11-07 15:35:18 UTC (rev 662) @@ -4,6 +4,7 @@ from xml.dom import minidom, Node from xml.dom.minidom import Document import subprocess +import commands class Window(SimpleGladeApp): def __init__(self, @@ -12,26 +13,53 @@ domain="params", **kwargs): SimpleGladeApp.__init__(self, path, root, domain, **kwargs) self.prev = False + self.flag = True def new(self): self.get_widget("window1").set_title(_me.string('name_to_read')) thread.start_new_thread(self.update, ()) def update(self): + self.avoidedchannel = _me.get_param('AvoidChannel') self.get_widget('lblTabConfig').set_text(_me.string('lblTabConfig')) self.get_widget('lblTabSound').set_text(_me.string('lblTabSound')) self.get_widget('lblTabVersion').set_text(_me.string('lblTabVersion')) + self.searchWifiChannel() self.ConfigLabelUpdate() + self.avoidchannel() + self.VersionsLabelUpdate() self.SoundLabelUpdate() def ConfigLabelUpdate(self): + self.get_widget('lblConfigWifi').set_text(_me.string('lblConfigWifi')) + self.get_widget('lblConfigSleep').set_text(_me.string('lblConfigSleep')) + self.get_widget('lblConfigID').set_text(_me.string('lblConfigID')) + + self.get_widget('lblWifiAvoidance').set_text(_me.string('lblWifiAvoidance')) + self.get_widget('lblUsedChannel').set_text(_me.string('lblUsedChannel')) + self.get_widget('lblAvoidChannel').set_text(_me.string('lblAvoidChannel')) + + self.get_widget('txtWifiUsed').set_text(self.channel) + self.get_widget('txtWifiUsed').set_editable(False) + self.get_widget('txtWifiAvoid').set_text(str(self.avoidedchannel)) + self.get_widget('txtWifiAvoid').set_editable(False) + + self.get_widget('cbbWifiChannel').insert_text(0, 'auto') + for i in range(13): + channel = str(i+1) + self.get_widget('cbbWifiChannel').append_text(channel) + + + + + + def VersionsLabelUpdate(self): + self.get_widget('btnUpdate').set_label(_me.string('btnUpdate')) self.get_widget('lblVersions').set_text(_me.string('lblVersions')) self.get_widget('lblLocal').set_text(_me.string('lblLocal')) - - def VersionsLabelUpdate(self): self.VersionTreeviewUpdate() self.FileTreeviewUpdate() @@ -67,6 +95,7 @@ self.file_view.append_column( self.file_column ) self.file_view.append_column( self.file_ver_column ) self.file_view.connect("button_press_event", self.on_tree_button_pressed) + self.file_view.get_selection().connect("changed",self.on_local_version_selected) self.get_widget("scrolledwindow3").add(self.file_view) self.get_widget("scrolledwindow3").show_all() self.searchFiles() @@ -116,7 +145,41 @@ self.get_widget("scrolledwindow1").add(self.gadget_viewer) self.get_widget("scrolledwindow1").show_all() +#--------------------------------------------------------------------------- +# +# CONFIG TAB +# +#--------------------------------------------------------------------------- + def on_cbbWifiChannel_changed(self, widget, *args): + #Reject the first signal + if self.flag == True: + self.flag = False + return + self.avoidedchannel = self.get_widget('cbbWifiChannel').get_active() + _me.set_param('AvoidChannel', self.avoidedchannel) + self.avoidchannel() + + + def avoidchannel(self): + self.get_widget('cbbWifiChannel').set_active(self.avoidedchannel) + if self.avoidedchannel == 0: + self.get_widget('txtWifiAvoid').set_text(str(self.channel)) + tux.connect.avoid_wifi(int(self.channel)) + else: + tux.connect.avoid_wifi(self.avoidedchannel) + self.get_widget('txtWifiAvoid').set_text(str(self.avoidedchannel)) + + + def searchWifiChannel(self): + a = commands.getoutput('iwlist channel') + channel_idx = a.rfind('Channel ')+8 + channel = a[channel_idx:channel_idx+2] + if channel.find(')') != -1: + channel = channel[0:1] + self.channel = channel + + #--------------------------------------------------------------------------- # # VERSION TAB @@ -140,31 +203,46 @@ def refresh_files(self): self.file_tree_store.clear() + versions = [] for i in range(len(self.filepath)): proc = subprocess.Popen("tar -C '/tmp' -xvf '/opt/tuxdroid/firmware/%s'"%self.filepath[i][0], shell = True, stdout = subprocess.PIPE) proc.wait() - version = self.get_new_version_infos() + version, tux_core, tux_audio, tux_rf, fux_rf, fux_usb, change = self.get_new_version_infos() self.filepath[i][1] = str(version) - print self.filepath + versions.append([tux_core, tux_audio, tux_rf, fux_rf, fux_usb]) os.system('rm -rf /tmp/tuxdroid-firmware*') for i in range(len(self.filepath)): tmp = 0 tmp = self.file_tree_store.append(None, (self.filepath[i][0], self.filepath[i][1])) - self.file_tree_store.append(tmp, (self.filepath[i][0],self.filepath[i][1])) + self.file_tree_store.append(tmp, ('Tux core',versions[i][0])) + self.file_tree_store.append(tmp, ('Tux audio',versions[i][1])) + self.file_tree_store.append(tmp, ('Tux RF',versions[i][2])) + self.file_tree_store.append(tmp, ('Fux RF',versions[i][3])) + self.file_tree_store.append(tmp, ('Fux USB',versions[i][4])) def get_new_version_infos(self): filelist = os.listdir('/tmp') tmppath = '' for file in filelist: if file.lower().find('tuxdroid-firmware') != -1: - print 'tick' tmppath = file dom = minidom.parse('/tmp/%s/info.xml' % tmppath) racine = dom.getElementsByTagName('root') version = racine[0].getElementsByTagName('version') + tux_core = version[0].getElementsByTagName('tux_core')[0].childNodes[0].nodeValue + tux_core = str(tux_core).replace('\n','').replace('\t', '') + tux_audio = version[0].getElementsByTagName('tux_audio')[0].childNodes[0].nodeValue + tux_audio = str(tux_audio).replace('\n','').replace('\t', '') + fux_rf = version[0].getElementsByTagName('fux_rf')[0].childNodes[0].nodeValue + fux_rf = str(fux_rf).replace('\n','').replace('\t', '') + tux_rf = version[0].getElementsByTagName('tux_rf')[0].childNodes[0].nodeValue + tux_rf = str(tux_rf).replace('\n','').replace('\t', '') + fux_usb = version[0].getElementsByTagName('fux_usb')[0].childNodes[0].nodeValue + fux_usb = str(fux_usb).replace('\n','').replace('\t', '') + change = racine[0].getElementsByTagName('release_notes')[0].childNodes[0].nodeValue ver = version[0].attributes['tuxdroid_firmware_version'].nodeValue - return ver + return ver, tux_core, tux_audio, tux_rf, fux_rf, fux_usb, change #-------------------------------------------------------------------------- @@ -244,13 +322,31 @@ def showChangeLog(self, widget): - print 'show ChangeLog' + proc = subprocess.Popen("tar -C '/tmp' -xvf '/opt/tuxdroid/firmware/%s'"%self.selectedfile, shell = True, stdout = subprocess.PIPE) + proc.wait() + version, tux_core, tux_audio, tux_rf, fux_rf, fux_usb, change = self.get_new_version_infos() + + title = _me.string('itemChangeLog') + message = change + dialog = GdgDialog(title, message) + os.system('rm -rf /tmp/tuxdroid-firmware*') def flashCPU(self, widget): - print 'flash CPU' + path = '/opt/tuxdroid/firmware/%s'%self.selectedfile + try: + gadgets['firmware_updater'].set_param('setting', True) + gadgets['firmware_updater'].set_param('local_path', path) + gadgets['firmware_updater'].main() + except: + dialog = GdgDialog('Error', 'Please install the settings gadget in the manager \nBe sure that the firmware updater gadget is correctly installed.') + + def on_local_version_selected(self, obj): + path = obj.get_selected_rows() + self.selectedfile = self.filepath[path[1][0][0]][0] - + def on_btnUpdate_clicked(self, widget, *args): + print ' clicked' #--------------------------------------------------------------------------- # # SOUND TAB @@ -371,7 +467,7 @@ def on_wave_internal_clist_bt_clicked(self, widget, *args): wavs.wav_sizes=[] wavs.wav_paths=[] - self.get_widget("checkbutton4").set_active(False) + self.get_widget("chkSoundOriginal").set_active(False) self.refresh_wav_list() #-------------------------------------------------------------------------- @@ -506,3 +602,6 @@ tux.cmd.mouth_open() tux.sys.shell("arecord -D %s -d 10 -t wav rec.wav"%soundcard) tux.cmd.mouth_close() + + + Modified: software/gadgets/settings/trunk/settings/Strings/fr_ALL.xml =================================================================== --- software/gadgets/settings/trunk/settings/Strings/fr_ALL.xml 2007-11-06 20:28:52 UTC (rev 661) +++ software/gadgets/settings/trunk/settings/Strings/fr_ALL.xml 2007-11-07 15:35:18 UTC (rev 662) @@ -1,5 +1,6 @@ <?xml version='1.0' encoding='UTF-8'?> <strings> + <lblAvoidChannel type='str'>Cannal rejeté :</lblAvoidChannel> <lblLocal type='str'>Versions disponibles</lblLocal> <gui_conf_remote_title type='str'>Télécommande</gui_conf_remote_title> <btnSoundRemove type='str'>Enlever</btnSoundRemove> @@ -9,6 +10,7 @@ <gui_conf_accept_bt type='str'>Valider</gui_conf_accept_bt> <help_text type='str'> </help_text> + <lblWifiAvoidance type='str'>Eviter le cannal wifi n° :</lblWifiAvoidance> <itemCPU type='str'>Flasher les processeurs</itemCPU> <btnSoundPlayMic type='str'>Lire</btnSoundPlayMic> <lblSoundLocal type='str'>Lire un wave local</lblSoundLocal> @@ -16,6 +18,7 @@ <gui_conf_update_title type='str'>Mise à jour</gui_conf_update_title> <lblTabConfig type='str'>Configuration</lblTabConfig> <gui_conf_cancel_bt type='str'>Annuler</gui_conf_cancel_bt> + <btnUpdate type='str'>Verifier les mises à jour</btnUpdate> <gui_conf_delay_lb type='str'>Délai (sec)</gui_conf_delay_lb> <btnSoundRecordMic type='str'>Enregistrer</btnSoundRecordMic> <gui_conf_about_title type='str'>A propos</gui_conf_about_title> @@ -25,9 +28,11 @@ <itemChangeLog type='str'>Voir les changements</itemChangeLog> <lblSoundLocalSelect type='str'>Selectionner un son :</lblSoundLocalSelect> <lblSoundExternal type='str'>Lire un wave externe</lblSoundExternal> + <lblConfigSleep type='str'>Configuration de la veille</lblConfigSleep> <gui_conf_description_lb type='str'>Description</gui_conf_description_lb> <gui_conf_author_lb type='str'>Auteur</gui_conf_author_lb> <treeVersionVer type='str'>Version</treeVersionVer> + <lblConfigWifi type='str'>Configuration wifi</lblConfigWifi> <treeVersionProg type='str'>Component</treeVersionProg> <lblSoundExternalPlay type='str'>Lecture</lblSoundExternalPlay> <gui_conf_current_bind_lb type='str'>Assignation</gui_conf_current_bind_lb> @@ -35,10 +40,12 @@ <gui_conf_remote_set_bt type='str'>Set</gui_conf_remote_set_bt> <name_to_read type='str'>Parametres de Tux</name_to_read> <gui_conf_window_title type='str'>Paramètres</gui_conf_window_title> + <lblUsedChannel type='str'>Cannal utilisé :</lblUsedChannel> <lblTabSound type='str'>Audio</lblTabSound> <btnSoundStore type='str'>Ecrire</btnSoundStore> <lblVersions type='str'>Versions installées</lblVersions> <btnSoundModify type='str'>Modifier</btnSoundModify> + <lblConfigID type='str'>Configuration de l'ID</lblConfigID> <lblTabVersion type='str'>Versions</lblTabVersion> <btnSoundPlayNum type='str'>Lire</btnSoundPlayNum> <lblSoundStore type='str'>Enregistrer des fichiers wave</lblSoundStore> Modified: software/gadgets/settings/trunk/settings/about.xml =================================================================== (Binary files differ) Modified: software/gadgets/settings/trunk/settings/settings.xml =================================================================== --- software/gadgets/settings/trunk/settings/settings.xml 2007-11-06 20:28:52 UTC (rev 661) +++ software/gadgets/settings/trunk/settings/settings.xml 2007-11-07 15:35:18 UTC (rev 662) @@ -1,6 +1,7 @@ <?xml version='1.0' encoding='UTF-8'?> <settings> <parameters> + <AvoidChannel type='int'>0</AvoidChannel> <hidden_in_manager type='bool'>False</hidden_in_manager> </parameters> <general> Modified: software/gadgets/settings/trunk/settings/strings.xml =================================================================== --- software/gadgets/settings/trunk/settings/strings.xml 2007-11-06 20:28:52 UTC (rev 661) +++ software/gadgets/settings/trunk/settings/strings.xml 2007-11-07 15:35:18 UTC (rev 662) @@ -1,5 +1,6 @@ <?xml version='1.0' encoding='UTF-8'?> <strings> + <lblAvoidChannel type='str'>Avoided channel :</lblAvoidChannel> <lblLocal type='str'>Available versions</lblLocal> <gui_conf_remote_title type='str'>Remote</gui_conf_remote_title> <btnSoundRemove type='str'>Remove</btnSoundRemove> @@ -9,6 +10,7 @@ <gui_conf_accept_bt type='str'>Accept</gui_conf_accept_bt> <help_text type='str'> </help_text> + <lblWifiAvoidance type='str'>Avoid the wifi channel number :</lblWifiAvoidance> <itemCPU type='str'>Flash the CPUs</itemCPU> <btnSoundPlayMic type='str'>Play</btnSoundPlayMic> <lblSoundLocal type='str'>Play local wave files</lblSoundLocal> @@ -16,29 +18,34 @@ <gui_conf_update_title type='str'>Update</gui_conf_update_title> <lblTabConfig type='str'>Configuration</lblTabConfig> <gui_conf_cancel_bt type='str'>Cancel</gui_conf_cancel_bt> + <btnUpdate type='str'>Check for updates</btnUpdate> <gui_conf_delay_lb type='str'>Delay (sec)</gui_conf_delay_lb> <btnSoundRecordMic type='str'>Record</btnSoundRecordMic> <gui_conf_about_title type='str'>About</gui_conf_about_title> <chkSoundOriginal type='str'>Include originals</chkSoundOriginal> <btnSoundClear type='str'>Clear list</btnSoundClear> - <lblSoundMic type='str'>Microphone</lblSoundMic> + <speaker_name type='str'>Ryan8k</speaker_name> <itemChangeLog type='str'>Show ChangeLog</itemChangeLog> <lblSoundLocalSelect type='str'>Select sound</lblSoundLocalSelect> <lblSoundExternal type='str'>Play external wave file</lblSoundExternal> + <lblConfigSleep type='str'>Sleep configuration</lblConfigSleep> <gui_conf_description_lb type='str'>Description</gui_conf_description_lb> <gui_conf_author_lb type='str'>Author</gui_conf_author_lb> <treeVersionVer type='str'>Version</treeVersionVer> + <lblConfigWifi type='str'>Wifi configuration</lblConfigWifi> <treeVersionProg type='str'>Component</treeVersionProg> <lblSoundExternalPlay type='str'>Play</lblSoundExternalPlay> <gui_conf_current_bind_lb type='str'>Current</gui_conf_current_bind_lb> - <speaker_name type='str'>Ryan8k</speaker_name> + <lblSoundMic type='str'>Microphone</lblSoundMic> <gui_conf_remote_set_bt type='str'>Set</gui_conf_remote_set_bt> <name_to_read type='str'>Tux settings</name_to_read> <gui_conf_window_title type='str'>Parameters</gui_conf_window_title> + <lblUsedChannel type='str'>Used channel :</lblUsedChannel> <lblTabSound type='str'>Audio</lblTabSound> <btnSoundStore type='str'>Store</btnSoundStore> <lblVersions type='str'>Installed versions</lblVersions> <btnSoundModify type='str'>Modify</btnSoundModify> + <lblConfigID type='str'>ID configuration</lblConfigID> <lblTabVersion type='str'>Versions</lblTabVersion> <btnSoundPlayNum type='str'>Play</btnSoundPlayNum> <lblSoundStore type='str'>Store wave files locally</lblSoundStore> Modified: software/gadgets/settings/trunk/settings.tgf =================================================================== (Binary files differ) |
From: Paul_R <c2m...@c2...> - 2007-11-06 20:29:02
|
Author: Paul_R Date: 2007-11-06 21:28:52 +0100 (Tue, 06 Nov 2007) New Revision: 661 Modified: software/gadgets/settings/trunk/settings.tgf software/gadgets/settings/trunk/settings/Scripts/Python/GUI/widget/other.pyp software/gadgets/settings/trunk/settings/about.xml software/gadgets/settings/trunk/settings/strings.xml Log: * Added expanders on the version treeviews Modified: software/gadgets/settings/trunk/settings/Scripts/Python/GUI/widget/other.pyp =================================================================== --- software/gadgets/settings/trunk/settings/Scripts/Python/GUI/widget/other.pyp 2007-11-06 15:40:31 UTC (rev 660) +++ software/gadgets/settings/trunk/settings/Scripts/Python/GUI/widget/other.pyp 2007-11-06 20:28:52 UTC (rev 661) @@ -36,57 +36,41 @@ self.FileTreeviewUpdate() def VersionTreeviewUpdate(self): - #Create the treeview - self.prog_column = gtk.TreeViewColumn(_me.string('treeVersionProg')) - self.prog_column.set_min_width(200) - self.prog_cell = gtk.CellRendererText() - self.prog_column.pack_start(self.prog_cell, True) - self.prog_column.add_attribute(self.prog_cell, 'text', 0) - - self.version_column = gtk.TreeViewColumn(_me.string('treeVersionVer')) - self.version_column.set_min_width(200) - self.version_cell = gtk.CellRendererText() - self.version_column.pack_start(self.version_cell, True) - self.version_column.add_attribute(self.version_cell, 'text', 1) - - self.ver_value_list = gtk.TreeStore(str, str) - self.ver_gadget_viewer = gtk.TreeView(self.ver_value_list) - self.ver_gadget_viewer.append_column(self.prog_column) - self.ver_gadget_viewer.append_column(self.version_column) - self.ver_gadget_viewer.set_rules_hint(True) - self.ver_gadget_viewer.get_selection().connect("changed",self.on_row_selected_version) - self.get_widget("scrolledwindow2").add(self.ver_gadget_viewer) - self.get_widget("scrolledwindow2").show_all() - + self.cpu_tree_store = gtk.TreeStore( str, str ) + self.cpu_view = gtk.TreeView(self.cpu_tree_store) + self.cpu_renderer = gtk.CellRendererText() + self.cpu_column = gtk.TreeViewColumn(_me.string('treeVersionProg'), self.cpu_renderer, text=0) + self.cpu_column.set_min_width(300) + self.cpu_column.add_attribute(self.cpu_renderer, 'text', 0) + self.cpu_ver_renderer = gtk.CellRendererText() + self.cpu_ver_column = gtk.TreeViewColumn(_me.string('treeVersionVer'), self.cpu_ver_renderer ) + self.cpu_ver_column.set_min_width(300) + self.cpu_ver_column.add_attribute(self.cpu_ver_renderer, 'text', 1) + self.cpu_view.append_column( self.cpu_column ) + self.cpu_view.append_column( self.cpu_ver_column ) + self.cpu_view.set_rules_hint(True) + self.get_widget("scrolledwindow2").add(self.cpu_view) + self.get_widget("scrolledwindow2").show_all() self.refresh_version() def FileTreeviewUpdate(self): - self.firmware_column = gtk.TreeViewColumn(_me.string('treeVersionProg')) - self.firmware_column.set_min_width(300) - self.firmware_cell = gtk.CellRendererText() - self.firmware_column.pack_start(self.firmware_cell, True) - self.firmware_column.add_attribute(self.firmware_cell, 'text', 0) - - self.fversion_column = gtk.TreeViewColumn(_me.string('treeVersionVer')) - self.fversion_column.set_min_width(200) - self.fversion_cell = gtk.CellRendererText() - self.fversion_column.pack_start(self.fversion_cell, True) - self.fversion_column.add_attribute(self.fversion_cell, 'text', 1) - - self.f_value_list = gtk.TreeStore(str, str) - self.f_gadget_viewer = gtk.TreeView(self.f_value_list) - self.f_gadget_viewer.append_column(self.firmware_column) - self.f_gadget_viewer.append_column(self.fversion_column) - self.f_gadget_viewer.set_rules_hint(True) - self.f_gadget_viewer.get_selection().connect("changed",self.on_row_selected_firmware) - self.f_gadget_viewer.connect("button_press_event", self.on_tree_button_pressed) - self.get_widget("scrolledwindow3").add(self.f_gadget_viewer) - self.get_widget("scrolledwindow3").show_all() - + self.file_tree_store = gtk.TreeStore( str, str ) + self.file_view = gtk.TreeView(self.file_tree_store) + self.file_renderer = gtk.CellRendererText() + self.file_column = gtk.TreeViewColumn(_me.string('treeVersionProg'), self.file_renderer, text=0) + self.file_column.set_min_width(300) + self.file_column.add_attribute(self.file_renderer, 'text', 0) + self.file_ver_renderer = gtk.CellRendererText() + self.file_ver_column = gtk.TreeViewColumn(_me.string('treeVersionVer'), self.file_ver_renderer ) + self.file_ver_column.set_min_width(300) + self.file_ver_column.add_attribute(self.file_ver_renderer, 'text', 1) + self.file_view.append_column( self.file_column ) + self.file_view.append_column( self.file_ver_column ) + self.file_view.connect("button_press_event", self.on_tree_button_pressed) + self.get_widget("scrolledwindow3").add(self.file_view) + self.get_widget("scrolledwindow3").show_all() self.searchFiles() - self.refresh_files() - def SoundLabelUpdate(self): self.get_widget('btnSoundAdd').set_label(_me.string('btnSoundAdd')) self.get_widget('btnSoundClear').set_label(_me.string('btnSoundClear')) @@ -138,34 +122,24 @@ # VERSION TAB # #--------------------------------------------------------------------------- - def on_row_selected_version(self, obj): - path = obj.get_selected_rows() - if path[1]!= []: - if path[1][0][0] == 2 and self.prev == False: - self.ver_value_list.clear() - self.prev = True - for i in range(len(self.version_table)): - self.ver_value_list.append(None,self.version_table[i]) - elif self.prev == True and path[1][0][0] == 2: - self.prev = False - self.ver_value_list.clear() - for i in range(3): - self.ver_value_list.append(None,self.version_table[i]) - - def on_row_selected_firmware(self, obj): - print 'row selected' - + + #-------------------------------------------------------------------------- + # Search for local files + #-------------------------------------------------------------------------- def searchFiles(self): filelist = os.listdir('/opt/tuxdroid/firmware') tmppath = [] + flag = -1 for file in filelist: if file.lower().find('.tar.gz') != -1: tmppath.append([file, '']) + flag = 1 self.filepath = tmppath - print self.filepath + if flag != -1: + self.refresh_files() def refresh_files(self): - self.f_value_list.clear() + self.file_tree_store.clear() for i in range(len(self.filepath)): proc = subprocess.Popen("tar -C '/tmp' -xvf '/opt/tuxdroid/firmware/%s'"%self.filepath[i][0], shell = True, stdout = subprocess.PIPE) proc.wait() @@ -174,36 +148,11 @@ print self.filepath os.system('rm -rf /tmp/tuxdroid-firmware*') - self.f_value_list.clear() for i in range(len(self.filepath)): - self.f_value_list.append(None, self.filepath[i]) - - def on_tree_button_pressed(self, widget, event): - def show_popup(p, button, time): - tux.sys.wait(0.1) - self.show_gadget_popup(p, button, time) - if event.button == 3: # right click - thread.start_new_thread(show_popup, (None, event.button, event.time)) + tmp = 0 + tmp = self.file_tree_store.append(None, (self.filepath[i][0], self.filepath[i][1])) + self.file_tree_store.append(tmp, (self.filepath[i][0],self.filepath[i][1])) - def show_gadget_popup(self, status_icon, button, activate_time): - menu = gtk.Menu() - item = gtk.CheckMenuItem(_me.string('itemChangeLog')) - item.connect("activate", self.showChangeLog) - menu.append(item) - - item = gtk.CheckMenuItem(_me.string('itemCPU')) - item.connect("activate", self.flashCPU) - menu.append(item) - - menu.show_all() - menu.popup(None, None, None, button, activate_time) - - def showChangeLog(self, widget): - print 'show ChangeLog' - - def flashCPU(self, widget): - print 'flash CPU' - def get_new_version_infos(self): filelist = os.listdir('/tmp') tmppath = '' @@ -216,52 +165,92 @@ version = racine[0].getElementsByTagName('version') ver = version[0].attributes['tuxdroid_firmware_version'].nodeValue return ver - - + + #-------------------------------------------------------------------------- + # Retreive tux HW and SW versions + #-------------------------------------------------------------------------- def refresh_version(self): + + self.cpu_tree_store.clear() version_table = [] + name = 'Daemon' version = tux.daemon.get_version() version_table.append([name,version]) + self.cpu_tree_store.append(None, (name, version)) name = 'API' version = tux.api_version version_table.append([name,version]) + self.cpu_tree_store.append( None,(name, version)) name = 'Firmware' version = 'Get the general firmware version' version_table.append([name,version]) + tmp = self.cpu_tree_store.append( None,(name, version)) - name = ' Tuxcore' + name = 'Tuxcore' version = tux.hw.behavior_get_version() version = str(version[0])+'.'+str(version[1])+'.'+str(version[2]) version_table.append([name,version]) + self.cpu_tree_store.append( tmp,(name, version)) - name = ' Tuxaudio' + name = 'Tuxaudio' version = tux.hw.audio_get_version() version = str(version[0])+'.'+str(version[1])+'.'+str(version[2]) version_table.append([name,version]) + self.cpu_tree_store.append( tmp,(name, version)) - name = ' Tux RF' + name = 'Tux RF' version = tux.hw.tuxrf_get_version() version = str(version[0])+'.'+str(version[1])+'.'+str(version[2]) version_table.append([name,version]) - - name = ' Fux RF' + self.cpu_tree_store.append( tmp,(name, version)) + + name = 'Fux RF' version = tux.hw.donglerf_get_version() version = str(version[0])+'.'+str(version[1])+'.'+str(version[2]) version_table.append([name,version]) + self.cpu_tree_store.append( tmp,(name, version)) - name = ' Fux USB' + name = 'Fux USB' version = 'Get the USB version' version_table.append([name,version]) + self.cpu_tree_store.append( tmp,(name, version)) + + #-------------------------------------------------------------------------- + # On right click & Menu functions + #-------------------------------------------------------------------------- + def on_tree_button_pressed(self, widget, event): + def show_popup(p, button, time): + tux.sys.wait(0.1) + self.show_gadget_popup(p, button, time) + if event.button == 3: # right click + thread.start_new_thread(show_popup, (None, event.button, event.time)) + + def show_gadget_popup(self, status_icon, button, activate_time): + menu = gtk.Menu() + item = gtk.CheckMenuItem(_me.string('itemChangeLog')) + item.connect("activate", self.showChangeLog) + menu.append(item) + + item = gtk.CheckMenuItem(_me.string('itemCPU')) + item.connect("activate", self.flashCPU) + menu.append(item) - self.ver_value_list.clear() - for i in range(3): - self.ver_value_list.append(None,version_table[i]) - self.version_table = version_table + menu.show_all() + menu.popup(None, None, None, button, activate_time) + + + def showChangeLog(self, widget): + print 'show ChangeLog' + + def flashCPU(self, widget): + print 'flash CPU' + + #--------------------------------------------------------------------------- # # SOUND TAB Modified: software/gadgets/settings/trunk/settings/about.xml =================================================================== (Binary files differ) Modified: software/gadgets/settings/trunk/settings/strings.xml =================================================================== --- software/gadgets/settings/trunk/settings/strings.xml 2007-11-06 15:40:31 UTC (rev 660) +++ software/gadgets/settings/trunk/settings/strings.xml 2007-11-06 20:28:52 UTC (rev 661) @@ -21,7 +21,7 @@ <gui_conf_about_title type='str'>About</gui_conf_about_title> <chkSoundOriginal type='str'>Include originals</chkSoundOriginal> <btnSoundClear type='str'>Clear list</btnSoundClear> - <speaker_name type='str'>Ryan8k</speaker_name> + <lblSoundMic type='str'>Microphone</lblSoundMic> <itemChangeLog type='str'>Show ChangeLog</itemChangeLog> <lblSoundLocalSelect type='str'>Select sound</lblSoundLocalSelect> <lblSoundExternal type='str'>Play external wave file</lblSoundExternal> @@ -31,7 +31,7 @@ <treeVersionProg type='str'>Component</treeVersionProg> <lblSoundExternalPlay type='str'>Play</lblSoundExternalPlay> <gui_conf_current_bind_lb type='str'>Current</gui_conf_current_bind_lb> - <lblSoundMic type='str'>Microphone</lblSoundMic> + <speaker_name type='str'>Ryan8k</speaker_name> <gui_conf_remote_set_bt type='str'>Set</gui_conf_remote_set_bt> <name_to_read type='str'>Tux settings</name_to_read> <gui_conf_window_title type='str'>Parameters</gui_conf_window_title> Modified: software/gadgets/settings/trunk/settings.tgf =================================================================== (Binary files differ) |
From: Paul_R <c2m...@c2...> - 2007-11-06 15:40:44
|
Author: Paul_R Date: 2007-11-06 16:40:31 +0100 (Tue, 06 Nov 2007) New Revision: 660 Modified: software/gadgets/settings/trunk/settings.tgf software/gadgets/settings/trunk/settings/Scripts/Python/GUI/widget/other.glade software/gadgets/settings/trunk/settings/Scripts/Python/GUI/widget/other.pyp software/gadgets/settings/trunk/settings/Strings/fr_ALL.xml software/gadgets/settings/trunk/settings/about.xml software/gadgets/settings/trunk/settings/settings.xml software/gadgets/settings/trunk/settings/strings.xml Log: * Added the version tab. The function 'Show change log' and 'flash CPUs' aren't implemented yet. Modified: software/gadgets/settings/trunk/settings/Scripts/Python/GUI/widget/other.glade =================================================================== --- software/gadgets/settings/trunk/settings/Scripts/Python/GUI/widget/other.glade 2007-11-06 14:21:56 UTC (rev 659) +++ software/gadgets/settings/trunk/settings/Scripts/Python/GUI/widget/other.glade 2007-11-06 15:40:31 UTC (rev 660) @@ -64,7 +64,7 @@ <child> <widget class="GtkLabel" id="lblTabConfig"> <property name="visible">True</property> - <property name="label" translatable="yes">Main</property> + <property name="label" translatable="yes">Configuration</property> <property name="use_underline">False</property> <property name="use_markup">False</property> <property name="justify">GTK_JUSTIFY_LEFT</property> @@ -91,7 +91,148 @@ <property name="spacing">0</property> <child> - <placeholder/> + <widget class="GtkVBox" id="vbox4"> + <property name="visible">True</property> + <property name="homogeneous">False</property> + <property name="spacing">0</property> + + <child> + <widget class="GtkFrame" id="frame12"> + <property name="visible">True</property> + <property name="label_xalign">0</property> + <property name="label_yalign">0.5</property> + <property name="shadow_type">GTK_SHADOW_NONE</property> + + <child> + <widget class="GtkAlignment" id="alignment12"> + <property name="visible">True</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xscale">1</property> + <property name="yscale">1</property> + <property name="top_padding">0</property> + <property name="bottom_padding">0</property> + <property name="left_padding">12</property> + <property name="right_padding">0</property> + + <child> + <widget class="GtkScrolledWindow" id="scrolledwindow2"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="hscrollbar_policy">GTK_POLICY_NEVER</property> + <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property> + <property name="shadow_type">GTK_SHADOW_NONE</property> + <property name="window_placement">GTK_CORNER_TOP_LEFT</property> + + <child> + <placeholder/> + </child> + </widget> + </child> + </widget> + </child> + + <child> + <widget class="GtkLabel" id="lblVersions"> + <property name="visible">True</property> + <property name="label" translatable="yes"><b>frame12</b></property> + <property name="use_underline">False</property> + <property name="use_markup">True</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="type">label_item</property> + </packing> + </child> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">True</property> + <property name="fill">True</property> + </packing> + </child> + + <child> + <widget class="GtkFrame" id="frame13"> + <property name="visible">True</property> + <property name="label_xalign">0</property> + <property name="label_yalign">0.5</property> + <property name="shadow_type">GTK_SHADOW_NONE</property> + + <child> + <widget class="GtkAlignment" id="alignment13"> + <property name="visible">True</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xscale">1</property> + <property name="yscale">1</property> + <property name="top_padding">0</property> + <property name="bottom_padding">0</property> + <property name="left_padding">12</property> + <property name="right_padding">0</property> + + <child> + <widget class="GtkScrolledWindow" id="scrolledwindow3"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="hscrollbar_policy">GTK_POLICY_NEVER</property> + <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property> + <property name="shadow_type">GTK_SHADOW_NONE</property> + <property name="window_placement">GTK_CORNER_TOP_LEFT</property> + + <child> + <placeholder/> + </child> + </widget> + </child> + </widget> + </child> + + <child> + <widget class="GtkLabel" id="lblLocal"> + <property name="visible">True</property> + <property name="label" translatable="yes"><b>frame13</b></property> + <property name="use_underline">False</property> + <property name="use_markup">True</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="type">label_item</property> + </packing> + </child> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">True</property> + <property name="fill">True</property> + </packing> + </child> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">True</property> + <property name="fill">True</property> + </packing> </child> </widget> <packing> @@ -103,7 +244,7 @@ <child> <widget class="GtkLabel" id="lblTabVersion"> <property name="visible">True</property> - <property name="label" translatable="yes">TTS</property> + <property name="label" translatable="yes">Version</property> <property name="use_underline">False</property> <property name="use_markup">False</property> <property name="justify">GTK_JUSTIFY_LEFT</property> Modified: software/gadgets/settings/trunk/settings/Scripts/Python/GUI/widget/other.pyp =================================================================== --- software/gadgets/settings/trunk/settings/Scripts/Python/GUI/widget/other.pyp 2007-11-06 14:21:56 UTC (rev 659) +++ software/gadgets/settings/trunk/settings/Scripts/Python/GUI/widget/other.pyp 2007-11-06 15:40:31 UTC (rev 660) @@ -1,12 +1,17 @@ bindtextdomain("params", "") soundcard = tux.hw.alsa_device +from xml.dom import minidom, Node +from xml.dom.minidom import Document +import subprocess + class Window(SimpleGladeApp): def __init__(self, path=_me.get_path('root') + '/Scripts/Python/GUI/widget/other.glade', root="window1", domain="params", **kwargs): SimpleGladeApp.__init__(self, path, root, domain, **kwargs) + self.prev = False def new(self): self.get_widget("window1").set_title(_me.string('name_to_read')) @@ -17,10 +22,71 @@ self.get_widget('lblTabSound').set_text(_me.string('lblTabSound')) self.get_widget('lblTabVersion').set_text(_me.string('lblTabVersion')) + self.ConfigLabelUpdate() + self.VersionsLabelUpdate() self.SoundLabelUpdate() - self.treeview_update() - self.get_widget('progressbar1').hide() + + def ConfigLabelUpdate(self): + self.get_widget('lblVersions').set_text(_me.string('lblVersions')) + self.get_widget('lblLocal').set_text(_me.string('lblLocal')) + + def VersionsLabelUpdate(self): + self.VersionTreeviewUpdate() + self.FileTreeviewUpdate() + + def VersionTreeviewUpdate(self): + #Create the treeview + self.prog_column = gtk.TreeViewColumn(_me.string('treeVersionProg')) + self.prog_column.set_min_width(200) + self.prog_cell = gtk.CellRendererText() + self.prog_column.pack_start(self.prog_cell, True) + self.prog_column.add_attribute(self.prog_cell, 'text', 0) + + self.version_column = gtk.TreeViewColumn(_me.string('treeVersionVer')) + self.version_column.set_min_width(200) + self.version_cell = gtk.CellRendererText() + self.version_column.pack_start(self.version_cell, True) + self.version_column.add_attribute(self.version_cell, 'text', 1) + + self.ver_value_list = gtk.TreeStore(str, str) + self.ver_gadget_viewer = gtk.TreeView(self.ver_value_list) + self.ver_gadget_viewer.append_column(self.prog_column) + self.ver_gadget_viewer.append_column(self.version_column) + self.ver_gadget_viewer.set_rules_hint(True) + self.ver_gadget_viewer.get_selection().connect("changed",self.on_row_selected_version) + self.get_widget("scrolledwindow2").add(self.ver_gadget_viewer) + self.get_widget("scrolledwindow2").show_all() + + self.refresh_version() + + def FileTreeviewUpdate(self): + self.firmware_column = gtk.TreeViewColumn(_me.string('treeVersionProg')) + self.firmware_column.set_min_width(300) + self.firmware_cell = gtk.CellRendererText() + self.firmware_column.pack_start(self.firmware_cell, True) + self.firmware_column.add_attribute(self.firmware_cell, 'text', 0) + + self.fversion_column = gtk.TreeViewColumn(_me.string('treeVersionVer')) + self.fversion_column.set_min_width(200) + self.fversion_cell = gtk.CellRendererText() + self.fversion_column.pack_start(self.fversion_cell, True) + self.fversion_column.add_attribute(self.fversion_cell, 'text', 1) + + self.f_value_list = gtk.TreeStore(str, str) + self.f_gadget_viewer = gtk.TreeView(self.f_value_list) + self.f_gadget_viewer.append_column(self.firmware_column) + self.f_gadget_viewer.append_column(self.fversion_column) + self.f_gadget_viewer.set_rules_hint(True) + self.f_gadget_viewer.get_selection().connect("changed",self.on_row_selected_firmware) + self.f_gadget_viewer.connect("button_press_event", self.on_tree_button_pressed) + self.get_widget("scrolledwindow3").add(self.f_gadget_viewer) + self.get_widget("scrolledwindow3").show_all() + + self.searchFiles() + self.refresh_files() + + def SoundLabelUpdate(self): self.get_widget('btnSoundAdd').set_label(_me.string('btnSoundAdd')) self.get_widget('btnSoundClear').set_label(_me.string('btnSoundClear')) @@ -41,13 +107,10 @@ self.get_widget('lblSoundMic').set_text(_me.string('lblSoundMic')) self.get_widget('lblSoundStore').set_text(_me.string('lblSoundStore')) - - - + self.SoundTreeviewUpdate() + self.get_widget('progressbar1').hide() - - - def treeview_update(self): + def SoundTreeviewUpdate(self): self.index_column = gtk.TreeViewColumn('Index') self.index_column.set_min_width(50) self.index_cell = gtk.CellRendererText() @@ -64,6 +127,7 @@ self.gadget_viewer = gtk.TreeView(self.value_list) self.gadget_viewer.append_column(self.index_column) self.gadget_viewer.append_column(self.event_column) + self.gadget_viewer.set_rules_hint(True) self.gadget_viewer.get_selection().connect("changed",self.on_row_selected) self.get_widget("scrolledwindow1").add(self.gadget_viewer) self.get_widget("scrolledwindow1").show_all() @@ -71,6 +135,135 @@ #--------------------------------------------------------------------------- # +# VERSION TAB +# +#--------------------------------------------------------------------------- + def on_row_selected_version(self, obj): + path = obj.get_selected_rows() + if path[1]!= []: + if path[1][0][0] == 2 and self.prev == False: + self.ver_value_list.clear() + self.prev = True + for i in range(len(self.version_table)): + self.ver_value_list.append(None,self.version_table[i]) + elif self.prev == True and path[1][0][0] == 2: + self.prev = False + self.ver_value_list.clear() + for i in range(3): + self.ver_value_list.append(None,self.version_table[i]) + + def on_row_selected_firmware(self, obj): + print 'row selected' + + def searchFiles(self): + filelist = os.listdir('/opt/tuxdroid/firmware') + tmppath = [] + for file in filelist: + if file.lower().find('.tar.gz') != -1: + tmppath.append([file, '']) + self.filepath = tmppath + print self.filepath + + def refresh_files(self): + self.f_value_list.clear() + for i in range(len(self.filepath)): + proc = subprocess.Popen("tar -C '/tmp' -xvf '/opt/tuxdroid/firmware/%s'"%self.filepath[i][0], shell = True, stdout = subprocess.PIPE) + proc.wait() + version = self.get_new_version_infos() + self.filepath[i][1] = str(version) + print self.filepath + os.system('rm -rf /tmp/tuxdroid-firmware*') + + self.f_value_list.clear() + for i in range(len(self.filepath)): + self.f_value_list.append(None, self.filepath[i]) + + def on_tree_button_pressed(self, widget, event): + def show_popup(p, button, time): + tux.sys.wait(0.1) + self.show_gadget_popup(p, button, time) + if event.button == 3: # right click + thread.start_new_thread(show_popup, (None, event.button, event.time)) + + def show_gadget_popup(self, status_icon, button, activate_time): + menu = gtk.Menu() + item = gtk.CheckMenuItem(_me.string('itemChangeLog')) + item.connect("activate", self.showChangeLog) + menu.append(item) + + item = gtk.CheckMenuItem(_me.string('itemCPU')) + item.connect("activate", self.flashCPU) + menu.append(item) + + menu.show_all() + menu.popup(None, None, None, button, activate_time) + + def showChangeLog(self, widget): + print 'show ChangeLog' + + def flashCPU(self, widget): + print 'flash CPU' + + def get_new_version_infos(self): + filelist = os.listdir('/tmp') + tmppath = '' + for file in filelist: + if file.lower().find('tuxdroid-firmware') != -1: + print 'tick' + tmppath = file + dom = minidom.parse('/tmp/%s/info.xml' % tmppath) + racine = dom.getElementsByTagName('root') + version = racine[0].getElementsByTagName('version') + ver = version[0].attributes['tuxdroid_firmware_version'].nodeValue + return ver + + + + def refresh_version(self): + version_table = [] + name = 'Daemon' + version = tux.daemon.get_version() + version_table.append([name,version]) + + name = 'API' + version = tux.api_version + version_table.append([name,version]) + + name = 'Firmware' + version = 'Get the general firmware version' + version_table.append([name,version]) + + name = ' Tuxcore' + version = tux.hw.behavior_get_version() + version = str(version[0])+'.'+str(version[1])+'.'+str(version[2]) + version_table.append([name,version]) + + name = ' Tuxaudio' + version = tux.hw.audio_get_version() + version = str(version[0])+'.'+str(version[1])+'.'+str(version[2]) + version_table.append([name,version]) + + name = ' Tux RF' + version = tux.hw.tuxrf_get_version() + version = str(version[0])+'.'+str(version[1])+'.'+str(version[2]) + version_table.append([name,version]) + + name = ' Fux RF' + version = tux.hw.donglerf_get_version() + version = str(version[0])+'.'+str(version[1])+'.'+str(version[2]) + version_table.append([name,version]) + + name = ' Fux USB' + version = 'Get the USB version' + version_table.append([name,version]) + + self.ver_value_list.clear() + for i in range(3): + self.ver_value_list.append(None,version_table[i]) + self.version_table = version_table + +#--------------------------------------------------------------------------- +# # SOUND TAB # #--------------------------------------------------------------------------- Modified: software/gadgets/settings/trunk/settings/Strings/fr_ALL.xml =================================================================== --- software/gadgets/settings/trunk/settings/Strings/fr_ALL.xml 2007-11-06 14:21:56 UTC (rev 659) +++ software/gadgets/settings/trunk/settings/Strings/fr_ALL.xml 2007-11-06 15:40:31 UTC (rev 660) @@ -1,5 +1,6 @@ <?xml version='1.0' encoding='UTF-8'?> <strings> + <lblLocal type='str'>Versions disponibles</lblLocal> <gui_conf_remote_title type='str'>Télécommande</gui_conf_remote_title> <btnSoundRemove type='str'>Enlever</btnSoundRemove> <lblSoundExternalFile type='str'>Fichier :</lblSoundExternalFile> @@ -8,6 +9,7 @@ <gui_conf_accept_bt type='str'>Valider</gui_conf_accept_bt> <help_text type='str'> </help_text> + <itemCPU type='str'>Flasher les processeurs</itemCPU> <btnSoundPlayMic type='str'>Lire</btnSoundPlayMic> <lblSoundLocal type='str'>Lire un wave local</lblSoundLocal> <gui_conf_version_lb type='str'>Version</gui_conf_version_lb> @@ -20,10 +22,13 @@ <chkSoundOriginal type='str'>Fichier originaux</chkSoundOriginal> <btnSoundClear type='str'>Purger</btnSoundClear> <lblSoundMic type='str'>Microphone</lblSoundMic> + <itemChangeLog type='str'>Voir les changements</itemChangeLog> <lblSoundLocalSelect type='str'>Selectionner un son :</lblSoundLocalSelect> <lblSoundExternal type='str'>Lire un wave externe</lblSoundExternal> <gui_conf_description_lb type='str'>Description</gui_conf_description_lb> <gui_conf_author_lb type='str'>Auteur</gui_conf_author_lb> + <treeVersionVer type='str'>Version</treeVersionVer> + <treeVersionProg type='str'>Component</treeVersionProg> <lblSoundExternalPlay type='str'>Lecture</lblSoundExternalPlay> <gui_conf_current_bind_lb type='str'>Assignation</gui_conf_current_bind_lb> <speaker_name type='str'>Bruno8k</speaker_name> @@ -32,6 +37,7 @@ <gui_conf_window_title type='str'>Paramètres</gui_conf_window_title> <lblTabSound type='str'>Audio</lblTabSound> <btnSoundStore type='str'>Ecrire</btnSoundStore> + <lblVersions type='str'>Versions installées</lblVersions> <btnSoundModify type='str'>Modifier</btnSoundModify> <lblTabVersion type='str'>Versions</lblTabVersion> <btnSoundPlayNum type='str'>Lire</btnSoundPlayNum> Modified: software/gadgets/settings/trunk/settings/about.xml =================================================================== (Binary files differ) Modified: software/gadgets/settings/trunk/settings/settings.xml =================================================================== --- software/gadgets/settings/trunk/settings/settings.xml 2007-11-06 14:21:56 UTC (rev 659) +++ software/gadgets/settings/trunk/settings/settings.xml 2007-11-06 15:40:31 UTC (rev 660) @@ -1,14 +1,14 @@ <?xml version='1.0' encoding='UTF-8'?> <settings> <parameters> - <hidden_in_manager type='bool'>True</hidden_in_manager> + <hidden_in_manager type='bool'>False</hidden_in_manager> </parameters> <general> <gui_state> <widget> <y type='int'>176</y> <visible type='bool'>True</visible> - <x type='int'>1058</x> + <x type='int'>1019</x> </widget> <conf> <y type='int'>50</y> @@ -20,7 +20,9 @@ <notified type='bool'>True</notified> <notify_delay type='int'>60</notify_delay> <menu_active type='bool'>True</menu_active> + <main_priority type='int'>4</main_priority> <speaker type='int'>3</speaker> <pitch type='int'>100</pitch> + <notify_priority type='int'>4</notify_priority> </general> </settings> Modified: software/gadgets/settings/trunk/settings/strings.xml =================================================================== --- software/gadgets/settings/trunk/settings/strings.xml 2007-11-06 14:21:56 UTC (rev 659) +++ software/gadgets/settings/trunk/settings/strings.xml 2007-11-06 15:40:31 UTC (rev 660) @@ -1,5 +1,6 @@ <?xml version='1.0' encoding='UTF-8'?> <strings> + <lblLocal type='str'>Available versions</lblLocal> <gui_conf_remote_title type='str'>Remote</gui_conf_remote_title> <btnSoundRemove type='str'>Remove</btnSoundRemove> <lblSoundExternalFile type='str'>File :</lblSoundExternalFile> @@ -8,6 +9,7 @@ <gui_conf_accept_bt type='str'>Accept</gui_conf_accept_bt> <help_text type='str'> </help_text> + <itemCPU type='str'>Flash the CPUs</itemCPU> <btnSoundPlayMic type='str'>Play</btnSoundPlayMic> <lblSoundLocal type='str'>Play local wave files</lblSoundLocal> <gui_conf_version_lb type='str'>Version</gui_conf_version_lb> @@ -20,10 +22,13 @@ <chkSoundOriginal type='str'>Include originals</chkSoundOriginal> <btnSoundClear type='str'>Clear list</btnSoundClear> <speaker_name type='str'>Ryan8k</speaker_name> + <itemChangeLog type='str'>Show ChangeLog</itemChangeLog> <lblSoundLocalSelect type='str'>Select sound</lblSoundLocalSelect> <lblSoundExternal type='str'>Play external wave file</lblSoundExternal> <gui_conf_description_lb type='str'>Description</gui_conf_description_lb> <gui_conf_author_lb type='str'>Author</gui_conf_author_lb> + <treeVersionVer type='str'>Version</treeVersionVer> + <treeVersionProg type='str'>Component</treeVersionProg> <lblSoundExternalPlay type='str'>Play</lblSoundExternalPlay> <gui_conf_current_bind_lb type='str'>Current</gui_conf_current_bind_lb> <lblSoundMic type='str'>Microphone</lblSoundMic> @@ -32,6 +37,7 @@ <gui_conf_window_title type='str'>Parameters</gui_conf_window_title> <lblTabSound type='str'>Audio</lblTabSound> <btnSoundStore type='str'>Store</btnSoundStore> + <lblVersions type='str'>Installed versions</lblVersions> <btnSoundModify type='str'>Modify</btnSoundModify> <lblTabVersion type='str'>Versions</lblTabVersion> <btnSoundPlayNum type='str'>Play</btnSoundPlayNum> Modified: software/gadgets/settings/trunk/settings.tgf =================================================================== (Binary files differ) |
From: jaguarondi <c2m...@c2...> - 2007-11-06 14:21:56
|
Author: jaguarondi Date: 2007-11-06 15:21:56 +0100 (Tue, 06 Nov 2007) New Revision: 659 Modified: daemon/trunk/libs/USBDaemon_command_tux.h daemon/trunk/libs/USBDaemon_globals.h daemon/trunk/libs/USBDaemon_log.c daemon/trunk/libs/USBDaemon_pidfile.c daemon/trunk/libs/USBDaemon_tcp_server.c daemon/trunk/libs/USBDaemon_usb.c Log: * Consistency on doxygen comments. Modified: daemon/trunk/libs/USBDaemon_command_tux.h =================================================================== --- daemon/trunk/libs/USBDaemon_command_tux.h 2007-11-06 13:59:47 UTC (rev 658) +++ daemon/trunk/libs/USBDaemon_command_tux.h 2007-11-06 14:21:56 UTC (rev 659) @@ -1,4 +1,3 @@ - /* * Tux Droid - USB Daemon * Copyright (C) 2007 C2ME Sa <rem...@c2...> Modified: daemon/trunk/libs/USBDaemon_globals.h =================================================================== --- daemon/trunk/libs/USBDaemon_globals.h 2007-11-06 13:59:47 UTC (rev 658) +++ daemon/trunk/libs/USBDaemon_globals.h 2007-11-06 14:21:56 UTC (rev 659) @@ -1,4 +1,3 @@ - /* * Tux Droid - USB Daemon * Copyright (C) 2007 C2ME Sa <rem...@c2...> Modified: daemon/trunk/libs/USBDaemon_log.c =================================================================== --- daemon/trunk/libs/USBDaemon_log.c 2007-11-06 13:59:47 UTC (rev 658) +++ daemon/trunk/libs/USBDaemon_log.c 2007-11-06 14:21:56 UTC (rev 659) @@ -48,11 +48,11 @@ static bool log_opened; /** - * @brief Open the log. + * Open the log. * - * @param[in] target Logging target + * /param[in] target Logging target * - * @return true if successfull, false otherwise + * /return true if successfull, false otherwise */ bool log_open(log_target_t target) { @@ -82,7 +82,7 @@ } /** - * @brief Close the log. + * Close the log. */ void log_close(void) { @@ -108,9 +108,9 @@ } /** - * @brief Set the logging level. + * Set the logging level. * - * @param[in] new_level New logging level + * /param[in] new_level New logging level */ void log_set_level(log_level_t new_level) { @@ -119,9 +119,9 @@ } /** - * @brief Get the logging level. + * Get the logging level. * - * @return current logging level + * /return current logging level */ log_level_t log_get_level(void) { @@ -129,16 +129,16 @@ } /** - * @brief Log formatted message at the specified level. + * Log formatted message at the specified level. * - * @param[in] at_level Level to log the message at - * @param[in] fmt Message format - * @param[in] ... Optional message data + * /param[in] at_level Level to log the message at + * /param[in] fmt Message format + * /param[in] ... Optional message data * * If the priority of the specifed level is lower than the priority * of the current logging level, the message is silently dropped. * - * @return true if successful, false otherwise + * /return true if successful, false otherwise */ bool log_text(log_level_t at_level, const char *fmt, ...) { Modified: daemon/trunk/libs/USBDaemon_pidfile.c =================================================================== --- daemon/trunk/libs/USBDaemon_pidfile.c 2007-11-06 13:59:47 UTC (rev 658) +++ daemon/trunk/libs/USBDaemon_pidfile.c 2007-11-06 14:21:56 UTC (rev 659) @@ -44,9 +44,9 @@ /************************************************************************ */ /** - * @brief Read the pid from the pid file. + * Read the pid from the pid file. * - * @return 0 if either there's no pid file, it's empty or no pid can be read + * /return 0 if either there's no pid file, it's empty or no pid can be read */ int read_pid(void) { @@ -63,9 +63,9 @@ } /** - * @brief Check existence of the process whose pid is in the pid file. + * Check existence of the process whose pid is in the pid file. * - * @return 1 if the process exists, 0 otherwise + * /return 1 if the process exists, 0 otherwise */ int check_pid(void) { @@ -83,9 +83,9 @@ } /** - * @brief Write the current process' pid to the pid file. + * Write the current process' pid to the pid file. * - * @return Pid written if successful, 0 otherwise + * /return Pid written if successful, 0 otherwise */ int write_pid(void) { @@ -131,9 +131,9 @@ } /** - * @brief Delete the pid file. + * Delete the pid file. * - * @return result from unkink(2) + * /return result from unkink(2) */ int remove_pid(void) { Modified: daemon/trunk/libs/USBDaemon_tcp_server.c =================================================================== --- daemon/trunk/libs/USBDaemon_tcp_server.c 2007-11-06 13:59:47 UTC (rev 658) +++ daemon/trunk/libs/USBDaemon_tcp_server.c 2007-11-06 14:21:56 UTC (rev 659) @@ -53,7 +53,7 @@ /** * Update/check Tux status. * - * @return 1 if tux is present, 0 otherwise + * /return 1 if tux is present, 0 otherwise */ static int update_tux_status(void) { @@ -119,9 +119,9 @@ /** * Add a TCP client. * - * @param[in] sock Client's socket + * /param[in] sock Client's socket * - * @return client id if successful, -1 otherwise + * /return client id if successful, -1 otherwise */ static int tcp_add_client(int sock) { @@ -144,7 +144,7 @@ * The client's entry in the clients array is left empty (-1), so this * array may contain holes. * - * @param[in] id_client Id of client to remove + * /param[in] id_client Id of client to remove */ void tcp_remove_client(int id_client) { Modified: daemon/trunk/libs/USBDaemon_usb.c =================================================================== --- daemon/trunk/libs/USBDaemon_usb.c 2007-11-06 13:59:47 UTC (rev 658) +++ daemon/trunk/libs/USBDaemon_usb.c 2007-11-06 14:21:56 UTC (rev 659) @@ -39,7 +39,7 @@ * Searches all USB buses and returns the first device matching Tux * vendor and product id. * - * @return Device found or NULL if none + * /return Device found or NULL if none */ struct usb_device *usb_find_TuxDroid(void) { @@ -62,9 +62,9 @@ /** * Open the specified Tux device. * - * @param tux_dev Tux device (as returned by usb_find_TuxDroid()) + * /param tux_dev Tux device (as returned by usb_find_TuxDroid()) * - * @return Handle on the device if successful, NULL otherwise + * /return Handle on the device if successful, NULL otherwise */ static struct usb_dev_handle *usb_open_TuxDroid(struct usb_device *tux_dev) { @@ -122,7 +122,7 @@ /** * Capture a Tux droid. * - * @return 1 if successful, 0 otherwise + * /return 1 if successful, 0 otherwise */ int usb_capture_TuxDroid(void) { @@ -184,10 +184,10 @@ /** * Write data on Tux droid's USB device. * - * @param[in] buf Buffer to write - * @param[in] size Size of buffer + * /param[in] buf Buffer to write + * /param[in] size Size of buffer * - * @return number of bytes written if successful, < 0 otherwise + * /return number of bytes written if successful, < 0 otherwise */ int usb_write_TuxDroid(const void *buf, size_t size) { @@ -198,10 +198,10 @@ /** * Read data from Tux droid's USB device. * - * @param[out] buf Buffer to store data in - * @param[in] size Size of buffer + * /param[out] buf Buffer to store data in + * /param[in] size Size of buffer * - * @return number of bytes read if successful, < 0 otherwise + * /return number of bytes read if successful, < 0 otherwise */ int usb_read_TuxDroid(void *buf, size_t size) { @@ -262,9 +262,9 @@ * Send data to Tux droid over usb. * FIXME: the whole cmd_status_flag thing is clunky. * - * @param[in] data Data to send + * /param[in] data Data to send * - * @return Acknowledgement (ACK_xxx), may be success or error + * /return Acknowledgement (ACK_xxx), may be success or error */ unsigned char usb_send_TuxDroid(unsigned char data[TUX_SEND_LENGTH]) { |
From: jaguarondi <c2m...@c2...> - 2007-11-06 13:59:51
|
Author: jaguarondi Date: 2007-11-06 14:59:47 +0100 (Tue, 06 Nov 2007) New Revision: 658 Modified: daemon/trunk/libs/USBDaemon_status_table.c Log: * Fixed a bug in the version number parsing. * Added some debug logs for information status (version, revision, author, sounds in flash). Modified: daemon/trunk/libs/USBDaemon_status_table.c =================================================================== --- daemon/trunk/libs/USBDaemon_status_table.c 2007-11-06 10:26:43 UTC (rev 657) +++ daemon/trunk/libs/USBDaemon_status_table.c 2007-11-06 13:59:47 UTC (rev 658) @@ -63,8 +63,11 @@ tmp = (new_status[3] << 24) + (new_status[2] << 16) + (new_status[1] << 8) + (new_status[0]); hw_ver = (version_t *)&tmp; - last_cpu_ver = CPU_VER_MAJ(hw_ver->cpu_ver_maj); + last_cpu_ver = CPU_VER_CPU(hw_ver->cpu_ver_maj); hw_version[last_cpu_ver] = *hw_ver; + log_debug("version of %i: %i.%i.%i", CPU_VER_CPU(hw_ver->cpu_ver_maj), + CPU_VER_MAJ(hw_ver->cpu_ver_maj), hw_ver->ver_minor, + hw_ver->ver_update); } static void update_revision_table(const unsigned char *new_status) @@ -76,6 +79,7 @@ + (new_status[0]); hw_rev = (revision_t *)&tmp; hw_revision[last_cpu_ver] = *hw_rev; + log_debug("revision of %i: %i", last_cpu_ver, hw_rev->revision); } static void update_author_table(const unsigned char *new_status) @@ -87,11 +91,13 @@ + (new_status[0]); hw_aut = (author_t *)&tmp; hw_author[last_cpu_ver] = *hw_aut; + log_debug("author of %i: %i", last_cpu_ver, hw_aut->author_id); } static void update_sound_flash_count(const unsigned char *new_status) { sound_flash_count = new_status[1]; + log_debug("%i sounds in flash", sound_flash_count); } static void update_ir(const unsigned char *new_status) |
From: remi <c2m...@c2...> - 2007-11-06 10:26:45
|
Author: remi Date: 2007-11-06 11:26:43 +0100 (Tue, 06 Nov 2007) New Revision: 657 Modified: api/python/trunk/tuxapi_class.py Log: ADD: api_version in tux object UPD: switch object Modified: api/python/trunk/tuxapi_class.py =================================================================== --- api/python/trunk/tuxapi_class.py 2007-11-06 09:37:29 UTC (rev 656) +++ api/python/trunk/tuxapi_class.py 2007-11-06 10:26:43 UTC (rev 657) @@ -186,9 +186,9 @@ self.monitoring = TUXmonitoring(self) self.wav = TUXwav(self) self.micro = TUXmicro(self) + self._switches = [] + self.api_version = api_version - self.head_switch = TuxSwitch(self, STATUS_HEAD_PUSH_SWITCH) - self.connected=False #deprecated t=threading.Thread(target=self.daemon._loop_auto_connect) t.setName('daemon._loop_auto_connect') @@ -543,7 +543,11 @@ #on monitoring self.monitoring.check_events(data) - self.head_switch._notify(ord(data[4]), ord(data[5])) + for switch in self._switches: + try: + switch._notify(ord(data[4]), ord(data[5])) + except: + pass #-------------------------------------------------------------------------- @@ -5067,7 +5071,7 @@ self.parent = parent self.__wav_path = "" self.__wav_length = 0 - + def destroy(self): self.stop() @@ -5257,7 +5261,7 @@ self.capture_start_free(out_path, length) while self.__capturing: time.sleep(0.05) - + def capture_start_free(self, out_path, length = 0): """ Write the stream in a wav file. @@ -5606,16 +5610,17 @@ self.__status = status self.on_press = EventControl() self.on_release = EventControl() + self.parent._switches.append(self) - def _store_events(self): + def store_events(self): self.on_press.push() self.on_release.push() - def _restore_events(self): + def restore_events(self): self.on_press.pop() self.on_release.pop() - def _clear_events(self): + def clear_events(self): self.on_press.clear() self.on_release.clear() |
From: Paul_R <c2m...@c2...> - 2007-11-06 09:37:44
|
Author: Paul_R Date: 2007-11-06 10:37:29 +0100 (Tue, 06 Nov 2007) New Revision: 656 Added: software/gadgets/settings/ software/gadgets/settings/branches/ software/gadgets/settings/tags/ software/gadgets/settings/trunk/ software/gadgets/settings/trunk/settings.tgf software/gadgets/settings/trunk/settings/ software/gadgets/settings/trunk/settings/Pictures/ software/gadgets/settings/trunk/settings/Pictures/Icons/ software/gadgets/settings/trunk/settings/Pictures/Icons/gadget.png software/gadgets/settings/trunk/settings/Scripts/ software/gadgets/settings/trunk/settings/Scripts/Python/ software/gadgets/settings/trunk/settings/Scripts/Python/GUI/ software/gadgets/settings/trunk/settings/Scripts/Python/GUI/conf/ software/gadgets/settings/trunk/settings/Scripts/Python/GUI/conf/other.glade software/gadgets/settings/trunk/settings/Scripts/Python/GUI/conf/other.pyp software/gadgets/settings/trunk/settings/Scripts/Python/GUI/widget/ software/gadgets/settings/trunk/settings/Scripts/Python/GUI/widget/other.glade software/gadgets/settings/trunk/settings/Scripts/Python/GUI/widget/other.pyp software/gadgets/settings/trunk/settings/Scripts/Python/init.pyp software/gadgets/settings/trunk/settings/Scripts/Python/main.pyp software/gadgets/settings/trunk/settings/Scripts/Python/notify.pyp software/gadgets/settings/trunk/settings/Strings/ software/gadgets/settings/trunk/settings/Strings/fr_ALL.xml software/gadgets/settings/trunk/settings/about.xml software/gadgets/settings/trunk/settings/parts.xml software/gadgets/settings/trunk/settings/settings.xml software/gadgets/settings/trunk/settings/strings.xml Log: * Added the settings gadget. The sound tab is OK Added: software/gadgets/settings/trunk/settings/Pictures/Icons/gadget.png =================================================================== (Binary files differ) Property changes on: software/gadgets/settings/trunk/settings/Pictures/Icons/gadget.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: software/gadgets/settings/trunk/settings/Scripts/Python/GUI/conf/other.glade =================================================================== (Binary files differ) Property changes on: software/gadgets/settings/trunk/settings/Scripts/Python/GUI/conf/other.glade ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: software/gadgets/settings/trunk/settings/Scripts/Python/GUI/conf/other.pyp =================================================================== --- software/gadgets/settings/trunk/settings/Scripts/Python/GUI/conf/other.pyp (rev 0) +++ software/gadgets/settings/trunk/settings/Scripts/Python/GUI/conf/other.pyp 2007-11-06 09:37:29 UTC (rev 656) @@ -0,0 +1,99 @@ +bindtextdomain("params", "") + +class Window(SimpleGladeApp): + + def __init__(self, + path=_me.get_path('root') + '/Scripts/Python/GUI/conf/other.glade', + root="window1", + domain="params", **kwargs): + """ + Constructor + """ + SimpleGladeApp.__init__(self, path, root, domain, **kwargs) + + def new(self): + """ + On new window + """ + self.updates_commons() + self.updates_specifics() + + def updates_commons(self): + """ + Updates common widgets + """ + # Window title + txt = "%s : %s" % (_me.string('name_to_read'), + _me.string('gui_conf_window_title')) + self.get_widget("window1").set_title(txt) + + # About labels + txt = _me.string('gui_conf_about_title') + self.get_widget("label7").set_text(txt) + + txt = "%s : %s" % (_me.string('gui_conf_description_lb'), + _me.get_description()) + self.get_widget("label_description").set_text(txt) + + txt = "%s : %s" % (_me.string('gui_conf_author_lb'), + _me.get_author()) + self.get_widget("label_author").set_text(txt) + + txt = "%s : %s" % (_me.string('gui_conf_version_lb'), + _me.get_version()) + self.get_widget("label_version").set_text(txt) + + # Remote Frame + txt = _me.string('gui_conf_remote_title') + self.get_widget("label11").set_text(txt) + + txt = "%s : None" % _me.string('gui_conf_current_bind_lb') + self.get_widget("label_remote").set_text(txt) + + txt = _me.string('gui_conf_remote_set_bt') + self.get_widget("button_remote").set_label(txt) + + # Update Frame + txt = _me.string('gui_conf_update_title') + self.get_widget("label12").set_text(txt) + + txt = "%s : " % _me.string('gui_conf_delay_lb') + self.get_widget("label13").set_text(txt) + + value = _me.get_var('notify_delay') + self.get_widget("delay_spinbutton").set_value(value) + + # Bottom buttons + txt = _me.string('gui_conf_cancel_bt') + self.get_widget("label6").set_text(txt) + + txt = _me.string('gui_conf_accept_bt') + self.get_widget("label5").set_text(txt) + + def updates_specifics(self): + pass + + def on_button_remote_clicked(self, widget, *args): + """ + On button 'set' remote clicked + """ + def remote_set_caption(): + tux.sys.wait(0.1) + gadgets['Manager'].gui('remote').window.set_captions(gadgets[_me.get_name()]) + if gadgets.has_key('Manager'): + if not gadgets['Manager'].gui('remote').showed(): + gadgets['Manager'].gui('remote').show() + thread.start_new_thread(remote_set_caption, ()) + + def on_accept_clicked(self, widget, *args): + """ + On button 'accept' clicked + """ + _me.set_var('notify_delay', int(self.get_widget("delay_spinbutton").get_value())) + self.get_widget("window1").destroy() + + def on_cancel_clicked(self, widget, *args): + """ + On button 'cancel' clicked + """ + self.get_widget("window1").destroy() Added: software/gadgets/settings/trunk/settings/Scripts/Python/GUI/widget/other.glade =================================================================== --- software/gadgets/settings/trunk/settings/Scripts/Python/GUI/widget/other.glade (rev 0) +++ software/gadgets/settings/trunk/settings/Scripts/Python/GUI/widget/other.glade 2007-11-06 09:37:29 UTC (rev 656) @@ -0,0 +1,943 @@ +<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*--> +<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd"> + +<glade-interface> + +<widget class="GtkWindow" id="window1"> + <property name="width_request">650</property> + <property name="height_request">475</property> + <property name="visible">True</property> + <property name="title" translatable="yes">Tux Droid Interface</property> + <property name="type">GTK_WINDOW_TOPLEVEL</property> + <property name="window_position">GTK_WIN_POS_NONE</property> + <property name="modal">False</property> + <property name="resizable">False</property> + <property name="destroy_with_parent">False</property> + <property name="decorated">True</property> + <property name="skip_taskbar_hint">False</property> + <property name="skip_pager_hint">False</property> + <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property> + <property name="gravity">GDK_GRAVITY_NORTH_WEST</property> + <property name="focus_on_map">True</property> + <property name="urgency_hint">False</property> + <signal name="destroy" handler="on_window1_destroy"/> + + <child> + <widget class="GtkNotebook" id="notebook1"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="show_tabs">True</property> + <property name="show_border">True</property> + <property name="tab_pos">GTK_POS_TOP</property> + <property name="scrollable">False</property> + <property name="enable_popup">False</property> + + <child> + <widget class="GtkVBox" id="vbox1"> + <property name="visible">True</property> + <property name="homogeneous">False</property> + <property name="spacing">0</property> + + <child> + <widget class="GtkHBox" id="hbox1"> + <property name="visible">True</property> + <property name="homogeneous">False</property> + <property name="spacing">0</property> + + <child> + <placeholder/> + </child> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">True</property> + <property name="fill">True</property> + </packing> + </child> + </widget> + <packing> + <property name="tab_expand">False</property> + <property name="tab_fill">True</property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="lblTabConfig"> + <property name="visible">True</property> + <property name="label" translatable="yes">Main</property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="type">tab</property> + </packing> + </child> + + <child> + <widget class="GtkVBox" id="vbox2"> + <property name="visible">True</property> + <property name="homogeneous">False</property> + <property name="spacing">0</property> + + <child> + <placeholder/> + </child> + </widget> + <packing> + <property name="tab_expand">False</property> + <property name="tab_fill">True</property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="lblTabVersion"> + <property name="visible">True</property> + <property name="label" translatable="yes">TTS</property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="type">tab</property> + </packing> + </child> + + <child> + <widget class="GtkVBox" id="vbox3"> + <property name="visible">True</property> + <property name="homogeneous">False</property> + <property name="spacing">0</property> + + <child> + <widget class="GtkFrame" id="frame8"> + <property name="border_width">2</property> + <property name="visible">True</property> + <property name="label_xalign">0</property> + <property name="label_yalign">0.5</property> + <property name="shadow_type">GTK_SHADOW_OUT</property> + + <child> + <widget class="GtkAlignment" id="alignment8"> + <property name="visible">True</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xscale">1</property> + <property name="yscale">1</property> + <property name="top_padding">0</property> + <property name="bottom_padding">0</property> + <property name="left_padding">12</property> + <property name="right_padding">0</property> + + <child> + <widget class="GtkFixed" id="fixed8"> + <property name="visible">True</property> + + <child> + <widget class="GtkButton" id="btnSoundExternalPlay"> + <property name="width_request">72</property> + <property name="height_request">27</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="label" translatable="yes">Play</property> + <property name="use_underline">True</property> + <property name="relief">GTK_RELIEF_NORMAL</property> + <property name="focus_on_click">True</property> + <signal name="clicked" handler="on_wave_external_play_bt_clicked"/> + </widget> + <packing> + <property name="x">289</property> + <property name="y">1</property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="lblSoundExternalFile"> + <property name="width_request">71</property> + <property name="height_request">20</property> + <property name="visible">True</property> + <property name="label" translatable="yes">File name</property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_RIGHT</property> + <property name="wrap">True</property> + <property name="selectable">False</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="x">0</property> + <property name="y">5</property> + </packing> + </child> + + <child> + <widget class="GtkFileChooserButton" id="soundExternalChooser"> + <property name="width_request">200</property> + <property name="height_request">27</property> + <property name="visible">True</property> + <property name="title" translatable="yes">Select wave file</property> + <property name="action">GTK_FILE_CHOOSER_ACTION_OPEN</property> + <property name="local_only">True</property> + <property name="show_hidden">False</property> + <property name="do_overwrite_confirmation">False</property> + <property name="width_chars">-1</property> + <signal name="selection_changed" handler="on_wave_external_changed"/> + </widget> + <packing> + <property name="x">80</property> + <property name="y">2</property> + </packing> + </child> + </widget> + </child> + </widget> + </child> + + <child> + <widget class="GtkLabel" id="lblSoundExternal"> + <property name="visible">True</property> + <property name="label" translatable="yes"><b>Play external wave file</b></property> + <property name="use_underline">False</property> + <property name="use_markup">True</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="type">label_item</property> + </packing> + </child> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">True</property> + <property name="fill">True</property> + </packing> + </child> + + <child> + <widget class="GtkFrame" id="frame9"> + <property name="border_width">2</property> + <property name="visible">True</property> + <property name="label_xalign">0</property> + <property name="label_yalign">0.5</property> + <property name="shadow_type">GTK_SHADOW_OUT</property> + + <child> + <widget class="GtkAlignment" id="alignment9"> + <property name="visible">True</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xscale">1</property> + <property name="yscale">1</property> + <property name="top_padding">0</property> + <property name="bottom_padding">0</property> + <property name="left_padding">12</property> + <property name="right_padding">0</property> + + <child> + <widget class="GtkFixed" id="fixed9"> + <property name="height_request">206</property> + <property name="visible">True</property> + + <child> + <widget class="GtkSpinButton" id="spinbutton8"> + <property name="width_request">42</property> + <property name="height_request">27</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="climb_rate">1</property> + <property name="digits">0</property> + <property name="numeric">False</property> + <property name="update_policy">GTK_UPDATE_ALWAYS</property> + <property name="snap_to_ticks">False</property> + <property name="wrap">False</property> + <property name="adjustment">1 1 255 1 10 10</property> + </widget> + <packing> + <property name="x">471</property> + <property name="y">63</property> + </packing> + </child> + + <child> + <widget class="GtkToolItem" id="toolitem1"> + <property name="width_request">50</property> + <property name="height_request">50</property> + <property name="visible">True</property> + <property name="visible_horizontal">True</property> + <property name="visible_vertical">True</property> + <property name="is_important">False</property> + </widget> + <packing> + <property name="x">24</property> + <property name="y">168</property> + </packing> + </child> + + <child> + <widget class="GtkProgressBar" id="progressbar1"> + <property name="width_request">360</property> + <property name="height_request">16</property> + <property name="visible">True</property> + <property name="orientation">GTK_PROGRESS_LEFT_TO_RIGHT</property> + <property name="fraction">0</property> + <property name="pulse_step">0.25</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + </widget> + <packing> + <property name="x">0</property> + <property name="y">160</property> + </packing> + </child> + + <child> + <widget class="GtkScrolledWindow" id="scrolledwindow1"> + <property name="width_request">376</property> + <property name="height_request">152</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="hscrollbar_policy">GTK_POLICY_ALWAYS</property> + <property name="vscrollbar_policy">GTK_POLICY_ALWAYS</property> + <property name="shadow_type">GTK_SHADOW_NONE</property> + <property name="window_placement">GTK_CORNER_TOP_LEFT</property> + + <child> + <placeholder/> + </child> + </widget> + <packing> + <property name="x">0</property> + <property name="y">0</property> + </packing> + </child> + + <child> + <widget class="GtkFileChooserButton" id="soundInternalChooser"> + <property name="width_request">200</property> + <property name="height_request">27</property> + <property name="visible">True</property> + <property name="title" translatable="yes">Select wave file</property> + <property name="action">GTK_FILE_CHOOSER_ACTION_OPEN</property> + <property name="local_only">True</property> + <property name="show_hidden">False</property> + <property name="do_overwrite_confirmation">False</property> + <property name="width_chars">-1</property> + <signal name="selection_changed" handler="on_wave_internal_changed"/> + </widget> + <packing> + <property name="x">392</property> + <property name="y">0</property> + </packing> + </child> + + <child> + <widget class="GtkButton" id="btnSoundAdd"> + <property name="width_request">72</property> + <property name="height_request">27</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="label" translatable="yes">Add</property> + <property name="use_underline">True</property> + <property name="relief">GTK_RELIEF_NORMAL</property> + <property name="focus_on_click">True</property> + <signal name="clicked" handler="on_wave_internal_add_bt_clicked"/> + </widget> + <packing> + <property name="x">392</property> + <property name="y">32</property> + </packing> + </child> + + <child> + <widget class="GtkButton" id="btnSoundRemove"> + <property name="width_request">72</property> + <property name="height_request">27</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="label" translatable="yes">Remove</property> + <property name="use_underline">True</property> + <property name="relief">GTK_RELIEF_NORMAL</property> + <property name="focus_on_click">True</property> + <signal name="clicked" handler="on_wave_internal_remove_bt_clicked"/> + </widget> + <packing> + <property name="x">392</property> + <property name="y">64</property> + </packing> + </child> + + <child> + <widget class="GtkButton" id="btnSoundModify"> + <property name="width_request">72</property> + <property name="height_request">27</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="label" translatable="yes">Modify</property> + <property name="use_underline">True</property> + <property name="relief">GTK_RELIEF_NORMAL</property> + <property name="focus_on_click">True</property> + <signal name="clicked" handler="on_btnSoundModify_clicked" last_modification_time="Mon, 05 Nov 2007 14:45:42 GMT"/> + </widget> + <packing> + <property name="x">392</property> + <property name="y">96</property> + </packing> + </child> + + <child> + <widget class="GtkButton" id="btnSoundClear"> + <property name="width_request">72</property> + <property name="height_request">27</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="label" translatable="yes">Clear list</property> + <property name="use_underline">True</property> + <property name="relief">GTK_RELIEF_NORMAL</property> + <property name="focus_on_click">True</property> + <signal name="clicked" handler="on_wave_internal_clist_bt_clicked"/> + </widget> + <packing> + <property name="x">392</property> + <property name="y">128</property> + </packing> + </child> + + <child> + <widget class="GtkButton" id="btnSoundStore"> + <property name="width_request">72</property> + <property name="height_request">27</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="label" translatable="yes">Store</property> + <property name="use_underline">True</property> + <property name="relief">GTK_RELIEF_NORMAL</property> + <property name="focus_on_click">True</property> + <signal name="clicked" handler="on_wave_internal_store_bt_clicked"/> + </widget> + <packing> + <property name="x">520</property> + <property name="y">128</property> + </packing> + </child> + + <child> + <widget class="GtkCheckButton" id="chkSoundOriginal"> + <property name="width_request">148</property> + <property name="height_request">24</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="label" translatable="yes"></property> + <property name="use_underline">True</property> + <property name="relief">GTK_RELIEF_NORMAL</property> + <property name="focus_on_click">True</property> + <property name="active">False</property> + <property name="inconsistent">False</property> + <property name="draw_indicator">True</property> + <signal name="toggled" handler="on_incl_orig_toggled" last_modification_time="Mon, 16 Apr 2007 10:51:02 GMT"/> + </widget> + <packing> + <property name="x">476</property> + <property name="y">32</property> + </packing> + </child> + </widget> + </child> + </widget> + </child> + + <child> + <widget class="GtkLabel" id="lblSoundStore"> + <property name="visible">True</property> + <property name="label" translatable="yes"><b>Store wave files locally</b></property> + <property name="use_underline">False</property> + <property name="use_markup">True</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="type">label_item</property> + </packing> + </child> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">True</property> + <property name="fill">True</property> + </packing> + </child> + + <child> + <widget class="GtkFrame" id="frame10"> + <property name="border_width">2</property> + <property name="visible">True</property> + <property name="label_xalign">0</property> + <property name="label_yalign">0.5</property> + <property name="shadow_type">GTK_SHADOW_OUT</property> + + <child> + <widget class="GtkAlignment" id="alignment10"> + <property name="visible">True</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xscale">1</property> + <property name="yscale">1</property> + <property name="top_padding">0</property> + <property name="bottom_padding">0</property> + <property name="left_padding">12</property> + <property name="right_padding">0</property> + + <child> + <widget class="GtkFixed" id="fixed10"> + <property name="visible">True</property> + + <child> + <widget class="GtkSpinButton" id="spinbutton7"> + <property name="width_request">56</property> + <property name="height_request">27</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="climb_rate">1</property> + <property name="digits">0</property> + <property name="numeric">False</property> + <property name="update_policy">GTK_UPDATE_ALWAYS</property> + <property name="snap_to_ticks">False</property> + <property name="wrap">False</property> + <property name="adjustment">1 1 255 1 10 10</property> + </widget> + <packing> + <property name="x">536</property> + <property name="y">2</property> + </packing> + </child> + + <child> + <widget class="GtkButton" id="btnSound3"> + <property name="width_request">60</property> + <property name="height_request">27</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="label" translatable="yes">3</property> + <property name="use_underline">True</property> + <property name="relief">GTK_RELIEF_NORMAL</property> + <property name="focus_on_click">True</property> + <signal name="clicked" handler="on_wave_internal_play3_clicked"/> + </widget> + <packing> + <property name="x">160</property> + <property name="y">2</property> + </packing> + </child> + + <child> + <widget class="GtkButton" id="btnSound4"> + <property name="width_request">60</property> + <property name="height_request">27</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="label" translatable="yes">4</property> + <property name="use_underline">True</property> + <property name="relief">GTK_RELIEF_NORMAL</property> + <property name="focus_on_click">True</property> + <signal name="clicked" handler="on_wave_internat_play4_clicked"/> + </widget> + <packing> + <property name="x">240</property> + <property name="y">2</property> + </packing> + </child> + + <child> + <widget class="GtkButton" id="btnSound5"> + <property name="width_request">60</property> + <property name="height_request">27</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="label" translatable="yes">5</property> + <property name="use_underline">True</property> + <property name="relief">GTK_RELIEF_NORMAL</property> + <property name="focus_on_click">True</property> + <signal name="clicked" handler="on_wave_internal_play5_clicked"/> + </widget> + <packing> + <property name="x">320</property> + <property name="y">2</property> + </packing> + </child> + + <child> + <widget class="GtkButton" id="btnSound6"> + <property name="width_request">60</property> + <property name="height_request">27</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="label" translatable="yes">6</property> + <property name="use_underline">True</property> + <property name="relief">GTK_RELIEF_NORMAL</property> + <property name="focus_on_click">True</property> + <signal name="clicked" handler="on_wave_internal_play6_clicked"/> + </widget> + <packing> + <property name="x">0</property> + <property name="y">35</property> + </packing> + </child> + + <child> + <widget class="GtkButton" id="btnSound1"> + <property name="width_request">60</property> + <property name="height_request">27</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="label" translatable="yes">1</property> + <property name="use_underline">True</property> + <property name="relief">GTK_RELIEF_NORMAL</property> + <property name="focus_on_click">True</property> + <signal name="clicked" handler="on_wave_internal_play1_clicked"/> + </widget> + <packing> + <property name="x">0</property> + <property name="y">2</property> + </packing> + </child> + + <child> + <widget class="GtkButton" id="btnSound8"> + <property name="width_request">60</property> + <property name="height_request">27</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="label" translatable="yes">8</property> + <property name="use_underline">True</property> + <property name="relief">GTK_RELIEF_NORMAL</property> + <property name="focus_on_click">True</property> + <signal name="clicked" handler="on_wave_internal_play8_clicked"/> + </widget> + <packing> + <property name="x">160</property> + <property name="y">35</property> + </packing> + </child> + + <child> + <widget class="GtkButton" id="btnSound7"> + <property name="width_request">60</property> + <property name="height_request">27</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="label" translatable="yes">7</property> + <property name="use_underline">True</property> + <property name="relief">GTK_RELIEF_NORMAL</property> + <property name="focus_on_click">True</property> + <signal name="clicked" handler="on_wave_internal_play7_clicked"/> + </widget> + <packing> + <property name="x">80</property> + <property name="y">35</property> + </packing> + </child> + + <child> + <widget class="GtkButton" id="btnSound9"> + <property name="width_request">60</property> + <property name="height_request">27</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="label" translatable="yes">9</property> + <property name="use_underline">True</property> + <property name="relief">GTK_RELIEF_NORMAL</property> + <property name="focus_on_click">True</property> + <signal name="clicked" handler="on_wave_internal_play9_clicked"/> + </widget> + <packing> + <property name="x">240</property> + <property name="y">35</property> + </packing> + </child> + + <child> + <widget class="GtkButton" id="btnSound10"> + <property name="width_request">60</property> + <property name="height_request">27</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="label" translatable="yes">10</property> + <property name="use_underline">True</property> + <property name="relief">GTK_RELIEF_NORMAL</property> + <property name="focus_on_click">True</property> + <signal name="clicked" handler="on_wave_internal_play10_clicked"/> + </widget> + <packing> + <property name="x">320</property> + <property name="y">35</property> + </packing> + </child> + + <child> + <widget class="GtkButton" id="btnSound2"> + <property name="width_request">60</property> + <property name="height_request">27</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="label" translatable="yes">2 +</property> + <property name="use_underline">True</property> + <property name="relief">GTK_RELIEF_NORMAL</property> + <property name="focus_on_click">True</property> + <signal name="clicked" handler="on_wave_internal_play2_clicked" last_modification_time="Mon, 05 Nov 2007 14:41:30 GMT"/> + </widget> + <packing> + <property name="x">80</property> + <property name="y">2</property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="lblSoundLocalSelect"> + <property name="width_request">133</property> + <property name="height_request">17</property> + <property name="visible">True</property> + <property name="label" translatable="yes">Select sound</property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_RIGHT</property> + <property name="wrap">True</property> + <property name="selectable">False</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="x">400</property> + <property name="y">8</property> + </packing> + </child> + + <child> + <widget class="GtkButton" id="btnSoundPlayNum"> + <property name="width_request">72</property> + <property name="height_request">27</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="label" translatable="yes">Play</property> + <property name="use_underline">True</property> + <property name="relief">GTK_RELIEF_NORMAL</property> + <property name="focus_on_click">True</property> + <signal name="clicked" handler="on_wave_internal_play_bt_clicked"/> + </widget> + <packing> + <property name="x">520</property> + <property name="y">35</property> + </packing> + </child> + </widget> + </child> + </widget> + </child> + + <child> + <widget class="GtkLabel" id="lblSoundLocal"> + <property name="visible">True</property> + <property name="label" translatable="yes"><b>Play local wave files</b></property> + <property name="use_underline">False</property> + <property name="use_markup">True</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="type">label_item</property> + </packing> + </child> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">True</property> + <property name="fill">True</property> + </packing> + </child> + + <child> + <widget class="GtkFrame" id="frame11"> + <property name="border_width">2</property> + <property name="visible">True</property> + <property name="label_xalign">0</property> + <property name="label_yalign">0.5</property> + <property name="shadow_type">GTK_SHADOW_OUT</property> + + <child> + <widget class="GtkAlignment" id="alignment11"> + <property name="visible">True</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xscale">1</property> + <property name="yscale">1</property> + <property name="top_padding">0</property> + <property name="bottom_padding">0</property> + <property name="left_padding">12</property> + <property name="right_padding">0</property> + + <child> + <widget class="GtkFixed" id="fixed11"> + <property name="visible">True</property> + + <child> + <widget class="GtkButton" id="btnSoundRecordMic"> + <property name="width_request">90</property> + <property name="height_request">27</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="label" translatable="yes">Record</property> + <property name="use_underline">True</property> + <property name="relief">GTK_RELIEF_NORMAL</property> + <property name="focus_on_click">True</property> + <signal name="clicked" handler="on_mic_record_bt_clicked"/> + </widget> + <packing> + <property name="x">0</property> + <property name="y">3</property> + </packing> + </child> + + <child> + <widget class="GtkButton" id="btnSoundPlayMic"> + <property name="width_request">90</property> + <property name="height_request">27</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="label" translatable="yes">Play</property> + <property name="use_underline">True</property> + <property name="relief">GTK_RELIEF_NORMAL</property> + <property name="focus_on_click">True</property> + <signal name="clicked" handler="on_mic_play_bt_clicked"/> + </widget> + <packing> + <property name="x">104</property> + <property name="y">3</property> + </packing> + </child> + </widget> + </child> + </widget> + </child> + + <child> + <widget class="GtkLabel" id="lblSoundMic"> + <property name="visible">True</property> + <property name="label" translatable="yes"><b>Microphone</b></property> + <property name="use_underline">False</property> + <property name="use_markup">True</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="type">label_item</property> + </packing> + </child> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">True</property> + <property name="fill">True</property> + </packing> + </child> + </widget> + <packing> + <property name="tab_expand">False</property> + <property name="tab_fill">True</property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="lblTabSound"> + <property name="visible">True</property> + <property name="label" translatable="yes">Audio</property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="type">tab</property> + </packing> + </child> + </widget> + </child> +</widget> + +</glade-interface> Added: software/gadgets/settings/trunk/settings/Scripts/Python/GUI/widget/other.pyp =================================================================== --- software/gadgets/settings/trunk/settings/Scripts/Python/GUI/widget/other.pyp (rev 0) +++ software/gadgets/settings/trunk/settings/Scripts/Python/GUI/widget/other.pyp 2007-11-06 09:37:29 UTC (rev 656) @@ -0,0 +1,326 @@ +bindtextdomain("params", "") +soundcard = tux.hw.alsa_device + +class Window(SimpleGladeApp): + def __init__(self, + path=_me.get_path('root') + '/Scripts/Python/GUI/widget/other.glade', + root="window1", + domain="params", **kwargs): + SimpleGladeApp.__init__(self, path, root, domain, **kwargs) + + def new(self): + self.get_widget("window1").set_title(_me.string('name_to_read')) + thread.start_new_thread(self.update, ()) + + def update(self): + self.get_widget('lblTabConfig').set_text(_me.string('lblTabConfig')) + self.get_widget('lblTabSound').set_text(_me.string('lblTabSound')) + self.get_widget('lblTabVersion').set_text(_me.string('lblTabVersion')) + + self.SoundLabelUpdate() + self.treeview_update() + self.get_widget('progressbar1').hide() + + def SoundLabelUpdate(self): + self.get_widget('btnSoundAdd').set_label(_me.string('btnSoundAdd')) + self.get_widget('btnSoundClear').set_label(_me.string('btnSoundClear')) + self.get_widget('btnSoundModify').set_label(_me.string('btnSoundModify')) + self.get_widget('btnSoundPlayMic').set_label(_me.string('btnSoundPlayMic')) + self.get_widget('btnSoundPlayNum').set_label(_me.string('btnSoundPlayNum')) + self.get_widget('btnSoundRecordMic').set_label(_me.string('btnSoundRecordMic')) + self.get_widget('btnSoundRemove').set_label(_me.string('btnSoundRemove')) + self.get_widget('btnSoundStore').set_label(_me.string('btnSoundStore')) + self.get_widget('btnSoundExternalPlay').set_label(_me.string('lblSoundExternalPlay')) + + self.get_widget('chkSoundOriginal').set_label(_me.string('chkSoundOriginal')) + + self.get_widget('lblSoundExternal').set_text(_me.string('lblSoundExternal')) + self.get_widget('lblSoundExternalFile').set_text(_me.string('lblSoundExternalFile')) + self.get_widget('lblSoundLocal').set_text(_me.string('lblSoundLocal')) + self.get_widget('lblSoundLocalSelect').set_text(_me.string('lblSoundLocalSelect')) + self.get_widget('lblSoundMic').set_text(_me.string('lblSoundMic')) + self.get_widget('lblSoundStore').set_text(_me.string('lblSoundStore')) + + + + + + + + def treeview_update(self): + self.index_column = gtk.TreeViewColumn('Index') + self.index_column.set_min_width(50) + self.index_cell = gtk.CellRendererText() + self.index_column.pack_start(self.index_cell, True) + self.index_column.add_attribute(self.index_cell, 'text', 0) + + self.event_column = gtk.TreeViewColumn(_me.string('treeFile')) + self.event_column.set_min_width(100) + self.event_cell = gtk.CellRendererText() + self.event_column.pack_start(self.event_cell, True) + self.event_column.add_attribute(self.event_cell, 'text', 1) + + self.value_list = gtk.TreeStore(int, str) + self.gadget_viewer = gtk.TreeView(self.value_list) + self.gadget_viewer.append_column(self.index_column) + self.gadget_viewer.append_column(self.event_column) + self.gadget_viewer.get_selection().connect("changed",self.on_row_selected) + self.get_widget("scrolledwindow1").add(self.gadget_viewer) + self.get_widget("scrolledwindow1").show_all() + + +#--------------------------------------------------------------------------- +# +# SOUND TAB +# +#--------------------------------------------------------------------------- + + #-------------------------------------------------------------------------- + # On select external wave file event + #-------------------------------------------------------------------------- + def on_wave_external_changed(self, widget, *args): + filename=widget.get_filename() + ext=len(filename)-filename.find(".wav") + if ext != 4 : + widget.unselect_filename(filename) + + #-------------------------------------------------------------------------- + # On "play" external wave file button clicked + #-------------------------------------------------------------------------- + def on_wave_external_play_bt_clicked(self, widget, *args): + if str(self.get_widget("soundExternalChooser").get_filename())=="None": return + tux.sys.shell_free("aplay -D %s %s"% (soundcard, + self.get_widget("soundExternalChooser").get_filename())) + + #-------------------------------------------------------------------------- + # On select original sounds + #-------------------------------------------------------------------------- + def on_incl_orig_toggled(self, widget, *args): + st_wav_paths = wavs.wav_paths + if widget.get_active(): + wavs.wav_paths=[] + wavs.wav_sizes=[] + for i in range(17): + wavs.add_wav_path('/opt/tuxdroid/apps/tuxgi/sounds/%d.wav'%(i+1)) + for path in st_wav_paths: + wavs.add_wav_path(path) + else: + if len(st_wav_paths) > 17: + for i in range(17): + wavs.wav_sizes.pop(0) + wavs.wav_paths.pop(0) + else: + wavs.wav_paths=[] + wavs.wav_sizes=[] + self.refresh_wav_list() + + + #-------------------------------------------------------------------------- + # On select internal wave file event + #-------------------------------------------------------------------------- + def on_row_selected(self, obj): + path = obj.get_selected_rows() + self.__iter = self.value_list.get_iter(path[1][0]) + self.__path = path[1][0] + + + + #-------------------------------------------------------------------------- + # On select internal wave file event + #-------------------------------------------------------------------------- + def on_wave_internal_changed(self, widget, *args): + filename=widget.get_filename() + ext=len(filename)-filename.find(".wav") + if ext != 4 : + widget.unselect_filename(filename) + + #-------------------------------------------------------------------------- + # On "add" button clicked + #-------------------------------------------------------------------------- + def on_wave_internal_add_bt_clicked(self, widget, *args): + if str(self.get_widget("soundInternalChooser").get_filename())=="None": return + wavs.add_wav_path(self.get_widget("soundInternalChooser").get_filename()) + self.refresh_wav_list() + + #-------------------------------------------------------------------------- + # On "remove" button clicked + #-------------------------------------------------------------------------- + def on_wave_internal_remove_bt_clicked(self, widget, *args): + index = self.__path[0] + wavs.wav_sizes.pop(index) + wavs.wav_paths.pop(index) + self.refresh_wav_list() + + #-------------------------------------------------------------------------- + # On "modify" button clicked + #-------------------------------------------------------------------------- + def on_btnSoundModify_clicked(self, widget, *args): + index = self.__path[0] + if str(self.get_widget("soundInternalChooser").get_filename())=="None": return + path = self.get_widget("soundInternalChooser").get_filename() + #Add size to the table + f = open(path,'rb') + wh = f.read(44) + wav_length = (ord(wh[43]) * 256 ** 3) + (ord(wh[42]) * 256 ** 2) + \ + (ord(wh[41]) * 256 ** 1) + ord(wh[40]) + f.close() + wavs.wav_sizes[index] = wav_length + + #Add path to the table + wavs.wav_paths[index] = path + + self.refresh_wav_list() + + #-------------------------------------------------------------------------- + # Refreshing wave list function + #-------------------------------------------------------------------------- + def refresh_wav_list(self): + i = 0 + + self.value_list.clear() + for wavfile in wavs.wav_paths: + filename=wavfile[wavfile.rfind('/')+1:] + self.value_list.append(None,[(i+1),str(filename)]) + i += 1 + + #-------------------------------------------------------------------------- + # On "clear" internal wave file list button clicked + #-------------------------------------------------------------------------- + def on_wave_internal_clist_bt_clicked(self, widget, *args): + wavs.wav_sizes=[] + wavs.wav_paths=[] + self.get_widget("checkbutton4").set_active(False) + self.refresh_wav_list() + + #-------------------------------------------------------------------------- + # On "store" button clicked + #-------------------------------------------------------------------------- + def on_wave_internal_store_bt_clicked(self, widget, *args): + thread.start_new_thread(self.sound_storing,()) + + #-------------------------------------------------------------------------- + # Store sound function + #-------------------------------------------------------------------------- + def sound_storing(self): + if tux.status.rf_state() == 0: + print 'no RF connexion' + return + if len(wavs.wav_sizes)==0: + print 'no wavs to store' + return + if not wavs.wavs_merging("merged.wav"): + print "Sound storing : Error : file merged is too big" + return + + self.get_widget('progressbar1').show() + self.get_widget('progressbar1').set_fraction(0) + + print "Sound storing : Erase flash" + self.get_widget('progressbar1').set_fraction(0.25) + tux.cmd.sound_storing(len(wavs.wav_sizes)) + while tux.status.flash_status()[1] != 3: + pass + current_pos=0x0400 + tux.sys.wait(0.1) + print "Sound storing : Indexes" + self.get_widget('progressbar1').set_fraction(0.5) + tux.cmd.sound_store_index(0x00,0x04,0x00) + + for size in wavs.wav_sizes: + current_pos=current_pos+size + tux.sys.wait(0.1) + tux.cmd.sound_store_index((current_pos & 0xFF0000)>>16, + (current_pos & 0x00FF00)>>8,current_pos & 0x0000FF) + + self.get_widget('progressbar1').set_fraction(0.75) + tux.sys.shell("aplay -D %s merged.wav"%soundcard) + self.get_widget('progressbar1').hide() + print "Sound storing : Storage done." + tux.sys.wait(0.3) + + + + + #-------------------------------------------------------------------------- + # On "play" flash sound button clicked + #-------------------------------------------------------------------------- + def on_wave_internal_play_bt_clicked(self, widget, *args): + def _funct(): + index=self.get_widget("spinbutton7").get_value() + tux.cmd.sound_play(int(index),0) + + thread.start_new_thread(_funct,()) + + #-------------------------------------------------------------------------- + # On "play flash sound number 1" button clicked + #-------------------------------------------------------------------------- + def on_wave_internal_play1_clicked(self, widget, *args): + thread.start_new_thread(tux.cmd.sound_play,(1,0,)) + + #-------------------------------------------------------------------------- + # On "play flash sound number 2" button clicked + #-------------------------------------------------------------------------- + def on_wave_internal_play2_clicked(self, widget, *args): + thread.start_new_thread(tux.cmd.sound_play,(2,0,)) + + #-------------------------------------------------------------------------- + # On "play flash sound number 3" button clicked + #-------------------------------------------------------------------------- + def on_wave_internal_play3_clicked(self, widget, *args): + thread.start_new_thread(tux.cmd.sound_play,(3,0,)) + + #-------------------------------------------------------------------------- + # On "play flash sound number 4" button clicked + #-------------------------------------------------------------------------- + def on_wave_internat_play4_clicked(self, widget, *args): + thread.start_new_thread(tux.cmd.sound_play,(4,0,)) + + #-------------------------------------------------------------------------- + # On "play flash sound number 5" button clicked + #-------------------------------------------------------------------------- + def on_wave_internal_play5_clicked(self, widget, *args): + thread.start_new_thread(tux.cmd.sound_play,(5,0,)) + + #-------------------------------------------------------------------------- + # On "play flash sound number 6" button clicked + #-------------------------------------------------------------------------- + def on_wave_internal_play6_clicked(self, widget, *args): + thread.start_new_thread(tux.cmd.sound_play,(6,0,)) + + #-------------------------------------------------------------------------- + # On "play flash sound number 7" button clicked + #-------------------------------------------------------------------------- + def on_wave_internal_play7_clicked(self, widget, *args): + thread.start_new_thread(tux.cmd.sound_play,(7,0,)) + + #-------------------------------------------------------------------------- + # On "play flash sound number 8" button clicked + #-------------------------------------------------------------------------- + def on_wave_internal_play8_clicked(self, widget, *args): + thread.start_new_thread(tux.cmd.sound_play,(8,0,)) + + #-------------------------------------------------------------------------- + # On "play flash sound number 9" button clicked + #-------------------------------------------------------------------------- + def on_wave_internal_play9_clicked(self, widget, *args): + thread.start_new_thread(tux.cmd.sound_play,(9,0,)) + + #-------------------------------------------------------------------------- + # On "play flash sound number 10" button clicked + #-------------------------------------------------------------------------- + def on_wave_internal_play10_clicked(self, widget, *args): + thread.start_new_thread(tux.cmd.sound_play,(10,0,)) + + #-------------------------------------------------------------------------- + # On "Play recorded wave file" button clicked + #-------------------------------------------------------------------------- + def on_mic_play_bt_clicked(self, widget, *args): + tux.sys.shell_free("aplay -D %s rec.wav"%soundcard) + + #-------------------------------------------------------------------------- + # On "Record wave file" button clicked + #-------------------------------------------------------------------------- + def on_mic_record_bt_clicked(self, widget, *args): + tux.cmd.mouth_open() + tux.sys.shell("arecord -D %s -d 10 -t wav rec.wav"%soundcard) + tux.cmd.mouth_close() Added: software/gadgets/settings/trunk/settings/Scripts/Python/init.pyp =================================================================== --- software/gadgets/settings/trunk/settings/Scripts/Python/init.pyp (rev 0) +++ software/gadgets/settings/trunk/settings/Scripts/Python/init.pyp 2007-11-06 09:37:29 UTC (rev 656) @@ -0,0 +1,30 @@ +# ---------------------------------------------------------------------------- +# Definition and initialization of the shared parameters +# ---------------------------------------------------------------------------- + +# ---------------------------------------------------------------------------- +# Definition of the shared functions +# ---------------------------------------------------------------------------- + +# ---------------------------------------------------------------------------- +# Initialization and finalization shared functions +# ---------------------------------------------------------------------------- +def initialization(): + """ + Function to initialize the gadget. This function is executed when all gadgets + has been loaded. + """ + pass + +def finalization(): + """ + Function to finalize the gadget. This function is executed when the gadget is + destroyed. + """ + pass + +# ---------------------------------------------------------------------------- +# Registeration of the shared functions +# ---------------------------------------------------------------------------- +_me.insert_funct('initialization', initialization) +_me.insert_funct('finalization', finalization) Added: software/gadgets/settings/trunk/settings/Scripts/Python/main.pyp =================================================================== --- software/gadgets/settings/trunk/settings/Scripts/Python/main.pyp (rev 0) +++ software/gadgets/settings/trunk/settings/Scripts/Python/main.pyp 2007-11-06 09:37:29 UTC (rev 656) @@ -0,0 +1,2 @@ +# 'Voiceget' part of the gadget. This code is executed when the +# gadget is run in the gadgets manager. Added: software/gadgets/settings/trunk/settings/Scripts/Python/notify.pyp =================================================================== --- software/gadgets/settings/trunk/settings/Scripts/Python/notify.pyp (rev 0) +++ software/gadgets/settings/trunk/se... [truncated message content] |