tux-droid-svn Mailing List for Tux Droid CE (Page 183)
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...> - 2008-08-11 12:56:27
|
Author: jaguarondi Date: 2008-08-11 14:56:32 +0200 (Mon, 11 Aug 2008) New Revision: 1459 Added: firmware/fuxusb/trunk/AUTHORS firmware/fuxusb/trunk/CHANGES firmware/fuxusb/trunk/COPYING firmware/fuxusb/trunk/README Modified: firmware/tuxaudio/trunk/AUTHORS firmware/tuxaudio/trunk/CHANGES firmware/tuxaudio/trunk/TODO firmware/tuxcore/trunk/AUTHORS firmware/tuxcore/trunk/CHANGES Log: * Updated CHANGES. Added: firmware/fuxusb/trunk/AUTHORS =================================================================== --- firmware/fuxusb/trunk/AUTHORS (rev 0) +++ firmware/fuxusb/trunk/AUTHORS 2008-08-11 12:56:32 UTC (rev 1459) @@ -0,0 +1,10 @@ +$Id: AUTHORS 492 2007-09-06 12:54:06Z jaguarondi $ + +FUXUSB was written by: + + Paul Rathgeb <pau...@c2...> + Raphael Lamy <rap...@c2...> + +Contributors: + + David Bourgeois <da...@ja...> Added: firmware/fuxusb/trunk/CHANGES =================================================================== --- firmware/fuxusb/trunk/CHANGES (rev 0) +++ firmware/fuxusb/trunk/CHANGES 2008-08-11 12:56:32 UTC (rev 1459) @@ -0,0 +1,22 @@ +$Id$ + +Approximate change log for FUXUSB by version. + +(For more detailed changes, see svn log.) + +---------------------------------------------------------------------- +Current: + +Version 0.5.0: + + * Major cleanup of the USB code, finally up-to-date on SVN. + + * Lots of bug fixes. + + * Can be compiled in HID or libusb mode. + + * Improved the bootloader mode. + + * Added doxygen documentation. + + * Versioning is available through dongle commands and not standard commands. Property changes on: firmware/fuxusb/trunk/CHANGES ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:keywords + Id Name: svn:eol-style + native Added: firmware/fuxusb/trunk/COPYING =================================================================== --- firmware/fuxusb/trunk/COPYING (rev 0) +++ firmware/fuxusb/trunk/COPYING 2008-08-11 12:56:32 UTC (rev 1459) @@ -0,0 +1,340 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc. + 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Library General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + <one line to give the program's name and a brief idea of what it does.> + Copyright (C) <year> <name of author> + + 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 + + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + <signature of Ty Coon>, 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General +Public License instead of this License. Property changes on: firmware/fuxusb/trunk/COPYING ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:keywords + Id Name: svn:eol-style + native Added: firmware/fuxusb/trunk/README =================================================================== --- firmware/fuxusb/trunk/README (rev 0) +++ firmware/fuxusb/trunk/README 2008-08-11 12:56:32 UTC (rev 1459) @@ -0,0 +1,10 @@ +$Id$ + +FUXUSB is the firmware of the USB CPU of Tux Droid. +The CPU is an AT89C5130 from Atmel. This firmware can't be compiled with an +open source compiler. + +For all information about tuxdroid, please visit: + + http://www.tuxisalive.com + Property changes on: firmware/fuxusb/trunk/README ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:keywords + Id Name: svn:eol-style + native Modified: firmware/tuxaudio/trunk/AUTHORS =================================================================== --- firmware/tuxaudio/trunk/AUTHORS 2008-08-11 12:04:04 UTC (rev 1458) +++ firmware/tuxaudio/trunk/AUTHORS 2008-08-11 12:56:32 UTC (rev 1459) @@ -2,9 +2,9 @@ TUXAUDIO was written by: - Pascal Hanon <pas...@c2...> Paul Rathgeb <pau...@c2...> David Bourgeois <da...@ja...> + Pascal Hanon <pas...@c2...> Contributors: Modified: firmware/tuxaudio/trunk/CHANGES =================================================================== --- firmware/tuxaudio/trunk/CHANGES 2008-08-11 12:04:04 UTC (rev 1458) +++ firmware/tuxaudio/trunk/CHANGES 2008-08-11 12:56:32 UTC (rev 1459) @@ -7,6 +7,24 @@ ---------------------------------------------------------------------- Current: +Version 0.5.0: + + * Refactoring of the I2C communication between tuxcore and tuxaudio. Multi- + master has been dropped in favor of a master-slave communication. + Communications should now be more reliable. + + * Added 2 modules: parser and misc. The parser functions spread in main.c and + communication.c are now merged into one function in parser.c. All commands + coming from the RF and tuxcore will be parsed by the same function. + + * All fifo now use the fifo module. + + * Power saving for sleep added in the flash module. + + * Simpler audio stack adaptation. + + * Bug fixes (specially in the flash module) and cleanup. + Version 0.4.0: * Completely refactored the internal sounds storage and the data flash Modified: firmware/tuxaudio/trunk/TODO =================================================================== --- firmware/tuxaudio/trunk/TODO 2008-08-11 12:04:04 UTC (rev 1458) +++ firmware/tuxaudio/trunk/TODO 2008-08-11 12:56:32 UTC (rev 1459) @@ -1,7 +1,5 @@ $Id$ -- Add documentation with Doxygen. - - Add functions to change configuration registers from the computer and store them in the eeprom. Modified: firmware/tuxcore/trunk/AUTHORS =================================================================== --- firmware/tuxcore/trunk/AUTHORS 2008-08-11 12:04:04 UTC (rev 1458) +++ firmware/tuxcore/trunk/AUTHORS 2008-08-11 12:56:32 UTC (rev 1459) @@ -3,8 +3,8 @@ TUXCORE was written by: David Bourgeois <da...@ja...> + Paul Rathgeb <pau...@c2...> Contributors: Philippe Teuwen <ph...@te...> - Paul Rathgeb <pau...@c2...> Modified: firmware/tuxcore/trunk/CHANGES =================================================================== --- firmware/tuxcore/trunk/CHANGES 2008-08-11 12:04:04 UTC (rev 1458) +++ firmware/tuxcore/trunk/CHANGES 2008-08-11 12:56:32 UTC (rev 1459) @@ -7,6 +7,18 @@ ---------------------------------------------------------------------- Current: +Version 0.5.0: + + * Refactoring of the I2C communication between tuxcore and tuxaudio. Multi- + master has been dropped in favor of a master-slave communication. + Communications should now be more reliable. + + * Moved the pong function so that they are sent as fast as possible, not one + every 100ms anymore. This should point more communication problems in this + worst case. + + * Added motor states in the status. + Version 0.4.0: * Complete rework of the led functions to support intensity control and |
From: jaguarondi <c2m...@c2...> - 2008-08-11 12:03:56
|
Author: jaguarondi Date: 2008-08-11 14:04:04 +0200 (Mon, 11 Aug 2008) New Revision: 1458 Added: firmware/fuxusb/tags/0.5.0-libusb/ firmware/fuxusb/tags/0.5.0-libusb/fuxusb.Opt firmware/fuxusb/tags/0.5.0-libusb/fuxusb.Uv2 firmware/fuxusb/tags/0.5.0-libusb/src/usb_desc.h firmware/tuxaudio/tags/0.5.0/ firmware/tuxaudio/tags/0.5.0/Makefile firmware/tuxaudio/tags/0.5.0/version.h firmware/tuxcore/tags/0.5.0/ firmware/tuxcore/tags/0.5.0/Makefile firmware/tuxcore/tags/0.5.0/version.h Removed: firmware/fuxusb/tags/0.5.0-libusb/fuxusb.Opt firmware/fuxusb/tags/0.5.0-libusb/fuxusb.Uv2 firmware/fuxusb/tags/0.5.0-libusb/src/usb_desc.h firmware/tuxaudio/tags/0.5.0/Makefile firmware/tuxaudio/tags/0.5.0/version.h firmware/tuxcore/tags/0.5.0/Makefile firmware/tuxcore/tags/0.5.0/version.h Modified: firmware/tuxaudio/tags/0.4.0/ firmware/tuxcore/tags/0.4.0/ Log: * Tagging 0.5.0 of firmware (libusb version.) Copied: firmware/fuxusb/tags/0.5.0-libusb (from rev 1455, firmware/fuxusb/trunk) Property changes on: firmware/fuxusb/tags/0.5.0-libusb ___________________________________________________________________ Name: svn:externals + src/common -r 1457 http://svn.tuxisalive.com/firmware/tuxdefs Name: svn:mergeinfo + Deleted: firmware/fuxusb/tags/0.5.0-libusb/fuxusb.Opt =================================================================== (Binary files differ) Copied: firmware/fuxusb/tags/0.5.0-libusb/fuxusb.Opt (from rev 1457, firmware/fuxusb/trunk/fuxusb.Opt) =================================================================== (Binary files differ) Deleted: firmware/fuxusb/tags/0.5.0-libusb/fuxusb.Uv2 =================================================================== (Binary files differ) Copied: firmware/fuxusb/tags/0.5.0-libusb/fuxusb.Uv2 (from rev 1457, firmware/fuxusb/trunk/fuxusb.Uv2) =================================================================== (Binary files differ) Deleted: firmware/fuxusb/tags/0.5.0-libusb/src/usb_desc.h =================================================================== --- firmware/fuxusb/trunk/src/usb_desc.h 2008-08-11 11:11:01 UTC (rev 1455) +++ firmware/fuxusb/tags/0.5.0-libusb/src/usb_desc.h 2008-08-11 12:04:04 UTC (rev 1458) @@ -1,629 +0,0 @@ -/* - * FUXUSB - Firmware for the USB CPU of tuxdroid - * Copyright (C) 2008 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 usb_desc.h - \brief Structures and variable for the descriptors - \ingroup usb_desc -*/ - -#ifndef _USB_DESC_H_ -#define _USB_DESC_H_ - -#include "version.h" - -/** Enable / Disable the HID interface */ -#define HID_DEVICE - -/** \name Descriptors type - * @{ */ -/** \name Standard descriptors - * @{ */ -/** Device descriptor request */ -#define DEVICE 0x01 -/** Device descriptor request */ -#define CONFIGURATION 0x02 -/** Device descriptor request */ -#define STRING 0x03 -/** Device descriptor request */ -#define INTERFACE 0x04 -/** Device descriptor request */ -#define ENDPOINT 0x05 -/*! @} */ -/** \name HID specific descriptors - * @{ */ -/** HID descriptor request */ -#define HID 0x21 -/** Report descriptor request */ -#define REPORT 0x22 -/*! @} */ -/*! @} */ - -/** \name Device status, states and configs - * @{ */ -/** Supply status */ -#define SELF_POWERED 1 -/** Attached state */ -#define ATTACHED 0 -/** Powered state */ -#define POWERED 1 -/** Default state */ -#define DEFAULT 2 -/** Addressed state */ -#define ADDRESSED 3 -/** Configured state */ -#define CONFIGURED 4 -/** Suspended state */ -#define SUSPENDED 5 -/** Bus powered config */ -#define USB_CONFIG_BUSPOWERED 0x80 -/** Self powered config */ -#define USB_CONFIG_SELFPOWERED 0x40 -/** Remote wakeup config */ -#define USB_CONFIG_REMOTEWAKEUP 0x20 -/*! @} */ - -/** \name Endpoints - * @{ */ -/** \name IN Endpoints - * @{ */ -#define OUT_ENDPOINT1 0x01 -#define OUT_ENDPOINT2 0x02 -#define OUT_ENDPOINT3 0x03 -#define OUT_ENDPOINT4 0x04 -#define OUT_ENDPOINT5 0x05 -#define OUT_ENDPOINT6 0x06 -/*! @} */ -/** \name OUT Endpoints - * @{ */ -#define IN_ENDPOINT1 0x81 -#define IN_ENDPOINT2 0x82 -#define IN_ENDPOINT3 0x83 -#define IN_ENDPOINT4 0x84 -#define IN_ENDPOINT5 0x85 -#define IN_ENDPOINT6 0x86 -/*! @} */ -/*! @} */ - -/** \name Strings - * @{ */ -/** \name Manufacturer - * @{ */ -#define MAN_STRING_INDEX 1 -#define USB_MANUFACTURER_NAME {'K'<<8, 'y'<<8, 's'<<8, 'o'<<8, 'h'<<8} -#define USB_MN_LENGTH 5 -/* @} */ - -/** \name Product - * @{ */ -#define PROD_STRING_INDEX 2 -#define USB_PRODUCT_NAME {'T'<<8, 'u'<<8, 'x'<<8, 'D'<<8, \ - 'r'<<8, 'o'<<8, 'i'<<8, 'd'<<8} -#define USB_PN_LENGTH 8 -/* @} */ - -/** \name Serial number - * @{ */ -#define SN_STRING_INDEX 3 -#define USB_SERIAL_NUMBER {'1'<<8, '0'<<8, '0'<<8, '0'<<8, '1'<<8} -#define USB_SN_LENGTH 5 -/* @} */ - -/** \name Configuration - * @{ */ -#define CONFIG_STRING_INDEX 4 -#define USB_CONFIG_NAME {'T'<<8, 'u'<<8, 'x'<<8, 'D'<<8, \ - 'r'<<8, 'o'<<8, 'i'<<8, 'd'<<8} -#define USB_CONFIG_LENGTH 8 -/* @} */ - -/** \name Speaker interface - * @{ */ -#define AUDIO_SPEAKER_INDEX 5 -#define AUDIO_SPEAKER_NAME {'T'<<8, 'u'<<8, 'x'<<8, 'D'<<8, \ - 'r'<<8, 'o'<<8, 'i'<<8, 'd'<<8, '-'<<8, 'S'<<8, 'p'<<8, 'e'<<8, \ - 'a'<<8, 'k'<<8,'e'<<8,'r'<<8} -#define AUDIO_SPEAKER_LENGTH 16 -/* @} */ - -/** \name Microphone interface - * @{ */ -#define AUDIO_MICRO_INDEX 6 -#define AUDIO_MICRO_NAME {'T'<<8, 'u'<<8, 'x'<<8, 'D'<<8, \ - 'r'<<8, 'o'<<8, 'i'<<8, 'd'<<8, '-'<<8, 'M'<<8, 'i'<<8, 'c'<<8, \ - 'r'<<8, 'o'<<8} -#define AUDIO_MICRO_LENGTH 14 -/* @} */ - -/** \name TTS interface - * @{ */ -#define AUDIO_TTS_INDEX 7 -#define AUDIO_TTS_NAME {'T'<<8, 'u'<<8, 'x'<<8, 'D'<<8, \ - 'r'<<8, 'o'<<8, 'i'<<8, 'd'<<8, '-'<<8, 'T'<<8, 'T'<<8, 'S'<<8} -#define AUDIO_TTS_LENGTH 12 -/* @} */ - -/** \name Normal audio control interface - * @{ */ -#define AUDIO_NORMAL_INDEX 8 -#define AUDIO_NORMAL_NAME {'T'<<8, 'u'<<8, 'x'<<8, 'D'<<8, \ - 'r'<<8, 'o'<<8, 'i'<<8, 'd'<<8, '-'<<8, 'A'<<8, 'u'<<8, 'd'<<8, \ - 'i'<<8, 'o'<<8} -#define AUDIO_NORMAL_LENGTH 14 -/* @} */ -/* @} */ - - - -/** \name USB configuration - * @{ */ - - -/** \name Device specifications and classes - * @} */ -#define USB_SPECIFICATION 0x1001 -#define DEVICE_CLASS 0x00 -#define DEVICE_SUB_CLASS 0 -#define DEVICE_PROTOCOL 0 -#define EP_CONTROL_LENGTH 32 -#define NB_CONFIGURATION 1 -/* @} */ - -/** \name Version - PID/VID - * @{ */ -#define VENDOR_ID 0xEB03 /* Atmel vendor ID = 03EBh */ -#define PRODUCT_ID 0x07FF /* Product ID: FF07h*/ -#define RELEASE_NUMBER (0x0100*VER_UPDATE) + (0x1000*VER_MINOR) +\ - (0x0001*VER_MAJOR) -/* @} */ - -/** \name Configuration descriptor - * @{ */ -#ifdef HID_DEVICE -# define SIZE_OF_REPORT 0x22 -# define CONF_LENGTH 0x2901 // 297 -# define NB_INTERFACE 6 -#else -# define CONF_LENGTH 0x2001 // 288 -# define NB_INTERFACE 6 -#endif - -#define CONF_NB 1 -#define CONF_ATTRIBUTES USB_CONFIG_BUSPOWERED -#define MAX_POWER 50 /* 100 mA */ -/* @} */ - -/** \name Languages - * @{ */ -#define LANG_ID 0x00 -#define LANGUAGE_ID 0x0904 -/* @} */ -/* @} */ - -code struct usb_st_device_descriptor -{ - uint8_t bLength; /**< Size of this descriptor in bytes. */ - uint8_t bDescriptorType; /**< DEVICE descriptor type */ - uint16_t bscUSB; /**< Binay Coded Decimal Spec. release */ - uint8_t bDeviceClass; /**< Class code assigned by the USB */ - uint8_t bDeviceSubClass; /**< Sub-class code assigned by the USB */ - uint8_t bDeviceProtocol; /**< Protocol code assigned by the USB */ - uint8_t bMaxPacketSize0; /**< Max packet size for EP0 */ - uint16_t idVendor; /**< Vendor ID. ATMEL = 0x03EB */ - uint16_t idProduct; /**< Product ID assigned by the manufacturer */ - uint16_t bcdDevice; /**< Device release number */ - uint8_t iManufacturer; /**< Index of manu. string descriptor */ - uint8_t iProduct; /**< Index of prod. string descriptor */ - uint8_t iSerialNumber; /**< Index of S.N. string descriptor */ - uint8_t bNumConfigurations; /**< Number of possible configurations */ -}; - -code struct usb_st_configuration_descriptor -{ - uint8_t bLength; /**< size of this descriptor in bytes */ - uint8_t bDescriptorType; /**< CONFIGURATION descriptor type */ - uint16_t wTotalLength; /**< total length of data returned */ - uint8_t bNumInterfaces; /**< number of interfaces for this conf. */ - uint8_t bConfigurationValue; /**< value for SetConfiguration resquest */ - uint8_t iConfiguration; /**< index of string descriptor */ - uint8_t bmAttibutes; /**< Configuration characteristics */ - uint8_t MaxPower; /**< maximum power consumption */ -}; - -code struct usb_st_interface_descriptor -{ - uint8_t bLength; /**< size of this descriptor in bytes */ - uint8_t bDescriptorType; /**< INTERFACE descriptor type */ - uint8_t bInterfaceNumber; /**< Number of interface */ - uint8_t bAlternateSetting; /**< value to select alternate setting */ - uint8_t bNumEndpoints; /**< Number of EP except EP 0 */ - uint8_t bInterfaceClass; /**< Class code assigned by the USB */ - uint8_t bInterfaceSubClass; /**< Sub-class code assigned by the USB */ - uint8_t bInterfaceProtocol; /**< Protocol code assigned by the USB */ - uint8_t iInterface; /**< Index of string descriptor */ -}; - -code struct usb_st_endpoint_descriptor -{ - uint8_t bLength; /**< Size of this descriptor in bytes */ - uint8_t bDescriptorType; /**< ENDPOINT descriptor type */ - uint8_t bEndpointAddress; /**< Address of the endpoint */ - uint8_t bmAttributes; /**< Endpoint's attributes */ - uint16_t wMaxPacketSize; /**< Maximum packet size for this EP */ - uint8_t bInterval; /**< Interval for polling EP in ms */ -}; - -/* HID specific */ -code struct usb_hid_descriptor -{ - uint8_t bLength; /**< size of this descriptor in bytes */ - uint8_t bDescriptorType; /**< INTERFACE descriptor type */ - uint16_t bcdHID; /**< HID spec. */ - uint8_t bCountryCode; /**< Country code value*/ - uint8_t bNumDescriptors; /**< Number of reports descriptor */ - uint8_t bDescriptorTypeRep; /**< Type of the class-specific descriptor */ - uint16_t wDescriptorLength; /**< Size of the report descriptor */ -}; - -/* Audio Class specific */ -code struct usb_Audio_st_ACinterface_descriptor -{ - uint8_t bLength; /**< size of this descriptor in bytes */ - uint8_t bDescriptorType; /**< INTERFACE descriptor type */ - uint8_t bInterfaceNumber; /**< Number of interface */ - uint8_t bAlternateSetting; /**< value to select alternate setting */ - uint8_t bNumEndpoints; /**< Number of EP except EP 0 */ - uint8_t bInterfaceClass; /**< Class code assigned by the USB */ - uint8_t bInterfaceSubClass; /**< Sub-class code assigned by the USB */ - uint8_t bInterfaceProtocol; /**< Protocol code assigned by the USB */ - uint8_t iInterface; /**< Index of string descriptor */ -}; - -code struct usb_Audio_cs_ACinterface_descriptor -{ - uint8_t bLength; /**< size of this descriptor in bytes */ - uint8_t bDescriptorType; /**< INTERFACE descriptor type */ - uint8_t bDescriptorSubtype; /**< HEADER descriptor subtype.*/ - uint16_t bcdADC; /**< Audio Device Class Specification Release Number in Binary-Coded Decimal */ - uint16_t wTotalLength; /**< Total number of bytes returned for the class-specific AudioControl interface descriptor */ - uint8_t bInCollection; /**< Number of EP except EP 0 */ - uint8_t baInterfaceNr[2]; /**< Class code assigned by the USB */ -}; - -code struct usb_Audio_cs_ACinterface_descriptor_NbCol1 -{ - uint8_t bLength; /**< size of this descriptor in bytes */ - uint8_t bDescriptorType; /**< INTERFACE descriptor type */ - uint8_t bDescriptorSubtype; /**< HEADER descriptor subtype.*/ - uint16_t bcdADC; /**< Audio Device Class Specification Release Number in Binary-Coded Decimal */ - uint16_t wTotalLength; /**< Total number of bytes returned for the class-specific AudioControl interface descriptor */ - uint8_t bInCollection; /**< Number of EP except EP 0 */ - uint8_t baInterfaceNr[1]; /**< Class code assigned by the USB */ -}; - -/* Audio input terminal */ -code struct usb_Audio_InputTerminal_descriptor -{ - uint8_t bLength; /**< size of this descriptor in bytes */ - uint8_t bDescriptorType; /**< INTERFACE descriptor type */ - uint8_t bDescriptorSubtype; /**< HEADER descriptor subtype.*/ - uint8_t bTerminalID; /**< Constant characterizing the type of Termina*/ - uint16_t wTerminalType; /**< Constant characterizing the type of Terminal.*/ - uint8_t bAssocTerminal; /**< ID of the Output Terminal to which this Input Terminal is associated */ - uint8_t bNrChannels; /**< Number of logical output channels in the Terminals output audio channel cluster. */ - uint16_t wChannelConfig; /**< Describes the spatial location of the logical channels.*/ - uint8_t iChannelNames; /**< Index of a string descriptor, describing the name of the first logical channel */ - uint8_t iTerminal; /**< Index of a string descriptor, describing the Input Terminal. */ -}; - -/* Audio output terminal */ -code struct usb_Audio_OutputTerminal_descriptor -{ - uint8_t bLength; /**< size of this descriptor in bytes */ - uint8_t bDescriptorType; /**< INTERFACE descriptor type */ - uint8_t bDescriptorSubtype; /**< HEADER descriptor subtype.*/ - uint8_t bTerminalID; /**< Constant characterizing the type of Termina*/ - uint16_t wTerminalType; /**< Constant characterizing the type of Terminal.*/ - uint8_t bAssocTerminal; /**< ID of the Output Terminal to which this Input Terminal is associated */ - uint8_t bSourceID; /**< ID of the Unit or Terminal to which this Terminal is connected */ - uint8_t iTerminal; /**< Index of a string descriptor, describing the Input Terminal. */ -}; - -/* Audio feature unit */ -code struct usb_Audio_FeatureUnit_descriptor -{ - uint8_t bLength; /**< size of this descriptor in bytes */ - uint8_t bDescriptorType; /**< INTERFACE descriptor type */ - uint8_t bDescriptorSubtype; /**< HEADER descriptor subtype.*/ - uint8_t bUnitID; /**< Constant uniquely identifying the Unit within the audio function.*/ - uint8_t bSourceID; /**< Constant characterizing the type of Terminal.*/ - uint8_t bControlSize; /**< Size in bytes of an element of the bmaControls() array: n*/ - uint8_t bmaControls[2]; /**< ID of the Unit or Terminal to which this Terminal is connected */ - uint8_t iFeature; /**< Index of a string descriptor, describing this Feature Unit.. */ -}; - -/* Audio stream */ -code struct usb_Audio_st_ASinterface_descriptor -{ - uint8_t bLength; /**< size of this descriptor in bytes */ - uint8_t bDescriptorType; /**< INTERFACE descriptor type */ - uint8_t bInterfaceNumber; /**< Number of interface */ - uint8_t bAlternateSetting; /**< value to select alternate setting */ - uint8_t bNumEndpoints; /**< Number of EP except EP 0 */ - uint8_t bInterfaceClass; /**< Class code assigned by the USB */ - uint8_t bInterfaceSubClass; /**< Sub-class code assigned by the USB */ - uint8_t bInterfaceProtocol; /**< Protocol code assigned by the USB */ - uint8_t iInterface; /**< Index of string descriptor */ -}; - -/* Audio class specific */ -code struct usb_Audio_cs_ASinterface_descriptor -{ - uint8_t bLength; /**< size of this descriptor in bytes */ - uint8_t bDescriptorType; /**< INTERFACE descriptor type */ - uint8_t bDescriptorSubtype; /**< AS_GENERAL descriptor subtype.*/ - uint8_t bTerminalLink; /**< The Terminal ID of the Terminal to which the endpoint of this interface is connected.*/ - uint8_t bDelay; /**< Delay (d) introduced by the data path */ - uint16_t wFormatTag; /**< Class code assigned by the USB */ -}; - -/* Audio EP */ -code struct usb_Audio_st_endpoint_descriptor -{ - uint8_t bLength; /**< Size of this descriptor in bytes */ - uint8_t bDescriptorType; /**< ENDPOINT descriptor type */ - uint8_t bEndpointAddress; /**< Address of the endpoint */ - uint8_t bmAttributes; /**< Endpoint's attributes */ - uint16_t wMaxPacketSize; /**< Maximum packet size for this EP */ - uint8_t bInterval; /**< Interval for polling EP in ms */ - uint8_t bRefresh; /**< Reset to 0.*/ - uint8_t bSynchAddress; /**< The address of the endpoint used to communicate synchronization information if required by this endpoint..*/ -}; - -/* Audio stream */ -code struct usb_Audio_cs_ASendpoint_descriptor -{ - uint8_t bLength; /**< Size of this descriptor in bytes */ - uint8_t bDescriptorType; /**< ENDPOINT descriptor type */ - uint8_t bDescriptorSubtype; /**< EP_GENERAL descriptor subtype. */ - uint8_t bmAttributes; /**< Endpoint's attributes */ - uint8_t bLockDelayUnits; /**< Indicates the units used for the wLockDelay field:*/ - uint16_t wLockDelay; /**< Reset to 0.*/ -}; - -/* Audio endpoint */ -code struct usb_Audio_TYPEI_FormatType_descriptor -{ - uint8_t bLength; /**< Size of this descriptor in bytes */ - uint8_t bDescriptorType; /**< ENDPOINT descriptor type */ - uint8_t bDescriptorSubtype; /**< EP_GENERAL descriptor subtype. */ - uint8_t bFormatType; /**< FORMAT_TYPE_I. Constant identifying the Format Type the AudioStreaming interface is using.*/ - uint8_t bNrChannels; /**< Indicates the number of physical channels in the audio data stream.:*/ - uint8_t bSubframeSize; /**< The number of bytes occupied by one audio subframe. Can be 1, 2, 3 or 4.*/ - uint8_t bBitResolution; /**< The number of effectively used bits from the available bits in an audio subframe.*/ - uint8_t bSamFreqType; /**< Indicates how the sampling frequency can be programmed */ - uint8_t bSamFreqTbl[3]; /**< See sampling frequency tables*/ -}; - -/** \name General structure - * This structure contain all the descriptors. - * @{ */ -code struct usb_configuration_s -{ - /*! Configuration descriptor */ - struct usb_st_configuration_descriptor cfg; - - - // Interface O :: Audio Control - //------------------------------------------------------------------------- - /*! Standard interface descriptor */ - struct usb_Audio_st_ACinterface_descriptor StandardACInterfaceDescriptor_1; - /*! Specific interface descriptor */ - struct usb_Audio_cs_ACinterface_descriptor SpecificACInterfaceDescriptor; - /*! Microphone input terminal */ - struct usb_Audio_InputTerminal_descriptor MicInputTerminal1Descriptor; - /*! Speaker input terminal */ - struct usb_Audio_InputTerminal_descriptor SpkInputTerminalDescriptor; - /*! Microphone output terminal */ - struct usb_Audio_OutputTerminal_descriptor MicOutputTerminal1Descriptor; - /*! Speaker output descriptor */ - struct usb_Audio_OutputTerminal_descriptor SpkOutputTerminalDescriptor; - - // Interface 1 :: Audio Stream Microphone - //------------------------------------------------------------------------- - /*! Standard interface descriptor (alt. 0) */ - struct usb_Audio_st_ASinterface_descriptor MicStandardAlt0ASInterfaceDescriptor; - /*! Standard interface descriptor (alt. 1 - active) */ - struct usb_Audio_st_ASinterface_descriptor MicStandardAlt1ASInterfaceDescriptor; - /*! Specific audio stream interface descriptor */ - struct usb_Audio_cs_ASinterface_descriptor MicSpecificASInterfaceDescriptor; - /*! Format descriptor */ - struct usb_Audio_TYPEI_FormatType_descriptor MicFormatTypeDescriptor; - /*! Standard endpoint descriptor */ - struct usb_Audio_st_endpoint_descriptor MicStandardEndpointDescriptor; - /*! Endpoint */ - struct usb_Audio_cs_ASendpoint_descriptor MicEndpointDescriptor; - - // Interface 2 :: Audio Stream Speaker - //------------------------------------------------------------------------- - /*! Standard interface descriptor (alt. 0) */ - struct usb_Audio_st_ASinterface_descriptor SpkStandardAlt0ASInterfaceDescriptor; - /*! Standard interface descriptor (alt. 1 - active) */ - struct usb_Audio_st_ASinterface_descriptor SpkStandardAlt1ASInterfaceDescriptor; - /*! Specific audio stream interface descriptor */ - struct usb_Audio_cs_ASinterface_descriptor SpkSpecificASInterfaceDescriptor; - /*! Format descriptor */ - struct usb_Audio_TYPEI_FormatType_descriptor SpkFormatTypeDescriptor; - /*! Standard endpoint descriptor */ - struct usb_Audio_st_endpoint_descriptor SpkStandardEndpointDescriptor; - /*! Endpoint */ - struct usb_Audio_cs_ASendpoint_descriptor SpkEndpointDescriptor; - - // Interface 3 :: Command / Status Interface - //------------------------------------------------------------------------- -#ifdef HID_DEVICE - /*! Standard interface descriptor */ - struct usb_st_interface_descriptor HIDInterfaceDescriptor; - /*! HID interface descriptor */ - struct usb_hid_descriptor HIDStandardDescriptor; - /*! Standard EP descriptor */ - struct usb_st_endpoint_descriptor HID_InEndpointDescriptor; - /*! Standard EP descriptor */ - struct usb_st_endpoint_descriptor HID_OutEndpointDescriptor; -#else - /*! Standard interface descriptor */ - struct usb_st_interface_descriptor HIDInterfaceDescriptor; - /*! Standard EP descriptor */ - struct usb_st_endpoint_descriptor HID_InEndpointDescriptor; - /*! Standard EP descriptor */ - struct usb_st_endpoint_descriptor HID_OutEndpointDescriptor; -#endif - - // Interface 4 :: Audio Control - //------------------------------------------------------------------------- - /*! Standard interface descriptor */ - struct usb_Audio_st_ACinterface_descriptor StandardACInterfaceDescriptor_TTS; - /*! Specific interface descriptor */ - struct usb_Audio_cs_ACinterface_descriptor_NbCol1 SpecificACInterfaceDescriptor_TTS; - /*! TTS input terminal */ - struct usb_Audio_InputTerminal_descriptor SpkInputTerminalDescriptor_TTS; - /*! TTS output terminal */ - struct usb_Audio_OutputTerminal_descriptor SpkOutputTerminalDescriptor_TTS; - - // Interface 5 :: Audio Stream - //------------------------------------------------------------------------- - /*! Standard interface descriptor (alt. 0) */ - struct usb_Audio_st_ASinterface_descriptor SpkStandardAlt0ASInterfaceDescriptor_TTS; - /*! Standard interface descriptor (alt. 1 - active) */ - struct usb_Audio_st_ASinterface_descriptor SpkStandardAlt1ASInterfaceDescriptor_TTS; - /*! Specific audio stream interface descriptor */ - struct usb_Audio_cs_ASinterface_descriptor SpkSpecificASInterfaceDescriptor_TTS; - /*! Format descriptor */ - struct usb_Audio_TYPEI_FormatType_descriptor SpkFormatTypeDescriptor_TTS; - /*! Standard endpoint descriptor */ - struct usb_Audio_st_endpoint_descriptor SpkStandardEndpointDescriptor_TTS; - /*! Endpoint */ - struct usb_Audio_cs_ASendpoint_descriptor SpkEndpointDescriptor_TTS; - -#ifdef HID_DEVICE - // Report descriptor - //------------------------------------------------------------------------- - uint8_t rep[SIZE_OF_REPORT]; -#endif -}; -/* @} */ - -/** \name String descriptors - * @{ */ -code struct usb_st_language_descriptor -{ - uint8_t bLength; /**< size of this descriptor in bytes */ - uint8_t bDescriptorType; /**< STRING descriptor type */ - uint16_t wstring[USB_CONFIG_LENGTH]; /**< language id */ -}; - -code struct usb_st_manufacturer -{ - uint8_t bLength; /**< size of this descriptor in bytes */ - uint8_t bDescriptorType; /**< STRING descriptor type */ - uint16_t wstring[USB_MN_LENGTH];/**< unicode characters */ -}; - -code struct usb_st_product -{ - uint8_t bLength; /**< size of this descriptor in bytes */ - uint8_t bDescriptorType; /**< STRING descriptor type */ - uint16_t wstring[USB_PN_LENGTH];/**< unicode characters */ -}; - -code struct usb_st_serial_number -{ - uint8_t bLength; /**< size of this descriptor in bytes */ - uint8_t bDescriptorType; /**< STRING descriptor type */ - uint16_t wstring[USB_SN_LENGTH];/**< unicode characters */ -}; - -code struct usb_st_config -{ - uint8_t bLength; /**< size of this descriptor in bytes */ - uint8_t bDescriptorType; /**< STRING descriptor type */ - uint16_t wstring[USB_CONFIG_LENGTH];/**< unicode characters */ -}; - -code struct usb_st_speaker_descriptor -{ - uint8_t bLength; /**< size of this descriptor in bytes */ - uint8_t bDescriptorType; /**< STRING descriptor type */ - uint16_t wstring[AUDIO_SPEAKER_LENGTH]; /**< language id */ -}; - -code struct usb_st_micro_descriptor -{ - uint8_t bLength; /**< size of this descriptor in bytes */ - uint8_t bDescriptorType; /**< STRING descriptor type */ - uint16_t wstring[AUDIO_MICRO_LENGTH]; /**< language id */ -}; - -code struct usb_st_tts_descriptor -{ - uint8_t bLength; /**< size of this descriptor in bytes */ - uint8_t bDescriptorType; /**< STRING descriptor type */ - uint16_t wstring[AUDIO_TTS_LENGTH]; /**< language id */ -}; - - -code struct usb_st_audio_descriptor -{ - uint8_t bLength; /**< size of this descriptor in bytes */ - uint8_t bDescriptorType; /**< STRING descriptor type */ - uint16_t wstring[AUDIO_NORMAL_LENGTH]; /**< language id */ -}; -/* @} */ - -/** \name String structure - * This structure contain all the descriptors. - * @{ */ -code struct string_s -{ - /*! Language string descriptor */ - struct usb_st_language_descriptor st_language; - /*! Manufacturer string descriptor */ - struct usb_st_manufacturer st_manufacturer; - /*! Product string descriptor */ - struct usb_st_product st_product; - /*! Serial number string descriptor */ - struct usb_st_serial_number st_serial_number; - /*! Configuration string descriptor */ - struct usb_st_config st_config; - /*! Speaker interface string descriptor */ - struct usb_st_speaker_descriptor st_speaker; - /*! Micro interface string descriptor */ - struct usb_st_micro_descriptor st_micro; - /*! TTS Interface string descriptor */ - struct usb_st_tts_descriptor st_tts; - /*! Audio control interface string descriptor */ - struct usb_st_audio_descriptor st_audio; -}; -/* @} */ -extern code struct usb_st_device_descriptor usb_device_descriptor; -extern code struct usb_configuration_s usb_configuration; -extern code struct string_s string; - -#endif // _USB_DESC_H_ Copied: firmware/fuxusb/tags/0.5.0-libusb/src/usb_desc.h (from rev 1457, firmware/fuxusb/trunk/src/usb_desc.h) =================================================================== --- firmware/fuxusb/tags/0.5.0-libusb/src/usb_desc.h (rev 0) +++ firmware/fuxusb/tags/0.5.0-libusb/src/usb_desc.h 2008-08-11 12:04:04 UTC (rev 1458) @@ -0,0 +1,629 @@ +/* + * FUXUSB - Firmware for the USB CPU of tuxdroid + * Copyright (C) 2008 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 usb_desc.h + \brief Structures and variable for the descriptors + \ingroup usb_desc +*/ + +#ifndef _USB_DESC_H_ +#define _USB_DESC_H_ + +#include "version.h" + +/** Enable / Disable the HID interface */ +//#define HID_DEVICE + +/** \name Descriptors type + * @{ */ +/** \name Standard descriptors + * @{ */ +/** Device descriptor request */ +#define DEVICE 0x01 +/** Device descriptor request */ +#define CONFIGURATION 0x02 +/** Device descriptor request */ +#define STRING 0x03 +/** Device descriptor request */ +#define INTERFACE 0x04 +/** Device descriptor request */ +#define ENDPOINT 0x05 +/*! @} */ +/** \name HID specific descriptors + * @{ */ +/** HID descriptor request */ +#define HID 0x21 +/** Report descriptor request */ +#define REPORT 0x22 +/*! @} */ +/*! @} */ + +/** \name Device status, states and configs + * @{ */ +/** Supply status */ +#define SELF_POWERED 1 +/** Attached state */ +#define ATTACHED 0 +/** Powered state */ +#define POWERED 1 +/** Default state */ +#define DEFAULT 2 +/** Addressed state */ +#define ADDRESSED 3 +/** Configured state */ +#define CONFIGURED 4 +/** Suspended state */ +#define SUSPENDED 5 +/** Bus powered config */ +#define USB_CONFIG_BUSPOWERED 0x80 +/** Self powered config */ +#define USB_CONFIG_SELFPOWERED 0x40 +/** Remote wakeup config */ +#define USB_CONFIG_REMOTEWAKEUP 0x20 +/*! @} */ + +/** \name Endpoints + * @{ */ +/** \name IN Endpoints + * @{ */ +#define OUT_ENDPOINT1 0x01 +#define OUT_ENDPOINT2 0x02 +#define OUT_ENDPOINT3 0x03 +#define OUT_ENDPOINT4 0x04 +#define OUT_ENDPOINT5 0x05 +#define OUT_ENDPOINT6 0x06 +/*! @} */ +/** \name OUT Endpoints + * @{ */ +#define IN_ENDPOINT1 0x81 +#define IN_ENDPOINT2 0x82 +#define IN_ENDPOINT3 0x83 +#define IN_ENDPOINT4 0x84 +#define IN_ENDPOINT5 0x85 +#define IN_ENDPOINT6 0x86 +/*! @} */ +/*! @} */ + +/** \name Strings + * @{ */ +/** \name Manufacturer + * @{ */ +#define MAN_STRING_INDEX 1 +#define USB_MANUFACTURER_NAME {'K'<<8, 'y'<<8, 's'<<8, 'o'<<8, 'h'<<8} +#define USB_MN_LENGTH 5 +/* @} */ + +/** \name Product + * @{ */ +#define PROD_STRING_INDEX 2 +#define USB_PRODUCT_NAME {'T'<<8, 'u'<<8, 'x'<<8, 'D'<<8, \ + 'r'<<8, 'o'<<8, 'i'<<8, 'd'<<8} +#define USB_PN_LENGTH 8 +/* @} */ + +/** \name Serial number + * @{ */ +#define SN_STRING_INDEX 3 +#define USB_SERIAL_NUMBER {'1'<<8, '0'<<8, '0'<<8, '0'<<8, '1'<<8} +#define USB_SN_LENGTH 5 +/* @} */ + +/** \name Configuration + * @{ */ +#define CONFIG_STRING_INDEX 4 +#define USB_CONFIG_NAME {'T'<<8, 'u'<<8, 'x'<<8, 'D'<<8, \ + 'r'<<8, 'o'<<8, 'i'<<8, 'd'<<8} +#define USB_CONFIG_LENGTH 8 +/* @} */ + +/** \name Speaker interface + * @{ */ +#define AUDIO_SPEAKER_INDEX 5 +#define AUDIO_SPEAKER_NAME {'T'<<8, 'u'<<8, 'x'<<8, 'D'<<8, \ + 'r'<<8, 'o'<<8, 'i'<<8, 'd'<<8, '-'<<8, 'S'<<8, 'p'<<8, 'e'<<8, \ + 'a'<<8, 'k'<<8,'e'<<8,'r'<<8} +#define AUDIO_SPEAKER_LENGTH 16 +/* @} */ + +/** \name Microphone interface + * @{ */ +#define AUDIO_MICRO_INDEX 6 +#define AUDIO_MICRO_NAME {'T'<<8, 'u'<<8, 'x'<<8, 'D'<<8, \ + 'r'<<8, 'o'<<8, 'i'<<8, 'd'<<8, '-'<<8, 'M'<<8, 'i'<<8, 'c'<<8, \ + 'r'<<8, 'o'<<8} +#define AUDIO_MICRO_LENGTH 14 +/* @} */ + +/** \name TTS interface + * @{ */ +#define AUDIO_TTS_INDEX 7 +#define AUDIO_TTS_NAME {'T'<<8, 'u'<<8, 'x'<<8, 'D'<<8, \ + 'r'<<8, 'o'<<8, 'i'<<8, 'd'<<8, '-'<<8, 'T'<<8, 'T'<<8, 'S'<<8} +#define AUDIO_TTS_LENGTH 12 +/* @} */ + +/** \name Normal audio control interface + * @{ */ +#define AUDIO_NORMAL_INDEX 8 +#define AUDIO_NORMAL_NAME {'T'<<8, 'u'<<8, 'x'<<8, 'D'<<8, \ + 'r'<<8, 'o'<<8, 'i'<<8, 'd'<<8, '-'<<8, 'A'<<8, 'u'<<8, 'd'<<8, \ + 'i'<<8, 'o'<<8} +#define AUDIO_NORMAL_LENGTH 14 +/* @} */ +/* @} */ + + + +/** \name USB configuration + * @{ */ + + +/** \name Device specifications and classes + * @} */ +#define USB_SPECIFICATION 0x1001 +#define DEVICE_CLASS 0x00 +#define DEVICE_SUB_CLASS 0 +#define DEVICE_PROTOCOL 0 +#define EP_CONTROL_LENGTH 32 +#define NB_CONFIGURATION 1 +/* @} */ + +/** \name Version - PID/VID + * @{ */ +#define VENDOR_ID 0xEB03 /* Atmel vendor ID = 03EBh */ +#define PRODUCT_ID 0x07FF /* Product ID: FF07h*/ +#define RELEASE_NUMBER (0x0100*VER_UPDATE) + (0x1000*VER_MINOR) +\ + (0x0001*VER_MAJOR) +/* @} */ + +/** \name Configuration descriptor + * @{ */ +#ifdef HID_DEVICE +# define SIZE_OF_REPORT 0x22 +# define CONF_LENGTH 0x2901 // 297 +# define NB_INTERFACE 6 +#else +# define CONF_LENGTH 0x2001 // 288 +# define NB_INTERFACE 6 +#endif + +#define CONF_NB 1 +#define CONF_ATTRIBUTES USB_CONFIG_BUSPOWERED +#define MAX_POWER 50 /* 100 mA */ +/* @} */ + +/** \name Languages + * @{ */ +#define LANG_ID 0x00 +#define LANGUAGE_ID 0x0904 +/* @} */ +/* @} */ + +code struct usb_st_device_descriptor +{ + uint8_t bLength; /**< Size of this descriptor in bytes. */ + uint8_t bDescriptorType; /**< DEVICE descriptor type */ + uint16_t bscUSB; /**< Binay Coded Decimal Spec. release */ + uint8_t bDeviceClass; /**< Class code assigned by the USB */ + uint8_t bDeviceSubClass; /**< Sub-class code assigned by the USB */ + uint8_t bDeviceProtocol; /**< Protocol code assigned by the USB */ + uint8_t bMaxPacketSize0; /**< Max packet size for EP0 */ + uint16_t idVendor; /**< Vendor ID. ATMEL = 0x03EB */ + uint16_t idProduct; /**< Product ID assigned by the manufacturer */ + uint16_t bcdDevice; /**< Device release number */ + uint8_t iManufacturer; /**< Index of manu. string descriptor */ + uint8_t iProduct; /**< Index of prod. string descriptor */ + uint8_t iSerialNumber; /**< Index of S.N. string descriptor */ + uint8_t bNumConfigurations; /**< Number of possible configurations */ +}; + +code struct usb_st_configuration_descriptor +{ + uint8_t bLength; /**< size of this descriptor in bytes */ + uint8_t bDescriptorType; /**< CONFIGURATION descriptor type */ + uint16_t wTotalLength; /**< total length of data returned */ + uint8_t bNumInterfaces; /**< number of interfaces for this conf. */ + uint8_t bConfigurationValue; /**< value for SetConfiguration resquest */ + uint8_t iConfiguration; /**< index of string descriptor */ + uint8_t bmAttibutes; /**< Configuration characteristics */ + uint8_t MaxPower; /**< maximum power consumption */ +}; + +code struct usb_st_interface_descriptor +{ + uint8_t bLength; /**< size of this descriptor in bytes */ + uint8_t bDescriptorType; /**< INTERFACE descriptor type */ + uint8_t bInterfaceNumber; /**< Number of interface */ + uint8_t bAlternateSetting; /**< value to select alternate setting */ + uint8_t bNumEndpoints; /**< Number of EP except EP 0 */ + uint8_t bInterfaceClass; /**< Class code assigned by the USB */ + uint8_t bInterfaceSubClass; /**< Sub-class code assigned by the USB */ + uint8_t bInterfaceProtocol; /**< Protocol code assigned by the USB */ + uint8_t iInterface; /**< Index of string descriptor */ +}; + +code struct usb_st_endpoint_descriptor +{ + uint8_t bLength; /**< Size of this descriptor in bytes */ + uint8_t bDescriptorType; /**< ENDPOINT descriptor type */ + uint8_t bEndpointAddress; /**< Address of the endpoint */ + uint8_t bmAttributes; /**< Endpoint's attributes */ + uint16_t wMaxPacketSize; /**< Maximum packet size for this EP */ + uint8_t bInterval; /**< Interval for polling EP in ms */ +}; + +/* HID specific */ +code struct usb_hid_descriptor +{ + uint8_t bLength; /**< size of this descriptor in bytes */ + uint8_t bDescriptorType; /**< INTERFACE descriptor type */ + uint16_t bcdHID; /**< HID spec. */ + uint8_t bCountryCode; /**< Country code value*/ + uint8_t bNumDescriptors; /**< Number of reports descriptor */ + uint8_t bDescriptorTypeRep; /**< Type of the class-specific descriptor */ + uint16_t wDescriptorLength; /**< Size of the report descriptor */ +}; + +/* Audio Class specific */ +code struct usb_Audio_st_ACinterface_descriptor +{ + uint8_t bLength; /**< size of this descriptor in bytes */ + uint8_t bDescriptorType; /**< INTERFACE descriptor type */ + uint8_t bInterfaceNumber; /**< Number of interface */ + uint8_t bAlternateSetting; /**< value to select alternate setting */ + uint8_t bNumEndpoints; /**< Number of EP except EP 0 */ + uint8_t bInterfaceClass; /**< Class code assigned by the USB */ + uint8_t bInterfaceSubClass; /**< Sub-class code assigned by the USB */ + uint8_t bInterfaceProtocol; /**< Protocol code assigned by the USB */ + uint8_t iInterface; /**< Index of string descriptor */ +}; + +code struct usb_Audio_cs_ACinterface_descriptor +{ + uint8_t bLength; /**< size of this descriptor in bytes */ + uint8_t bDescriptorType; /**< INTERFACE descriptor type */ + uint8_t bDescriptorSubtype; /**< HEADER descriptor subtype.*/ + uint16_t bcdADC; /**< Audio Device Class Specification Release Number in Binary-Coded Decimal */ + uint16_t wTotalLength; /**< Total number of bytes returned for the class-specific AudioControl interface descriptor */ + uint8_t bInCollection; /**< Number of EP except EP 0 */ + uint8_t baInterfaceNr[2]; /**< Class code assigned by the USB */ +}; + +code struct usb_Audio_cs_ACinterface_descriptor_NbCol1 +{ + uint8_t bLength; /**< size of this descriptor in bytes */ + uint8_t bDescriptorType; /**< INTERFACE descriptor type */ + uint8_t bDescriptorSubtype; /**< HEADER descriptor subtype.*/ + uint16_t bcdADC; /**< Audio Device Class Specification Release Number in Binary-Coded Decimal */ + uint16_t wTotalLength; /**< Total number of bytes returned for the class-specific AudioControl interface descriptor */ + uint8_t bInCollection; /**< Number of EP except EP 0 */ + uint8_t baInterfaceNr[1]; /**< Class code assigned by the USB */ +}; + +/* Audio input terminal */ +code struct usb_Audio_InputTerminal_descriptor +{ + uint8_t bLength; /**< size of this descriptor in bytes */ + uint8_t bDescriptorType; /**< INTERFACE descriptor type */ + uint8_t bDescriptorSubtype; /**< HEADER descriptor subtype.*/ + uint8_t bTerminalID; /**< Constant characterizing the type of Termina*/ + uint16_t wTerminalType; /**< Constant characterizing the type of Terminal.*/ + uint8_t bAssocTerminal; /**< ID of the Output Terminal to which this Input Terminal is associated */ + uint8_t bNrChannels; /**< Number of logical output channels in the Terminals output audio channel cluster. */ + uint16_t wChannelConfig; /**< Describes the spatial location of the logical channels.*/ + uint8_t iChannelNames; /**< Index of a string descriptor, describing the name of the first logical channel */ + uint8_t iTerminal; /**< Index of a string descriptor, describing the Input Terminal. */ +}; + +/* Audio output terminal */ +code struct usb_Audio_OutputTerminal_descriptor +{ + uint8_t bLength; /**< size of this descriptor in bytes */ + uint8_t bDescriptorType; /**< INTERFACE descriptor type */ + uint8_t bDescriptorSubtype; /**< HEADER descriptor subtype.*/ + uint8_t bTerminalID; /**< Constant characterizing the type of Termina*/ + uint16_t wTerminalType; /**< Constant characterizing the type of Terminal.*/ + uint8_t bAssocTerminal; /**< ID of the Output Terminal to which this Input Terminal is associated */ + uint8_t bSourceID; /**< ID of the Unit or Terminal to which this Terminal is connected */ + uint8_t iTerminal; /**< Index of a string descriptor, describing the Input Terminal. */ +}; + +/* Audio feature unit */ +code struct usb_Audio_FeatureUnit_descriptor +{ + uint8_t bLength; /**< size of this descriptor in bytes */ + uint8_t bDescriptorType; /**< INTERFACE descriptor type */ + uint8_t bDescriptorSubtype; /**< HEADER descriptor subtype.*/ + uint8_t bUnitID; /**< Constant uniquely identifying the Unit within the audio function.*/ + uint8_t bSourceID; /**< Constant characterizing the type of Terminal.*/ + uint8_t bControlSize; /**< Size in bytes of an element of the bmaControls() array: n*/ + uint8_t bmaControls[2]; /**< ID of the Unit or Terminal to which this Terminal is connected */ + uint8_t iFeature; /**< Index of a string descriptor, describing this Feature Unit.. */ +}; + +/* Audio stream */ +code struct usb_Audio_st_ASinterface_descriptor +{ + uint8_t bLength; /**< size of this descriptor in bytes */ + uint8_t bDescriptorType; /**< INTERFACE descriptor type */ + uint8_t bInterfaceNumber; /**< Number of interface */ + uint8_t bAlternateSetting; /**< value to select alternate setting */ + uint8_t bNumEndpoints; /**< Number of EP except EP 0 */ + uint8_t bInterfaceClass; /**< Class code assigned by the USB */ + uint8_t bInterfaceSubClass; /**< Sub-class code assigned by the USB */ + uint8_t bInterfaceProtocol; /**< Protocol code assigned by the USB */ + uint8_t iInterface; /**< Index of string descriptor */ +}; + +/* Audio class specific */ +code struct usb_Audio_cs_ASinterface_descriptor +{ + uint8_t bLength; /**< size of this descriptor in bytes */ + uint8_t bDescriptorType; /**< INTERFACE descriptor type */ + uint8_t bDescriptorSubtype; /**< AS_GENERAL descriptor subtype.*/ + uint8_t bTerminalLink; /**< The Terminal ID of the Terminal to which the endpoint of this interface is connected.*/ + uint8_t bDelay; /**< Delay (d) introduced by the data path */ + uint16_t wFormatTag; /**< Class code assigned by the USB */ +}; + +/* Audio EP */ +code struct usb_Audio_st_endpoint_descriptor +{ + uint8_t bLength; /**< Size of this descriptor in bytes */ + uint8_t bDescriptorType; /**< ENDPOINT descriptor type */ + uint8_t bEndpointAddress; /**< Address of the endpoint */ + uint8_t bmAttributes; /**< Endpoint's attributes */ + uint16_t wMaxPacketSize; /**< Maximum packet size for this EP */ + uint8_t bInterval; /**< Interval for polling EP in ms */ + uint8_t bRefresh; /**< Reset to 0.*/ + uint8_t bSynchAddress; /**< The address of the endpoint used to communicate synchronization information if required by this endpoint..*/ +}; + +/* Audio stream */ +code struct usb_Audio_cs_ASendpoint_descriptor +{ + uint8_t bLength; /**< Size of this descriptor in bytes */ + uint8_t bDescriptorType; /**< ENDPOINT descriptor type */ + uint8_t bDescriptorSubtype; /**< EP_GENERAL descriptor subtype. */ + uint8_t bmAttributes; /**< Endpoint's attributes */ + uint8_t bLockDelayUnits; /**< Indicates the units used for the wLockDelay field:*/ + uint16_t wLockDelay; /**< Reset to 0.*/ +}; + +/* Audio endpoint */ +code struct usb_Audio_TYPEI_FormatType_descriptor +{ + uint8_t bLength; /**< Size of this descriptor in bytes */ + uint8_t bDescriptorType; /**< ENDPOINT descriptor type */ + uint8_t bDescriptorSubtype; /**< EP_GENERAL descriptor subtype. */ + uint8_t bFormatType; /**< FORMAT_TYPE_I. Constant identifying the Format Type the AudioStreaming interface is using.*/ + uint8_t bNrChannels; /**< Indicates the number of physical channels in the audio data stream.:*/ + uint8_t bSubframeSize; /**< The number of bytes occupied by one audio subframe. Can be 1, 2, 3 or 4.*/ + uint8_t bBitResolution; /**< The number of effectively used bits from the available bits in an audio subframe.*/ + uint8_t bSamFreqType; /**< Indicates how the sampling frequency can be programmed */ + uint8_t bSamFreqTbl[3]; /**< See sampling frequency tables*/ +}; + +/** \name General structure + * This structure contain all the descriptors. + * @{ */ +code struct usb_configuration_s +{ + /*! Configuration descriptor */ + struct usb_st_configuration_descriptor cfg; + + + // Interface O :: Audio Control + //------------------------------------------------------------------------- + /*! Standard interface descriptor */ + struct usb_Audio_st_ACinterface_descriptor StandardACInterfaceDescriptor_1; + /*! Specific interface descriptor */ + struct usb_Audio_cs_ACinterface_descriptor SpecificACInterfaceDescriptor; + /*! Microphone input terminal */ + struct usb_Audio_InputTerminal_descriptor MicInputTerminal1Descriptor; + /*! Speaker input terminal */ + struct usb_Audio_InputTerminal_descriptor SpkInputTerminalDescriptor; + /*! Microphone output terminal */ + struct usb_Audio_OutputTerminal_descriptor MicOutputTerminal1Descriptor; + /*! Speaker output descriptor */ + struct usb_Audio_OutputTerminal_descriptor SpkOutputTerminalDescriptor; + + // Interface 1 :: Audio Stream Microphone + //------------------------------------------------------------------------- + /*! Standard interface descriptor (alt. 0) */ + struct usb_Audio_st_ASinterface_descriptor MicStandardAlt0ASInterfaceDescriptor; + /*! Standard interface descriptor (alt. 1 - active) */ + struct usb_Audio_st_ASinterface_descriptor MicStandardAlt1ASInterfaceDescriptor; + /*! Specific audio stream interface descriptor */ + struct usb_Audio_cs_ASinterface_descriptor MicSpecificASInterfaceDescriptor; + /*! Format descriptor */ + struct usb_Audio_TYPEI_FormatType_descriptor MicFormatTypeDescriptor; + /*! Standard endpoint descriptor */ + struct usb_Audio_st_endpoint_descriptor MicStandardEndpointDescriptor; + /*! Endpoint */ + struct usb_Audio_cs_ASendpoint_descriptor MicEndpointDescriptor; + + // Interface 2 :: Audio Stream Speaker + //------------------------------------------------------------------------- + /*! Standard interface descriptor (alt. 0) */ + struct usb_Audio_st_ASinterface_descriptor SpkStandardAlt0ASInterfaceDescriptor; + /*! Standard interface descriptor (alt. 1 - active) */ + struct usb_Audio_st_ASinterface_descriptor SpkStandardAlt1ASInterfaceDescriptor; + /*! Specific audio stream interface descriptor */ + struct usb_Audio_cs_ASinterface_descriptor SpkSpecificASInterfaceDescriptor; + /*! Format descriptor */ + struct usb_Audio_TYPEI_FormatType_descriptor SpkFormatTypeDescriptor; + /*! Standard endpoint descriptor */ + struct usb_Audio_st_endpoint_descriptor SpkStandardEndpointDescriptor; + /*! Endpoint */ + struct usb_Audio_cs_ASendpoint_descriptor SpkEndpointDescriptor; + + // Interface 3 :: Command / Status Interface + //------------------------------------------------------------------------- +#ifdef HID_DEVICE + /*! Standard interface descriptor */ + struct usb_st_interface_descriptor HIDInterfaceDescriptor; + /*! HID interface descriptor */ + struct usb_hid_descriptor HIDStandardDescriptor; + /*! Standard EP descriptor */ + struct usb_st_endpoint_descriptor HID_InEndpointDescriptor; + /*! Standard EP descriptor */ + struct usb_st_endpoint_descriptor HID_OutEndpointDescriptor; +#else + /*! Standard interface descriptor */ + struct usb_st_interface_descriptor HIDInterfaceDescriptor; + /*! Standard EP descriptor */ + struct usb_st_endpoint_descriptor HID_InEndpointDescriptor; + /*! Standard EP descriptor */ + struct usb_st_endpoint_descriptor HID_OutEndpointDescriptor; +#endif + + // Interface 4 :: Audio Control + //------------------------------------------------------------------------- + /*! Standard interface descriptor */ + struct usb_Audio_st_ACinterface_descriptor StandardACInterfaceDescriptor_TTS; + /*! Specific interface descriptor */ + struct usb_Audio_cs_ACinterface_descriptor_NbCol1 SpecificACInterfaceDescriptor_TTS; + /*! TTS input terminal */ + struct usb_Audio_InputTerminal_descriptor SpkInputTerminalDescriptor_TTS; + /*! TTS output terminal */ + struct usb_Audio_OutputTerminal_descriptor SpkOutputTerminalDescriptor_TTS; + + // Interface 5 :: Audio Stream + //------------------------------------------------------------------------- + /*! Standard interface descriptor (alt. 0) */ + struct usb_Audio_st_ASinterface_descriptor SpkStandardAlt0ASInterfaceDescriptor_TTS; + /*! Standard interface descriptor (alt. 1 - active) */ + struct usb_Audio_st_ASinterface_descriptor SpkStandardAlt1ASInterfaceDescriptor_TTS; + /*! Specific audio stream interface descriptor */ + struct usb_Audio_cs_ASinterface_descriptor SpkSpecificASInterfaceDescriptor_TTS; + /*! Format descriptor */ + struct usb_Audio_TYPEI_FormatType_descriptor SpkFormatTypeDescriptor_TTS; + /*! Standard endpoint descriptor */ + struct usb_Audio_st_endpoint_descriptor SpkStandardEndpointDescriptor_TTS; + /*! Endpoint */ + struct usb_Audio_cs_ASendpoint_descriptor SpkEndpointDescriptor_TTS; + +#ifdef HID_DEVICE + // Report descriptor + //------------------------------------------------------------------------- + uint8_t rep[SIZE_OF_REPORT]; +#endif +}; +/* @} */ + +/** \name String descriptors + * @{ */ +code struct usb_st_language_descriptor +{ + uint8_t bLength; /**< size of this descriptor in bytes */ + uint8_t bDescriptorType; /**< STRING descriptor type */ + uint16_t wstring[USB_CONFIG_LENGTH]; /**< language id */ +}; + +code struct usb_st_manufacturer +{ + uint8_t bLength; /**< size of this descriptor in bytes */ + uint8_t bDescriptorType; /**< STRING descriptor type */ + uint16_t wstring[USB_MN_LENGTH];/**< unicode characters */ +}; + +code struct usb_st_product +{ + uint8_t bLength; /**< size of this descriptor in bytes */ + uint8_t bDescriptorType; /**< STRING descriptor type */ + uint16_t wstring[USB_PN_LENGTH];/**< unicode characters */ +}; + +code struct usb_st_serial_number +{ + uint8_t bLength; /**< size of this descriptor in bytes */ + uint8_t bDescriptorType; /**< STRING descriptor type */ + uint16_t wstring[USB_SN_LENGTH];/**< unicode characters */ +}; + +code struct usb_st_config +{ + uint8_t bLength; /**< size of this descriptor in bytes */ + uint8_t bDescriptorType; /**< STRING descriptor type */ + uint16_t wstring[USB_CONFIG_LENGTH];/**< unicode characters */ +}; + +code struct usb_st_speaker_descriptor +{ + uint8_t bLength; /**< size of this descriptor in bytes */ + uint8_t bDescriptorType; /**< STRING descriptor type */ + uint16_t wstring[AUDIO_SPEAKER_LENGTH]; /**< language id */ +}; + +code struct usb_st_micro_descriptor +{ + uint8_t bLength; /**< size of this descriptor in bytes */ + uint8_t bDescriptorType; /**< STRING descriptor type */ + uint16_t wstring[AUDIO_MICRO_LENGTH]; /**< language id */ +}; + +code struct usb_st_tts_descriptor +{ + uint8_t bLength; /**< size of this descriptor in bytes */ + uint8_t bDescriptorType; /**< STRING descriptor type */ + uint16_t wstring[AUDIO_TTS_LENGTH]; /**< language id */ +}; + + +code struct usb_st_audio_descriptor +{ + uint8_t bLength; /**< size of this descriptor in bytes */ + uint8_t bDescriptorType; /**< STRING descriptor type */ + uint16_t wstring[AUDIO_NORMAL_LENGTH]; /**< language id */ +}; +/* @} */ + +/** \name String structure + * This structure contain all the descriptors. + * @{ */ +code struct string_s +{ + /*! Language string descriptor */ + struct usb_st_language_descriptor st_language; + /*! Manufacturer string descriptor */ + struct usb_st_manufacturer st_manufacturer; + /*! Product string descriptor */ + struct usb_st_product st_product; + /*! Serial number string descriptor */ + struct usb_st_serial_number st_serial_number; + /*! Configuration string descriptor */ + struct usb_st_config st_config; + /*! Speaker interface string descriptor */ + struct usb_st_speaker_descriptor st_speaker; + /*! Micro interface string descriptor */ + struct usb_st_micro_descriptor st_micro; + /*! TTS Interface string descriptor */ + struct usb_st_tts_descriptor st_tts; + /*! Audio control interface string descriptor */ + struct usb_st_audio_descriptor st_audio; +}; +/* @} */ +extern code struct usb_st_device_descriptor usb_device_descriptor; +extern code struct usb_configuration_s usb_configuration; +extern code struct string_s string; + +#endif // _USB_DESC_H_ Property changes on: firmware/tuxaudio/tags/0.4.0 ___________________________________________________________________ Name: svn:externals - common http://svn.tuxisalive.com/firmware/tuxdefs + common -r 1026 http://svn.tuxisalive.com/firmware/tuxdefs Copied: firmware/tuxaudio/tags/0.5.0 (from rev 1447, firmware/tuxaudio/trunk) Property changes on: firmware/tuxaudio/tags/0.5.0 ___________________________________________________________________ Name: svn:externals + common -r 1457 http://svn.tuxisalive.com/firmware/tuxdefs Name: svn:mergeinfo + Deleted: firmware/tuxaudio/tags/0.5.0/Makefile =================================================================== --- firmware/tuxaudio/trunk/Makefile 2008-08-03 14:25:41 UTC (rev 1447) +++ firmware/tuxaudio/tags/0.5.0/Makefile 2008-08-11 12:04:04 UTC (rev 1458) @@ -1,202 +0,0 @@ -# Makefile for the 'audio' CPU of Tux Droid - -## Configuration Flags -MIC_GAIN = 6 # values can be 0, 6 or 12 (which is the gain in dB) - -## General Flags -PROJECT = tuxaudio -MCU = atmega88 -FORMAT = ihex -TARGET = tuxaudio.elf -BOOTLOADER = tuxaudio_bl.elf -OPT = s - -CC = avr-gcc -OBJCOPY = avr-objcopy -OBJDUMP = avr-objdump -SIZE = avr-size -NM = avr-nm -AVRDUDE = avrdude - -# Name of this Makefile (used for "make depend"). -MAKEFILE = Makefile - -# Compiler flag to set the C Standard level. -# c89 - "ANSI" C -# gnu89 - c89 plus GCC extensions -# c99 - ISO C99 standard (not yet fully implemented) -# gnu99 - c99 plus GCC extensions -CSTANDARD = -std=gnu99 - -## Options common to compile, link and assembly rules -COMMON = -mmcu=$(MCU) - -# Place -D or -U options here -CDEFS = -DF_CPU=8000000UL -DMIC_GAIN=$(MIC_GAIN) - -# Place -I options here -CINCS = - -# Compile options common for all C compilation units. -ifdef windir -CDEBUG = -gdwarf-2 -else -CDEBUG = -g -endif -CWARN = -Wall -Wstrict-prototypes -CTUNING = -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -CFLAGS = $(COMMON) $(CDEBUG) $(CDEFS) $(CINCS) -O$(OPT) $(CWARN) $(CSTANDARD) $(CEXTRA) -CFLAGS += -MD -MP -MT $(*F).o -MF dep/$(@F).d - -## Assembly specific flags -ASMFLAGS = $(COMMON) -ASMFLAGS += -x assembler-with-cpp -Wa,-gdwarf2 - -## Linker flags -LDFLAGS = $(COMMON) -LDFLAGS += -Wl,--section-start=.version=0x1DF0 -Wl,-Map=tuxaudio.map tuxaudio.ld - -## Linker flags for bootloader -BL_LDFLAGS = $(COMMON) -BL_LDFLAGS += -Wl,--section-start=.text=0x1E00 -Wl,-Map=tuxaudio_bl.map - -## Intel Hex file production flags -HEX_FLASH_FLAGS = -R .eeprom - -HEX_EEPROM_FLAGS = -j .eeprom -HEX_EEPROM_FLAGS += --set-section-flags=.eeprom="alloc,load" -HEX_EEPROM_FLAGS += --change-section-lma .eeprom=0 - - -## Objects that must be built in order to link -OBJECTS = init.o main.o varis.o fifo.o spi.o AT26F004.o flash.o communication.o parser.o misc.o PC_communication.o i2c.o config.o - -## Objects explicitly added by the user -LINKONLYOBJECTS = - -## Build -all: svnrev.h $(TARGET) tuxaudio.hex tuxaudio.eep tuxaudio.lss size -boot: $(BOOTLOADER) tuxaudio_bl.hex tuxaudio_bl.lss bl_size - -## Compile -init.o: init.c - $(CC) $(INCLUDES) $(CFLAGS) -c $< - -main.o: main.c - $(CC) $(INCLUDES) $(CFLAGS) -c $< - -varis.o: varis.c - $(CC) $(INCLUDES) $(CFLAGS) -c $< - -fifo.o: fifo.c - $(CC) $(INCLUDES) $(CFLAGS) -c $< - -spi.o: spi.c - $(CC) $(INCLUDES) $(CFLAGS) -c $< - -AT26F004.o: AT26F004.c - $(CC) $(INCLUDES) $(CFLAGS) -c $< - -flash.o: flash.c - $(CC) $(INCLUDES) $(CFLAGS) -c $< - -communication.o: communication.c - $(CC) $(INCLUDES) $(CFLAGS) -c $< - -parser.o: parser.c - $(CC) $(INCLUDES) $(CFLAGS) -c $< - -misc.o: misc.c - $(CC) $(INCLUDES) $(CFLAGS) -c $< - -PC_communication.o: PC_communication.c - $(CC) $(INCLUDES) $(CFLAGS) -c $< - -i2c.o: i2c.c - $(CC) $(INCLUDES) $(CFLAGS) -c $< - -config.o: config.c - $(CC) $(INCLUDES) $(CFLAGS) -c $< - -bootloader.o: bootloader.c - $(CC) $(INCLUDES) $(CFLAGS) -c $< - - - - -##Link -$(TARGET): $(OBJECTS) - $(CC) $(LDFLAGS) $(OBJECTS) $(LINKONLYOBJECTS) $(LIBDIRS) $(LIBS) -o $(TARGET) - -$(BOOTLOADER): bootloader.o - $(CC) $(BL_LDFLAGS) bootloader.o -o $(BOOTLOADER) - -%.hex: %.elf - avr-objcopy -O ihex $(HEX_FLASH_FLAGS) $< $@ - -%.eep: %.elf - avr-objcopy $(HEX_EEPROM_FLAGS) -O ihex $< $@ - -%.lss: %.elf - avr-objdump -h -S $< > $@ - -size: ${TARGET} - @echo -ifdef windir - @avr-size -C --mcu=${MCU} ${TARGET} -else - @avr-size ${TARGET} -endif - -bl_size: ${BOOTLOADER} - @echo -ifdef windir - @avr-size -C --mcu=${MCU} ${BOOTLOADER} -else - @avr-size ${BOOTLOADER} -endif - -## Generate SVN info -# We need to change the status each time a file changes, thus so many -# dependenc... [truncated message content] |
From: jaguarondi <c2m...@c2...> - 2008-08-11 11:57:29
|
Author: jaguarondi Date: 2008-08-11 13:57:38 +0200 (Mon, 11 Aug 2008) New Revision: 1457 Modified: firmware/fuxusb/trunk/fuxusb.Opt firmware/fuxusb/trunk/fuxusb.Uv2 firmware/fuxusb/trunk/src/usb_desc.h firmware/tuxaudio/trunk/version.h firmware/tuxcore/trunk/version.h Log: * Prepare for tagging 0.5.0 release (USB compiled for libusb). Modified: firmware/fuxusb/trunk/fuxusb.Opt =================================================================== (Binary files differ) Modified: firmware/fuxusb/trunk/fuxusb.Uv2 =================================================================== (Binary files differ) Modified: firmware/fuxusb/trunk/src/usb_desc.h =================================================================== --- firmware/fuxusb/trunk/src/usb_desc.h 2008-08-11 11:56:30 UTC (rev 1456) +++ firmware/fuxusb/trunk/src/usb_desc.h 2008-08-11 11:57:38 UTC (rev 1457) @@ -30,7 +30,7 @@ #include "version.h" /** Enable / Disable the HID interface */ -#define HID_DEVICE +//#define HID_DEVICE /** \name Descriptors type * @{ */ Modified: firmware/tuxaudio/trunk/version.h =================================================================== --- firmware/tuxaudio/trunk/version.h 2008-08-11 11:56:30 UTC (rev 1456) +++ firmware/tuxaudio/trunk/version.h 2008-08-11 11:57:38 UTC (rev 1457) @@ -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 */ Modified: firmware/tuxcore/trunk/version.h =================================================================== --- firmware/tuxcore/trunk/version.h 2008-08-11 11:56:30 UTC (rev 1456) +++ firmware/tuxcore/trunk/version.h 2008-08-11 11:57:38 UTC (rev 1457) @@ -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...> - 2008-08-11 11:56:22
|
Author: jaguarondi Date: 2008-08-11 13:56:30 +0200 (Mon, 11 Aug 2008) New Revision: 1456 Modified: firmware/tuxaudio/trunk/Makefile Log: * Same stabs stuff. Modified: firmware/tuxaudio/trunk/Makefile =================================================================== --- firmware/tuxaudio/trunk/Makefile 2008-08-11 11:11:01 UTC (rev 1455) +++ firmware/tuxaudio/trunk/Makefile 2008-08-11 11:56:30 UTC (rev 1456) @@ -50,7 +50,7 @@ ## Assembly specific flags ASMFLAGS = $(COMMON) -ASMFLAGS += -x assembler-with-cpp -Wa,-gdwarf2 +ASMFLAGS += -x assembler-with-cpp -Wa,-gstabs ## Linker flags LDFLAGS = $(COMMON) |
From: jaguarondi <c2m...@c2...> - 2008-08-11 11:10:58
|
Author: jaguarondi Date: 2008-08-11 13:11:01 +0200 (Mon, 11 Aug 2008) New Revision: 1455 Added: firmware/fuxusb/trunk/src/Makefile firmware/fuxusb/trunk/src/svnrev.tmpl.h Modified: firmware/fuxusb/trunk/src/global.c firmware/fuxusb/trunk/src/usb_commands.c firmware/fuxusb/trunk/src/version.h Log: * Added revision numbers updated from the Makefile and the revision number bytes were swapped. Added: firmware/fuxusb/trunk/src/Makefile =================================================================== --- firmware/fuxusb/trunk/src/Makefile (rev 0) +++ firmware/fuxusb/trunk/src/Makefile 2008-08-11 11:11:01 UTC (rev 1455) @@ -0,0 +1,30 @@ +# Makefile - GNU Makefile for TUXCORE +# +# TUXCORE - Firmware for the 'core' CPU 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$ + +## Build +all: svnrev.h + +## Generate SVN info +# We need to change the status each time a file changes, thus so many +# dependencies +svnrev.h: $(CSOURCE) $(HEADERS) + svnwcrev . svnrev.tmpl.h svnrev.h Property changes on: firmware/fuxusb/trunk/src/Makefile ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:keywords + Id Name: svn:eol-style + native Modified: firmware/fuxusb/trunk/src/global.c =================================================================== --- firmware/fuxusb/trunk/src/global.c 2008-08-11 08:41:45 UTC (rev 1454) +++ firmware/fuxusb/trunk/src/global.c 2008-08-11 11:11:01 UTC (rev 1455) @@ -46,8 +46,9 @@ /** \name Dongle infos * @{ */ -code version_t info_version ={VERSION_CMD, CPU_VER_JOIN(FUXUSB_CPU_NUM, VER_MAJOR), VER_MINOR, VER_UPDATE}; -code revision_t info_revision={REVISION_CMD, REVISION_NUMBER, RELEASE_TYPE}; +code version_t info_version ={VERSION_CMD, + CPU_VER_JOIN(FUXUSB_CPU_NUM, VER_MAJOR), VER_MINOR, VER_UPDATE}; +code revision_t info_revision={REVISION_CMD, SVN_REV, RELEASE_TYPE}; code author_t info_author={AUTHOR_CMD, AUTHOR_ID, VARIATION}; /* @} */ Added: firmware/fuxusb/trunk/src/svnrev.tmpl.h =================================================================== --- firmware/fuxusb/trunk/src/svnrev.tmpl.h (rev 0) +++ firmware/fuxusb/trunk/src/svnrev.tmpl.h 2008-08-11 11:11:01 UTC (rev 1455) @@ -0,0 +1,38 @@ +/* + * TUXCORE - Firmware for the 'core' CPU 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$ */ + +/* This file is a template to generate svnrev.h automatically. + * SubWCRev performs keyword susbstitution whith SVN information. + */ + +#ifndef _SVNREV_H_ +#define _SVNREV_H_ + +#define SVN_REV $WCREV$ +#define SVN_REVSTR "$WCREV$" +#define SVN_REVDATE "$WCDATE$" +#define SVN_MOD $WCMODS?1:0$ +#define SVN_MIX $WCMIXED?1:0$ +#define SVN_STATUS (SVN_MOD + (SVN_MIX<<1)) +#define SVN_RANGE "$WCRANGE$" +#define SVN_URL "$WCURL$" + +#endif /* _SVNREV_H_ */ Property changes on: firmware/fuxusb/trunk/src/svnrev.tmpl.h ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:keywords + Id Name: svn:eol-style + native Modified: firmware/fuxusb/trunk/src/usb_commands.c =================================================================== --- firmware/fuxusb/trunk/src/usb_commands.c 2008-08-11 08:41:45 UTC (rev 1454) +++ firmware/fuxusb/trunk/src/usb_commands.c 2008-08-11 11:11:01 UTC (rev 1455) @@ -254,14 +254,14 @@ /* Revision */ FIFO_STT_put(info_revision.revision_cmd); + FIFO_STT_put((info_revision.revision&0x00FF)); FIFO_STT_put((info_revision.revision&0xFF00)>>8); - FIFO_STT_put((info_revision.revision&0x00FF)); FIFO_STT_put(info_revision.release_type); /* Author */ FIFO_STT_put(info_author.author_cmd); + FIFO_STT_put((info_author.author_id&0x00FF)); FIFO_STT_put((info_author.author_id&0xFF00)>>8); - FIFO_STT_put((info_author.author_id&0x00FF)); FIFO_STT_put(info_author.variation); status_requested = True; Modified: firmware/fuxusb/trunk/src/version.h =================================================================== --- firmware/fuxusb/trunk/src/version.h 2008-08-11 08:41:45 UTC (rev 1454) +++ firmware/fuxusb/trunk/src/version.h 2008-08-11 11:11:01 UTC (rev 1455) @@ -24,18 +24,24 @@ #ifndef _VERSION_H_ #define _VERSION_H_ +#include "svnrev.h" + /* * Version number */ #define VER_MAJOR 0 -#define VER_MINOR 4 -#define VER_UPDATE 1 +#define VER_MINOR 5 +#define VER_UPDATE 0 +/** 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 1 + #define AUTHOR_ID 0 /* official release */ #define VARIATION 0 /* generic firmware */ -#define REVISION_NUMBER 0 /* XXX find a way to define this automatically in \ - the Makefile from SVN */ -#define RELEASE_TYPE 0x04 +#define RELEASE_TYPE (SVN_STATUS | (RELEASE << 2)) + #endif /* _VERSION_H_ */ |
From: jaguarondi <c2m...@c2...> - 2008-08-11 08:41:41
|
Author: jaguarondi Date: 2008-08-11 10:41:45 +0200 (Mon, 11 Aug 2008) New Revision: 1454 Modified: firmware/tuxcore/trunk/Makefile Log: * Makefile: stabs should be used and not dwarf2 for debugging symbols. Modified: firmware/tuxcore/trunk/Makefile =================================================================== --- firmware/tuxcore/trunk/Makefile 2008-08-10 11:40:32 UTC (rev 1453) +++ firmware/tuxcore/trunk/Makefile 2008-08-11 08:41:45 UTC (rev 1454) @@ -68,7 +68,7 @@ ## Assembly specific flags ASMFLAGS = $(COMMON) -ASMFLAGS += -x assembler-with-cpp -Wa,-gdwarf2 +ASMFLAGS += -x assembler-with-cpp -Wa,-gstabs ## Linker flags LDFLAGS = $(COMMON) |
From: jerome <c2m...@c2...> - 2008-08-10 11:40:30
|
Author: jerome Date: 2008-08-10 13:40:32 +0200 (Sun, 10 Aug 2008) New Revision: 1453 Modified: software_suite_v2/software/tools/tuxdroid-gadget-tester/trunk/tuxdroid-gadget-tester/sources/com/kysoh/tuxdroid/gadget/framework/tester/GadgetPanel.java software_suite_v2/software/tools/tuxdroid-gadget-tester/trunk/tuxdroid-gadget-tester/sources/com/kysoh/tuxdroid/gadget/framework/tester/GadgetPropertyEditor.java Log: * Added a constructor to allow choose gadget property editor style. Modified: software_suite_v2/software/tools/tuxdroid-gadget-tester/trunk/tuxdroid-gadget-tester/sources/com/kysoh/tuxdroid/gadget/framework/tester/GadgetPanel.java =================================================================== --- software_suite_v2/software/tools/tuxdroid-gadget-tester/trunk/tuxdroid-gadget-tester/sources/com/kysoh/tuxdroid/gadget/framework/tester/GadgetPanel.java 2008-08-09 10:59:05 UTC (rev 1452) +++ software_suite_v2/software/tools/tuxdroid-gadget-tester/trunk/tuxdroid-gadget-tester/sources/com/kysoh/tuxdroid/gadget/framework/tester/GadgetPanel.java 2008-08-10 11:40:32 UTC (rev 1453) @@ -51,6 +51,8 @@ public class GadgetPanel extends JPanel { public class GadgetCommandAction extends TreeActionItem { + + private static final long serialVersionUID = 2726981096615095410L; private final GadgetToken command; @Override @@ -110,7 +112,7 @@ } } - private static class TreeActionItem extends AbstractAction { + public static class TreeActionItem extends AbstractAction { public TreeActionItem(String label) { super(label); } @@ -330,7 +332,7 @@ */ private void showTokens(Vector<GadgetToken> vector) { for (GadgetToken token : vector) { - console.append(" " + token.getName() + " : " + token.getDescription()); + console.append(" " + token.getName() + " : " + token.getDescription()); } } Modified: software_suite_v2/software/tools/tuxdroid-gadget-tester/trunk/tuxdroid-gadget-tester/sources/com/kysoh/tuxdroid/gadget/framework/tester/GadgetPropertyEditor.java =================================================================== --- software_suite_v2/software/tools/tuxdroid-gadget-tester/trunk/tuxdroid-gadget-tester/sources/com/kysoh/tuxdroid/gadget/framework/tester/GadgetPropertyEditor.java 2008-08-09 10:59:05 UTC (rev 1452) +++ software_suite_v2/software/tools/tuxdroid-gadget-tester/trunk/tuxdroid-gadget-tester/sources/com/kysoh/tuxdroid/gadget/framework/tester/GadgetPropertyEditor.java 2008-08-10 11:40:32 UTC (rev 1453) @@ -26,6 +26,7 @@ import javax.swing.JPanel; import javax.swing.JTable; +import javax.swing.table.TableCellRenderer; import javax.swing.table.TableColumn; import javax.swing.table.TableColumnModel; @@ -49,6 +50,24 @@ GadgetInstanceParameters values; + public GadgetPropertyEditor(Color EditorBackground, TableCellRenderer renderer){ + super(new BorderLayout()); + gadgetParametersEditor = new JTable(new PropertiesTableModel(null, null)); + gadgetParametersEditor.putClientProperty("terminateEditOnFocusLost", Boolean.TRUE); + gadgetParametersEditor.setBackground(EditorBackground); + gadgetParametersEditor.getColumnModel().setColumnMargin(20); + gadgetParametersEditor.setGridColor(Color.LIGHT_GRAY); + try { + gadgetParametersEditor.setDefaultRenderer(Class.forName("java.lang.Object"), + renderer); + } catch (ClassNotFoundException ex) { + ex.printStackTrace(); + } + gadgetParametersEditor.setShowVerticalLines(true); + gadgetParametersEditor.setShowHorizontalLines(false); + add(gadgetParametersEditor); + } + public GadgetPropertyEditor() { super(new BorderLayout()); gadgetParametersEditor = new JTable(new PropertiesTableModel(null, null)); |
From: remi <c2m...@c2...> - 2008-08-09 10:58:56
|
Author: remi Date: 2008-08-09 12:59:05 +0200 (Sat, 09 Aug 2008) New Revision: 1452 Added: software_suite_v2/software/tools/attitunesStudio/trunk/src/GUI/ software_suite_v2/software/tools/attitunesStudio/trunk/src/GUI/AttituneMenuBar.java software_suite_v2/software/tools/attitunesStudio/trunk/src/GUI/AttituneStatusBar.java software_suite_v2/software/tools/attitunesStudio/trunk/src/com/tuxisalive/attitunes/ATTResources.java software_suite_v2/software/tools/attitunesStudio/trunk/src/com/tuxisalive/attitunes/format/ATTFormatCompressor.java software_suite_v2/software/tools/attitunesStudio/trunk/src/com/tuxisalive/attitunes/format/ATTFormatMisc.java Log: * update Added: software_suite_v2/software/tools/attitunesStudio/trunk/src/GUI/AttituneMenuBar.java =================================================================== --- software_suite_v2/software/tools/attitunesStudio/trunk/src/GUI/AttituneMenuBar.java (rev 0) +++ software_suite_v2/software/tools/attitunesStudio/trunk/src/GUI/AttituneMenuBar.java 2008-08-09 10:59:05 UTC (rev 1452) @@ -0,0 +1,184 @@ +package GUI; + +import java.awt.event.*; +import java.awt.*; +import com.tuxisalive.api.*; + +/** + * + * @author User + * + */ +public class AttituneMenuBar extends MenuBar +{ + private static final long serialVersionUID = 1L; + + /* Top level menus */ + private Menu menuFile; + private Menu menuEdit; + private Menu menuHelp; + + /* Sub menus */ + private MenuItem menuItemNew; + private MenuItem menuItemLoad; + private MenuItem menuItemSave; + private MenuItem menuItemSaveAs; + private MenuItem menuItemProperties; + private MenuItem menuItemQuit; + + private MenuItem menuItemCreate; + private MenuItem menuItemDelete; + private MenuItem menuItemCopy; + private MenuItem menuItemPast; + + private MenuItem menuItemOnline; + private MenuItem menuItemAbout; + + /* Event handler */ + public TuxEventHandlers events; + + /** + * + */ + public AttituneMenuBar() + { + super(); + + events = new TuxEventHandlers(); + events.insert("onMenuItemNew"); + events.insert("onMenuItemLoad"); + events.insert("onMenuItemSave"); + events.insert("onMenuItemSaveAs"); + events.insert("onMenuItemProperties"); + events.insert("onMenuItemQuit"); + events.insert("onMenuItemCreate"); + events.insert("onMenuItemDelete"); + events.insert("onMenuItemCopy"); + events.insert("onMenuItemPast"); + events.insert("onMenuItemOnline"); + events.insert("onMenuItemAbout"); + + menuFile = new Menu("File"); + menuEdit = new Menu("Edit"); + menuHelp = new Menu("Help"); + + menuItemNew = new MenuItem("New"); + menuItemNew.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) + { + events.notify("onMenuItemNew", menuItemNew); + } + }); + + menuItemLoad = new MenuItem("Load"); + menuItemLoad.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) + { + events.notify("onMenuItemLoad", menuItemLoad); + } + }); + + menuItemSave = new MenuItem("Save"); + menuItemSave.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) + { + events.notify("onMenuItemSave", menuItemSave); + } + }); + + menuItemSaveAs = new MenuItem("Save As..."); + menuItemSaveAs.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) + { + events.notify("onMenuItemSaveAs", menuItemSaveAs); + } + }); + + menuItemProperties = new MenuItem("Properties"); + menuItemProperties.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) + { + events.notify("onMenuItemProperties", menuItemProperties); + } + }); + + menuItemQuit = new MenuItem("Quit"); + menuItemQuit.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) + { + events.notify("onMenuItemQuit", menuItemQuit); + } + }); + + + menuItemCreate = new MenuItem("Create"); + menuItemCreate.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) + { + events.notify("onMenuItemCreate", menuItemCreate); + } + }); + + menuItemDelete = new MenuItem("Delete"); + menuItemDelete.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) + { + events.notify("onMenuItemDelete", menuItemDelete); + } + }); + + menuItemCopy = new MenuItem("Copy"); + menuItemCopy.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) + { + events.notify("onMenuItemCopy", menuItemCopy); + } + }); + + menuItemPast = new MenuItem("Past"); + menuItemPast.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) + { + events.notify("onMenuItemPast", menuItemPast); + } + }); + + + menuItemOnline = new MenuItem("Online"); + menuItemOnline.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) + { + events.notify("onMenuItemOnline", menuItemOnline); + } + }); + + menuItemAbout = new MenuItem("About"); + menuItemAbout.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) + { + events.notify("onMenuItemAbout", menuItemAbout); + } + }); + + menuFile.add(menuItemNew); + menuFile.add(menuItemLoad); + menuFile.add(menuItemSave); + menuFile.add(menuItemSaveAs); + menuFile.addSeparator(); + menuFile.add(menuItemProperties); + menuFile.addSeparator(); + menuFile.add(menuItemQuit); + + menuEdit.add(menuItemCreate); + menuEdit.add(menuItemDelete); + menuEdit.add(menuItemCopy); + menuEdit.add(menuItemPast); + + menuHelp.add(menuItemOnline); + menuHelp.add(menuItemAbout); + + this.add(menuFile); + this.add(menuEdit); + this.add(menuHelp); + } +} Added: software_suite_v2/software/tools/attitunesStudio/trunk/src/GUI/AttituneStatusBar.java =================================================================== --- software_suite_v2/software/tools/attitunesStudio/trunk/src/GUI/AttituneStatusBar.java (rev 0) +++ software_suite_v2/software/tools/attitunesStudio/trunk/src/GUI/AttituneStatusBar.java 2008-08-09 10:59:05 UTC (rev 1452) @@ -0,0 +1,76 @@ +package GUI; + +import java.awt.*; +import javax.swing.*; + +/** + * + * @author User + * + */ +public class AttituneStatusBar extends JPanel +{ + private static final long serialVersionUID = 1L; + private JLabel label1; + private JLabel label2; + private JLabel label3; + + /** + * + * @param lab1 + * @param lab2 + * @param lab3 + */ + public AttituneStatusBar(String lab1, String lab2, String lab3) + { + GridLayout pl = new GridLayout(0, 3); + pl.setHgap(3); + setLayout(pl); + + label1 = new JLabel(lab1, JLabel.CENTER); + label1.setBorder(BorderFactory.createEtchedBorder()); + label2 = new JLabel(lab2, JLabel.CENTER); + label2.setBorder(BorderFactory.createEtchedBorder()); + label3 = new JLabel(lab3, JLabel.CENTER); + label3.setBorder(BorderFactory.createEtchedBorder()); + this.add(label1); + this.add(label2); + this.add(label3); + } + + /** + * + * @return + */ + public Insets getInsets() + { + return new Insets(2, 2, 2, 2); + } + + /** + * + * @param value + */ + public void setLabel1(String value) + { + label1.setText(value); + } + + /** + * + * @param value + */ + public void setLabel2(String value) + { + label2.setText(value); + } + + /** + * + * @param value + */ + public void setLabel3(String value) + { + label3.setText(value); + } +} Added: software_suite_v2/software/tools/attitunesStudio/trunk/src/com/tuxisalive/attitunes/ATTResources.java =================================================================== --- software_suite_v2/software/tools/attitunesStudio/trunk/src/com/tuxisalive/attitunes/ATTResources.java (rev 0) +++ software_suite_v2/software/tools/attitunesStudio/trunk/src/com/tuxisalive/attitunes/ATTResources.java 2008-08-09 10:59:05 UTC (rev 1452) @@ -0,0 +1,15 @@ +package com.tuxisalive.attitunes; + +public class ATTResources +{ + public static String getRealPath(String path) + { + String tmpPath; + + tmpPath = new ATTResources().getClass().getResource("/" + path). + getPath().replace("file:", ""); + tmpPath = tmpPath.substring(1, tmpPath.length()); + + return tmpPath; + } +} Added: software_suite_v2/software/tools/attitunesStudio/trunk/src/com/tuxisalive/attitunes/format/ATTFormatCompressor.java =================================================================== --- software_suite_v2/software/tools/attitunesStudio/trunk/src/com/tuxisalive/attitunes/format/ATTFormatCompressor.java (rev 0) +++ software_suite_v2/software/tools/attitunesStudio/trunk/src/com/tuxisalive/attitunes/format/ATTFormatCompressor.java 2008-08-09 10:59:05 UTC (rev 1452) @@ -0,0 +1,147 @@ +package com.tuxisalive.attitunes.format; + +import java.io.*; +import java.util.zip.*; + +public class ATTFormatCompressor +{ + private static ZipOutputStream zos; + + /** + * + * @param sourcePath + * @return + */ + public static boolean compressAttitune(String attFilePath, String sourcePath) + { + File file = new File(sourcePath); + + try + { + zos = new ZipOutputStream(new FileOutputStream(new File(attFilePath))); + recurseFiles(file, sourcePath); + zos.close(); + } + catch (Exception e) + { + e.printStackTrace(); + return false; + } + return true; + } + + /** + * + * @param attFilePath + * @param tmpAttDir + * @return + */ + public static boolean uncompressAttitune(String attFilePath, String destinationPath) + { + FileOutputStream fos = null; + BufferedOutputStream dest = null; + FileInputStream fis; + ZipInputStream zis; + ZipEntry entry; + int count; + byte data[] = new byte[8192]; + + try + { + fis = new FileInputStream(attFilePath); + zis = new ZipInputStream(new BufferedInputStream(fis)); + + while ((entry = zis.getNextEntry()) != null) + { + if (!entry.isDirectory()) + { + if (!prepareFileDirectories(destinationPath, entry.getName())) + { + return false; + } + String destFileName = ATTFormatMisc.regularizePath(destinationPath + File.separator + entry.getName()); + try + { + fos = new FileOutputStream(destFileName); + } + catch (Exception e) + { + return false; + } + dest = new BufferedOutputStream(fos, 8192); + while((count = zis.read(data, 0, 8192)) != -1) + { + dest.write(data, 0, count); + } + dest.flush(); + dest.close(); + } + } + zis.close(); + } + catch (Exception e) + { + e.printStackTrace(); + return false; + } + + return true; + } + + /* + * + */ + private static void recurseFiles(File file, String basePath) + throws IOException, FileNotFoundException + { + String filePath; + + if (file.isDirectory()) + { + String[] fileNames = file.list(); + if (fileNames != null) + { + for (int i=0; i<fileNames.length; i++) + { + recurseFiles(new File(file, fileNames[i]), basePath); + } + } + } + else + { + byte[] buf = new byte[1024]; + int len; + + filePath = file.toString().substring(0, basePath.length()); + ZipEntry zipEntry = new ZipEntry(file.toString().replace(filePath, "")); + FileInputStream fin = new FileInputStream(file); + BufferedInputStream in = new BufferedInputStream(fin); + zos.putNextEntry(zipEntry); + + while ((len = in.read(buf)) >= 0) + { + zos.write(buf, 0, len); + } + + in.close(); + zos.closeEntry(); + } + } + + /* + * + */ + private static boolean prepareFileDirectories(String destination, String entryName) + { + String outputFileName = ATTFormatMisc.regularizePath(destination + entryName); + try + { + new File(outputFileName.substring(0, outputFileName.lastIndexOf(File.separator))).mkdirs(); + } + catch (Exception e) + { + return false; + } + return true; + } +} Added: software_suite_v2/software/tools/attitunesStudio/trunk/src/com/tuxisalive/attitunes/format/ATTFormatMisc.java =================================================================== --- software_suite_v2/software/tools/attitunesStudio/trunk/src/com/tuxisalive/attitunes/format/ATTFormatMisc.java (rev 0) +++ software_suite_v2/software/tools/attitunesStudio/trunk/src/com/tuxisalive/attitunes/format/ATTFormatMisc.java 2008-08-09 10:59:05 UTC (rev 1452) @@ -0,0 +1,149 @@ +package com.tuxisalive.attitunes.format; + +import java.io.File; +import java.io.FileInputStream; +import java.io.FileOutputStream; +import java.io.IOException; +import java.io.InputStream; +import java.io.OutputStream; + +public class ATTFormatMisc +{ + private static String goodSepSlash = ""; + private static String badSepSlash = ""; + static { + if (File.separator == "/") + { + goodSepSlash = "/"; + badSepSlash = "\\"; + } + else + { + goodSepSlash = "\\"; + badSepSlash = "/"; + } + } + + + /** + * + */ + public static File createTmpAttDir() throws IOException + { + File tempFile = File.createTempFile("attitunesF", "", null); + + if (!tempFile.delete()) + { + throw new IOException(); + } + + if (!tempFile.mkdir()) + { + throw new IOException(); + } + + tempFile.deleteOnExit(); + return tempFile; + } + + /** + * + * @param srcPath + * @param destPath + * @return + */ + public static boolean copyDir(String srcPath, String destPath) + { + File src = new File(srcPath); + File dest = new File(destPath); + + if (src.isDirectory()) + { + dest.mkdirs(); + String list[] = src.list(); + + for (int i = 0; i < list.length; i++) + { + String dest1 = dest.getAbsolutePath() + File.separator + list[i]; + String src1 = src.getAbsolutePath() + File.separator + list[i]; + if (!copyDir(src1 , dest1)) + { + return false; + } + } + } + else + { + if (!copyfile(srcPath, destPath)) + { + return false; + } + } + return true; + } + + /** + * + */ + public static boolean copyfile(String srcFile, String destFile) + { + try + { + File f1 = new File(srcFile); + File f2 = new File(destFile); + InputStream in = new FileInputStream(f1); + OutputStream out = new FileOutputStream(f2); + byte[] buf = new byte[1024]; + int len; + + while ((len = in.read(buf)) > 0) + { + out.write(buf, 0, len); + } + + in.close(); + out.close(); + } + catch (Exception e) + { + return false; + } + + return true; + } + + /** + * + * @param waveName + */ + public static boolean deleteFile(String filePath) + { + File f = new File(filePath); + + if (f.exists()) + { + if (f.delete()) + { + return true; + } + } + return false; + } + + /** + * + * @param path + * @return + */ + public static String regularizePath(String path) + { + String result = path; + + result = result.replace("\\\\", "&&&&"); + result = result.replace("//", "&&&&"); + result = result.replace(badSepSlash, "&&&&"); + result = result.replace("&&&&", goodSepSlash); + + return result; + } +} |
Author: remi Date: 2008-08-09 12:57:55 +0200 (Sat, 09 Aug 2008) New Revision: 1451 Modified: software_suite_v2/software/tools/attitunesStudio/trunk/.classpath software_suite_v2/software/tools/attitunesStudio/trunk/images/Thumbs.db software_suite_v2/software/tools/attitunesStudio/trunk/src/MainFrame.java software_suite_v2/software/tools/attitunesStudio/trunk/src/com/tuxisalive/attitunes/ATTConfig.java software_suite_v2/software/tools/attitunesStudio/trunk/src/com/tuxisalive/attitunes/block/ATTBlock.java software_suite_v2/software/tools/attitunesStudio/trunk/src/com/tuxisalive/attitunes/format/ATTBlockParams.java software_suite_v2/software/tools/attitunesStudio/trunk/src/com/tuxisalive/attitunes/format/ATTFormatReadWrite.java software_suite_v2/software/tools/attitunesStudio/trunk/src/com/tuxisalive/attitunes/format/ATTXmlParser.java software_suite_v2/software/tools/attitunesStudio/trunk/src/com/tuxisalive/attitunes/visual/ATTBlockViewer.java software_suite_v2/software/tools/attitunesStudio/trunk/src/com/tuxisalive/attitunes/visual/ATTSButton.java Log: * update Modified: software_suite_v2/software/tools/attitunesStudio/trunk/.classpath =================================================================== --- software_suite_v2/software/tools/attitunesStudio/trunk/.classpath 2008-08-07 10:05:24 UTC (rev 1450) +++ software_suite_v2/software/tools/attitunesStudio/trunk/.classpath 2008-08-09 10:57:55 UTC (rev 1451) @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8"?> <classpath> <classpathentry kind="src" path="src"/> - <classpathentry kind="src" path="images"/> + <classpathentry including="*.PNG|*.att|*.png" kind="src" path="images"/> <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> <classpathentry kind="output" path="bin"/> </classpath> Modified: software_suite_v2/software/tools/attitunesStudio/trunk/images/Thumbs.db =================================================================== (Binary files differ) Modified: software_suite_v2/software/tools/attitunesStudio/trunk/src/MainFrame.java =================================================================== --- software_suite_v2/software/tools/attitunesStudio/trunk/src/MainFrame.java 2008-08-07 10:05:24 UTC (rev 1450) +++ software_suite_v2/software/tools/attitunesStudio/trunk/src/MainFrame.java 2008-08-09 10:57:55 UTC (rev 1451) @@ -1,4 +1,6 @@ +import GUI.*; + import com.cloudgarden.layout.AnchorConstraint; import com.cloudgarden.layout.AnchorLayout; import java.awt.event.MouseAdapter; @@ -6,23 +8,33 @@ import java.awt.event.WindowAdapter; import java.awt.event.WindowEvent; import java.awt.Color; -import javax.swing.BoxLayout; -import javax.swing.WindowConstants; +import java.awt.*; +import java.util.Hashtable; + +import javax.swing.ImageIcon; import com.tuxisalive.attitunes.*; +import com.tuxisalive.attitunes.format.*; import com.tuxisalive.attitunes.block.ATTBlock; import com.tuxisalive.attitunes.block.ATTBlockContainer; import com.tuxisalive.attitunes.visual.ATTBlockViewer; import com.tuxisalive.attitunes.visual.ATTSButton; +//import javax.swing.JOptionPane; + /** * * @author R Jocaille * */ -public class MainFrame extends javax.swing.JFrame +public class MainFrame extends Frame { private static final long serialVersionUID = 724080299924475945L; + private GridBagLayout frameLayout; + + private AttituneMenuBar menuBar; + private AttituneStatusBar statusBar; + private ATTBlockViewer attBlockViewer; private ATTSButton zoomPlusButton; @@ -52,12 +64,35 @@ { try { + /* Create the menu bar */ + menuBar = new AttituneMenuBar(); + this.setMenuBar(menuBar); + menuBar.events.register("onMenuItemNew", this, "onMenuItemNew"); + menuBar.events.register("onMenuItemLoad", this, "onMenuItemLoad"); + menuBar.events.register("onMenuItemSave", this, "onMenuItemSave"); + menuBar.events.register("onMenuItemSaveAs", this, "onMenuItemSaveAs"); + menuBar.events.register("onMenuItemProperties", this, "onMenuItemProperties"); + menuBar.events.register("onMenuItemQuit", this, "onMenuItemQuit"); + menuBar.events.register("onMenuItemCreate", this, "onMenuItemCreate"); + menuBar.events.register("onMenuItemDelete", this, "onMenuItemDelete"); + menuBar.events.register("onMenuItemCopy", this, "onMenuItemCopy"); + menuBar.events.register("onMenuItemPast", this, "onMenuItemPast"); + menuBar.events.register("onMenuItemOnline", this, "onMenuItemOnline"); + menuBar.events.register("onMenuItemAbout", this, "onMenuItemAbout"); + /* Add a layout to the frame */ - BoxLayout thisLayout = new BoxLayout(getContentPane(), javax.swing.BoxLayout.Y_AXIS); - getContentPane().setLayout(thisLayout); + frameLayout = new GridBagLayout(); + setLayout(frameLayout); + + /* Create the layout constraint */ + GridBagConstraints c = new GridBagConstraints(); + c.fill = GridBagConstraints.BOTH; + c.weightx = 1.0; + c.weighty = 1.0; + c.gridwidth = GridBagConstraints.REMAINDER;; + c.gridheight = 1; /* Close window */ - setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE); this.addWindowListener(new WindowAdapter() { public void windowClosing(WindowEvent evt) { thisWindowClosing(evt); @@ -66,9 +101,22 @@ /* Main viewer */ attBlockViewer = new ATTBlockViewer(640, 300); + attBlockViewer.setPreferredSize(new java.awt.Dimension(640, 300)); AnchorLayout mainViewerLayout = new AnchorLayout(); attBlockViewer.setLayout(mainViewerLayout); - getContentPane().add(attBlockViewer); + frameLayout.setConstraints(attBlockViewer, c); + this.add(attBlockViewer); + + Button test = new Button("Hello"); + test.setPreferredSize(new java.awt.Dimension(640, 200)); + frameLayout.setConstraints(test, c); + this.add(test); + + /* Status bar */ + statusBar = new AttituneStatusBar("Hello", "world", "coucou"); + frameLayout.setConstraints(statusBar, c); + this.add(statusBar); + attBlockViewer.loadImages("/"); attBlockViewer.events.register(ATTConfig.EVENT_POSITION_CHANGED, this, "onPositionChanged"); attBlockViewer.events.register(ATTConfig.EVENT_LENGTH_CHANGED, this, "onLengthChanged"); @@ -81,13 +129,15 @@ attBlockViewer.events.register(ATTConfig.EVENT_BLOCK_DRAG_STARTED, this, "onBlockDragStarted"); attBlockViewer.events.register(ATTConfig.EVENT_BLOCK_DRAGGING, this, "onBlockDragging"); attBlockViewer.events.register(ATTConfig.EVENT_BLOCK_DRAG_STOPPED, this, "onBlockDragStopped"); + attBlockViewer.events.register(ATTConfig.EVENT_ATTITUNE_LOADED, this, "onAttituneLoaded"); + attBlockViewer.events.register(ATTConfig.EVENT_ATTITUNE_SAVED, this, "onAttituneSaved"); /* Load a file */ - attBlockViewer.loadAttitune(getClass().getResource("aero.att").getPath()); + attBlockViewer.loadAttitune(ATTResources.getRealPath("aero.att")); /* Zoom plus button */ zoomPlusButton = new ATTSButton("/zoomPlusButton.png"); - zoomPlusButton.setPressedIcon("/zoomPressedButton.png"); + zoomPlusButton.setPressedIcon(new ImageIcon(getClass().getResource("/zoomPressedButton.png"))); zoomPlusButton.addMouseListener(new MouseAdapter() { public void mousePressed(MouseEvent evt) { @@ -98,7 +148,7 @@ /* Zoom minus button */ zoomMinusButton = new ATTSButton("/zoomMinusButton.png"); - zoomMinusButton.setPressedIcon("/zoomPressedButton.png"); + zoomMinusButton.setPressedIcon(new ImageIcon(getClass().getResource("/zoomPressedButton.png"))); zoomMinusButton.addMouseListener(new MouseAdapter() { public void mousePressed(MouseEvent evt) { @@ -109,7 +159,7 @@ /* Zoom full button */ zoomFullButton = new ATTSButton("/zoomFullButton.png"); - zoomFullButton.setPressedIcon("/zoomPressedButton.png"); + zoomFullButton.setPressedIcon(new ImageIcon(getClass().getResource("/zoomPressedButton.png"))); zoomFullButton.addMouseListener(new MouseAdapter() { public void mousePressed(MouseEvent evt) { @@ -120,7 +170,7 @@ /* Create button */ createButton = new ATTSButton("Create", Color.WHITE, "/actionButton1Enable.png"); - createButton.setPressedIcon("/actionButton1Pressed.png"); + createButton.setPressedIcon(new ImageIcon(getClass().getResource("/actionButton1Pressed.png"))); createButton.addMouseListener(new MouseAdapter() { public void mousePressed(MouseEvent evt) { @@ -131,7 +181,7 @@ /* Delete button */ deleteButton = new ATTSButton("Delete", Color.WHITE, "/actionButton1Enable.png"); - deleteButton.setPressedIcon("/actionButton1Pressed.png"); + deleteButton.setPressedIcon(new ImageIcon(getClass().getResource("/actionButton1Pressed.png"))); deleteButton.addMouseListener(new MouseAdapter() { public void mousePressed(MouseEvent evt) { @@ -142,7 +192,7 @@ /* Copy button */ copyButton = new ATTSButton("Copy", Color.WHITE, "/actionButton1Enable.png"); - copyButton.setPressedIcon("/actionButton1Pressed.png"); + copyButton.setPressedIcon(new ImageIcon(getClass().getResource("/actionButton1Pressed.png"))); copyButton.addMouseListener(new MouseAdapter() { public void mousePressed(MouseEvent evt) { @@ -153,7 +203,7 @@ /* Past button */ pastButton = new ATTSButton("Past", Color.WHITE, "/actionButton1Enable.png"); - pastButton.setPressedIcon("/actionButton1Pressed.png"); + pastButton.setPressedIcon(new ImageIcon(getClass().getResource("/actionButton1Pressed.png"))); pastButton.addMouseListener(new MouseAdapter() { public void mousePressed(MouseEvent evt) { @@ -164,7 +214,7 @@ /* Play button */ playButton = new ATTSButton("Play", Color.BLACK, "/actionButton2Enable.png"); - playButton.setPressedIcon("/actionButton2Pressed.png"); + playButton.setPressedIcon(new ImageIcon(getClass().getResource("/actionButton2Pressed.png"))); playButton.addMouseListener(new MouseAdapter() { public void mousePressed(MouseEvent evt) { @@ -175,7 +225,7 @@ /* Stop button */ stopButton = new ATTSButton("Stop", Color.BLACK, "/actionButton2Enable.png"); - stopButton.setPressedIcon("/actionButton2Pressed.png"); + stopButton.setPressedIcon(new ImageIcon(getClass().getResource("/actionButton2Pressed.png"))); stopButton.addMouseListener(new MouseAdapter() { public void mousePressed(MouseEvent evt) { @@ -183,7 +233,8 @@ } }); attBlockViewer.add(stopButton, new AnchorConstraint(10, 273)); - + attBlockViewer.repaint(); + /* Pack the components and set the frame size */ pack(); setSize(648, 400); @@ -204,9 +255,122 @@ private void thisWindowClosing(WindowEvent evt) { attBlockViewer.destroy(); + System.exit(0); } /* ------------------------------------------------------------------------ + * Menu events + * --------------------------------------------------------------------- */ + + /* + * Event on menu New + */ + public void onMenuItemNew(MenuItem menuItem) + { + System.out.println("New"); + } + + /* + * Event on menu Load + */ + public void onMenuItemLoad(MenuItem menuItem) + { + /* Check if the current scene need to be saved */ + if (attBlockViewer.getSceneHaveChanged()) + { + /* Save the changes first */ + /* if not changed exit the function */ + } + /* Load a file viewer to select an attitune */ + } + + /* + * Event on menu Save + */ + public void onMenuItemSave(MenuItem menuItem) + { + /* Check if the current scene if the template */ + if (attBlockViewer.getAttituneIsTemplate()) + { + onMenuItemSaveAs(menuItem); + } + /* Save the attitune */ + //attBlockViewer + } + + /* + * Event on menu Save as + */ + public void onMenuItemSaveAs(MenuItem menuItem) + { + System.out.println("Save as"); + } + + /* + * Event on menu Properties + */ + public void onMenuItemProperties(MenuItem menuItem) + { + System.out.println("Properties"); + } + + /* + * Event on menu Quit + */ + public void onMenuItemQuit(MenuItem menuItem) + { + System.out.println("Quit"); + } + + /* + * Event on menu Create + */ + public void onMenuItemCreate(MenuItem menuItem) + { + System.out.println("Create"); + } + + /* + * Event on menu Delete + */ + public void onMenuItemDelete(MenuItem menuItem) + { + System.out.println("Delete"); + } + + /* + * Event on menu Copy + */ + public void onMenuItemCopy(MenuItem menuItem) + { + System.out.println("Copy"); + } + + /* + * Event on menu Past + */ + public void onMenuItemPast(MenuItem menuItem) + { + System.out.println("Past"); + } + + /* + * Event on menu Online + */ + public void onMenuItemOnline(MenuItem menuItem) + { + System.out.println("Online"); + } + + /* + * Event on menu About + */ + public void onMenuItemAbout(MenuItem menuItem) + { + System.out.println("About"); + } + + /* ------------------------------------------------------------------------ * Blocks viewer events * --------------------------------------------------------------------- */ @@ -215,6 +379,7 @@ */ public void onPositionChanged(Double newPosition) { + statusBar.setLabel1("Position : " + ATTMisc.timeToString(newPosition)); } /* @@ -222,6 +387,7 @@ */ public void onLengthChanged(Double newLength) { + statusBar.setLabel2("Duration : " + ATTMisc.timeToString(newLength)); } /* @@ -264,6 +430,7 @@ */ public void onBlockSelected(ATTBlock block) { + statusBar.setLabel3("Block start : " + ATTMisc.timeToString(block.getPosition())); } /* @@ -278,6 +445,7 @@ */ public void onBlockDragging(ATTBlock block, Double timeIdx) { + statusBar.setLabel3("Block start : " + ATTMisc.timeToString(timeIdx)); } /* @@ -287,6 +455,22 @@ { } + /* + * Event when an attitune is loaded + */ + public void onAttituneLoaded(ATTBlockViewer bv) + { + statusBar.setLabel1("Position : " + ATTMisc.timeToString(attBlockViewer.getCurrentPosition())); + statusBar.setLabel2("Duration : " + ATTMisc.timeToString(attBlockViewer.getLength())); + } + + /* + * Event when an attitune is saved + */ + public void onAttituneSaved(ATTBlockViewer bv) + { + } + /* ------------------------------------------------------------------------ * Blocks buttons events * --------------------------------------------------------------------- */ @@ -320,6 +504,13 @@ */ public void onCreateButtonPressed(MouseEvent evt) { + Hashtable<String,Object> params = ATTBlockParams.getDefaultBlock(attBlockViewer.getFocusedRow()); + + attBlockViewer.createBlock( + attBlockViewer.getFocusedRow(), + params, + attBlockViewer.getCurrentPosition(), + (Double)params.get("duration")); } /* @@ -327,6 +518,7 @@ */ public void onDeleteButtonPressed(MouseEvent evt) { + attBlockViewer.deleteBlock(attBlockViewer.getFocusedBlock()); } /* @@ -334,6 +526,7 @@ */ public void onCopyButtonPressed(MouseEvent evt) { + attBlockViewer.copyBlock(); } /* @@ -341,6 +534,7 @@ */ public void onPastButtonPressed(MouseEvent evt) { + attBlockViewer.pastBlock(attBlockViewer.getCurrentPosition()); } /* @@ -349,6 +543,7 @@ public void onPlayButtonPressed(MouseEvent evt) { attBlockViewer.playScene(attBlockViewer.getCurrentPosition()); + attBlockViewer.saveAttitune("c:\\aero3.att"); } /* Modified: software_suite_v2/software/tools/attitunesStudio/trunk/src/com/tuxisalive/attitunes/ATTConfig.java =================================================================== --- software_suite_v2/software/tools/attitunesStudio/trunk/src/com/tuxisalive/attitunes/ATTConfig.java 2008-08-07 10:05:24 UTC (rev 1450) +++ software_suite_v2/software/tools/attitunesStudio/trunk/src/com/tuxisalive/attitunes/ATTConfig.java 2008-08-09 10:57:55 UTC (rev 1451) @@ -79,6 +79,8 @@ public static String EVENT_SCROLLBAR_DRAG_STARTED = "scrollbar_drag_started"; public static String EVENT_SCROLLBAR_DRAG_STOPPED = "scrollbar_drag_stopped"; public static String EVENT_SCROLLBAR_DRAGGING = "scrollbar_dragging"; + public static String EVENT_ATTITUNE_LOADED = "attitune_loaded"; + public static String EVENT_ATTITUNE_SAVED = "attitune_saved"; public static String[] EVENT_LIST = { EVENT_POSITION_CHANGED, @@ -92,5 +94,7 @@ EVENT_SCROLLBAR_DRAG_STARTED, EVENT_SCROLLBAR_DRAG_STOPPED, EVENT_SCROLLBAR_DRAGGING, + EVENT_ATTITUNE_LOADED, + EVENT_ATTITUNE_SAVED, }; } \ No newline at end of file Modified: software_suite_v2/software/tools/attitunesStudio/trunk/src/com/tuxisalive/attitunes/block/ATTBlock.java =================================================================== --- software_suite_v2/software/tools/attitunesStudio/trunk/src/com/tuxisalive/attitunes/block/ATTBlock.java 2008-08-07 10:05:24 UTC (rev 1450) +++ software_suite_v2/software/tools/attitunesStudio/trunk/src/com/tuxisalive/attitunes/block/ATTBlock.java 2008-08-09 10:57:55 UTC (rev 1451) @@ -142,6 +142,7 @@ if ((value >= 0.0) && (value <= 600. - length)) { timeBegin = value; + function.put("start_time", (Double)value); } } Modified: software_suite_v2/software/tools/attitunesStudio/trunk/src/com/tuxisalive/attitunes/format/ATTBlockParams.java =================================================================== --- software_suite_v2/software/tools/attitunesStudio/trunk/src/com/tuxisalive/attitunes/format/ATTBlockParams.java 2008-08-07 10:05:24 UTC (rev 1450) +++ software_suite_v2/software/tools/attitunesStudio/trunk/src/com/tuxisalive/attitunes/format/ATTBlockParams.java 2008-08-09 10:57:55 UTC (rev 1451) @@ -21,16 +21,16 @@ public static Hashtable<String,Object> LEDS_BLINK_CANVAS = new Hashtable<String,Object>(); static { LEDS_BLINK_CANVAS.put("cmd", "leds_blink"); - LEDS_BLINK_CANVAS.put("count", 1.0); + LEDS_BLINK_CANVAS.put("count", 1); LEDS_BLINK_CANVAS.put("speed", 1); LEDS_BLINK_CANVAS.put("duration", 0.0); } private static String[] ledsBlinkTmc(Hashtable<String,Object> struct) { String[] result = new String[1]; - double duration = (Double)struct.get("speed") * 0.008; + double duration = (Double)((Integer)struct.get("speed") * 0.008); String cmd = String.format("TUX_CMD:LED:BLINK:LED_BOTH,%d,%g", - struct.get("count"), duration); + (Integer)struct.get("count"), duration); result[0] = cmd; return result; } Modified: software_suite_v2/software/tools/attitunesStudio/trunk/src/com/tuxisalive/attitunes/format/ATTFormatReadWrite.java =================================================================== --- software_suite_v2/software/tools/attitunesStudio/trunk/src/com/tuxisalive/attitunes/format/ATTFormatReadWrite.java 2008-08-07 10:05:24 UTC (rev 1450) +++ software_suite_v2/software/tools/attitunesStudio/trunk/src/com/tuxisalive/attitunes/format/ATTFormatReadWrite.java 2008-08-09 10:57:55 UTC (rev 1451) @@ -1,12 +1,6 @@ package com.tuxisalive.attitunes.format; -import java.io.File; -import java.io.IOException; -import java.io.FileInputStream; -import java.io.FileOutputStream; -import java.io.BufferedOutputStream; -import java.io.BufferedInputStream; -import java.util.zip.*; +import java.io.*; import java.util.Hashtable; /** @@ -24,7 +18,7 @@ static { try { - createTmpAttDir(); + tmpAttDir = ATTFormatMisc.createTmpAttDir(); tmpDirFound = true; } catch (Exception e) @@ -37,6 +31,7 @@ * Attitune file fields */ @SuppressWarnings("unused") + private String attFileName = ""; private String attFilePath = ""; private String attWorkPath = ""; private String xmlPath = ""; @@ -44,58 +39,56 @@ private Hashtable<String,Object> xmlStruct; private Hashtable<String,Object> blocksStruct; private Hashtable<String,Object> headerStruct; + private Hashtable<String,Object> wavStruct; + private boolean attituneLoaded = false; - /* - * - */ - public static void createTmpAttDir() throws IOException - { - File tempFile = File.createTempFile("attitunesF", "", null); - - if (!tempFile.delete()) - { - throw new IOException(); - } - - if (!tempFile.mkdir()) - { - throw new IOException(); - } - - tempFile.deleteOnExit(); - tmpAttDir = tempFile; - } - /** * */ @SuppressWarnings("unchecked") public boolean openAttituneFile(String attFilePath) { + attFilePath = ATTFormatMisc.regularizePath(attFilePath); + File attFile = new File(attFilePath); /* Check if the temp dir exists */ if (!tmpDirFound) { + attituneLoaded = false; return false; } /* Check if the attitune file exists */ if (!attFile.exists()) { + attituneLoaded = false; return false; } + /* Get the attitune file name */ + attFileName = attFilePath.substring(attFilePath.lastIndexOf(File.separator) + File.separator.length(), attFilePath.lastIndexOf(".")); + + /* Get the destination path */ + attWorkPath = tmpAttDir.getPath() + File.separator + attFileName + File.separator; + /* Uncompress the attitune file */ - if (!uncompressAttFile(attFilePath)) + if (!ATTFormatCompressor.uncompressAttitune(attFilePath, attWorkPath)) { + attituneLoaded = false; return false; } + /* Get some paths */ + this.attFilePath = attFilePath; + xmlPath = attWorkPath + attFileName + File.separator + "scene.xml"; + wavsPath = attWorkPath + attFileName + File.separator + "wavs" + File.separator; + /* Parse the xml structure */ xmlStruct = ATTXmlParser.xmlToStruct(xmlPath); if (xmlStruct.isEmpty()) { + attituneLoaded = false; return false; } @@ -106,95 +99,463 @@ /* Get the header structure */ headerStruct = (Hashtable)xmlStruct.get("header"); + if (!headerStruct.containsKey("language")) + { + headerStruct.put("language", "en"); + } + /* Get the wav structure */ + wavStruct = (Hashtable)xmlStruct.get("wavs"); + + attituneLoaded = true; return true; } - /* + /** * + * @param newAttFilePath + * @return */ - private static void prepareFileDirectories(String destination, String entryName) + public boolean saveAttituneFile(String newAttFilePath) { - String outputFileName = destination + entryName; - new File(outputFileName.substring(0, outputFileName.lastIndexOf("/"))).mkdirs(); + /* Check if an attitune has been loaded before */ + if (!attituneLoaded) + { + return false; + } + + newAttFilePath = ATTFormatMisc.regularizePath(newAttFilePath); + + /* Reconstruction of the xml file */ + Hashtable<String,Object> newXmlStruct = new Hashtable<String,Object>(); + Hashtable<String,Object> nodeScript = new Hashtable<String,Object>(); + Hashtable<String,Object> nodeBody = new Hashtable<String,Object>(); + + nodeScript.put("timeline", blocksStruct); + nodeBody.put("script", nodeScript); + newXmlStruct.put("body", nodeBody); + newXmlStruct.put("wavs", wavStruct); + newXmlStruct.put("header", headerStruct); + + ATTXmlParser.structToXml(newXmlStruct, xmlPath); + + /* Get the new uncompressed attitune directory path and name */ + String newFileName = newAttFilePath.substring(newAttFilePath.lastIndexOf(File.separator) + File.separator.length(), + newAttFilePath.lastIndexOf(".")); + String newWorkPath = tmpAttDir.getPath() + File.separator + newFileName + File.separator; + + /* Copy the new directory if != of the current one */ + if (newFileName != attFileName) + { + String destDir = newWorkPath + newFileName + File.separator; + String srcDir = attWorkPath + attFileName + File.separator; + + if (!ATTFormatMisc.copyDir(srcDir, destDir)) + { + return false; + } + } + + /* Compress the attitune directory to the destination *.att file */ + if (!ATTFormatCompressor.compressAttitune(newAttFilePath, newWorkPath)) + { + return false; + } + + return true; } - /* + /** * + * @return */ - private boolean uncompressAttFile(String attFilePath) + public String getAttFilePath() { - BufferedOutputStream dest = null; - FileInputStream fis; - ZipInputStream zis; - ZipEntry entry; - int count; - byte data[] = new byte[8192]; - String fwext = attFilePath.substring(attFilePath.lastIndexOf("/") + 1, attFilePath.lastIndexOf(".")); - String destination = tmpAttDir.getPath() + File.separator + fwext + File.separator; + return attFilePath; + } + + + /** + * + * @return + */ + public Hashtable<String,Object> getBocksStruct() + { + return blocksStruct; + } + + /** + * + * @param struct + */ + public void setBlockStruct(Hashtable<String,Object> struct) + { + /* Check if an attitune has been loaded before */ + if (!attituneLoaded) + { + return; + } - try + blocksStruct = struct; + } + + /** + * + * @param waveName + * @return + */ + public String getWaveFile(String waveName) + { + return wavsPath + waveName; + } + + /** + * + * @param wavePath + */ + public boolean insertWaveFile(String wavePath) + { + /* Check if an attitune has been loaded before */ + if (!attituneLoaded) { - fis = new FileInputStream(attFilePath); - zis = new ZipInputStream(new BufferedInputStream(fis)); - - while ((entry = zis.getNextEntry()) != null) - { - if (!entry.isDirectory()) - { - prepareFileDirectories(destination, entry.getName()); - String destFileName = destination + File.separator + entry.getName(); - FileOutputStream fos = new FileOutputStream(destFileName); - dest = new BufferedOutputStream(fos, 8192); - while((count = zis.read(data, 0, 8192)) != -1) - { - dest.write(data, 0, count); - } - dest.flush(); - dest.close(); - } - } - zis.close(); + return false; } - catch (Exception e) + + String waveName = wavePath.substring(wavePath.lastIndexOf(File.separator) + File.separator.length(), + wavePath.length()); + String destWavePath = wavsPath + waveName; + + if (ATTFormatMisc.copyfile(wavePath, destWavePath)) { - e.printStackTrace(); + Integer wavCount = (Integer)wavStruct.get("count"); + wavStruct.put(String.format("wav%d", wavCount), waveName); + wavCount++; + wavStruct.put("count", wavCount); + } + else + { return false; } - this.attFilePath = attFilePath; - attWorkPath = destination; - xmlPath = attWorkPath + fwext + File.separator + "scene.xml"; - wavsPath = attWorkPath + fwext + File.separator + "wavs" + File.separator; - return true; } /** * + * @param waveName + */ + public boolean deleteWaveFile(String waveName) + { + /* Check if an attitune has been loaded before */ + if (!attituneLoaded) + { + return false; + } + + Hashtable<String,Object> newWavStruct = new Hashtable<String,Object>(); + Integer count = 0; + + if (ATTFormatMisc.deleteFile(wavsPath + waveName)) + { + for (int i = 0; i < (Integer)wavStruct.get("count"); i++) + { + String tmpWavName = (String)wavStruct.get(String.format("wav%d", i)); + if (!tmpWavName.equals(waveName)) + { + newWavStruct.put(String.format("wav%d", count), tmpWavName); + count++; + } + } + newWavStruct.put("count", count); + wavStruct = newWavStruct; + return true; + } + + return false; + } + + /** + * * @return */ - public Hashtable<String,Object> getBocksStruct() + public Hashtable<String,Object> getWavsStruct() { - return blocksStruct; + return wavStruct; } /** * + * @param struct + */ + public void setWavsStruct(Hashtable<String,Object> struct) + { + /* Check if an attitune has been loaded before */ + if (!attituneLoaded) + { + return; + } + + wavStruct = struct; + } + + /** + * + */ + public void setHeaderAuthor(String value) + { + /* Check if an attitune has been loaded before */ + if (!attituneLoaded) + { + return; + } + + headerStruct.put("author", value); + } + + /** + * * @return */ - public Hashtable<String,Object> getHeaderStruct() + public String getHeaderAuthor() { - return headerStruct; + /* Check if an attitune has been loaded before */ + if (!attituneLoaded) + { + return ""; + } + + return (String)headerStruct.get("author"); } /** * - * @param waveName + */ + public void setHeaderCategory(String value) + { + /* Check if an attitune has been loaded before */ + if (!attituneLoaded) + { + return; + } + + headerStruct.put("category", value); + } + + /** + * * @return */ - public String getWaveFile(String waveName) + public String getHeaderCategory() { - return wavsPath + waveName; + /* Check if an attitune has been loaded before */ + if (!attituneLoaded) + { + return ""; + } + + return (String)headerStruct.get("category"); } + + /** + * + */ + public void setHeaderDescription(String value) + { + /* Check if an attitune has been loaded before */ + if (!attituneLoaded) + { + return; + } + + headerStruct.put("description", value); + } + + /** + * + * @return + */ + public String getHeaderDescription() + { + /* Check if an attitune has been loaded before */ + if (!attituneLoaded) + { + return ""; + } + + return (String)headerStruct.get("description"); + } + + /** + * + */ + public void setHeaderName(String value) + { + /* Check if an attitune has been loaded before */ + if (!attituneLoaded) + { + return; + } + + headerStruct.put("name", value); + } + + /** + * + * @return + */ + public String getHeaderName() + { + /* Check if an attitune has been loaded before */ + if (!attituneLoaded) + { + return ""; + } + + return (String)headerStruct.get("name"); + } + + /** + * + */ + public void setHeaderSubCategory(String value) + { + /* Check if an attitune has been loaded before */ + if (!attituneLoaded) + { + return; + } + + headerStruct.put("sub_category", value); + } + + /** + * + * @return + */ + public String getHeaderSubCategory() + { + /* Check if an attitune has been loaded before */ + if (!attituneLoaded) + { + return ""; + } + + return (String)headerStruct.get("sub_category"); + } + + /** + * + */ + public void setHeaderVersion(String value) + { + /* Check if an attitune has been loaded before */ + if (!attituneLoaded) + { + return; + } + + headerStruct.put("version", value); + } + + /** + * + * @return + */ + public String getHeaderVersion() + { + /* Check if an attitune has been loaded before */ + if (!attituneLoaded) + { + return ""; + } + + return (String)headerStruct.get("version"); + } + + /** + * + */ + public void setHeaderLanguage(String value) + { + /* Check if an attitune has been loaded before */ + if (!attituneLoaded) + { + return; + } + + headerStruct.put("language", value); + } + + /** + * + * @return + */ + public String getHeaderLanguage() + { + /* Check if an attitune has been loaded before */ + if (!attituneLoaded) + { + return ""; + } + + return (String)headerStruct.get("language"); + } + + /** + * + */ + public void setHeaderLength(Double value) + { + /* Check if an attitune has been loaded before */ + if (!attituneLoaded) + { + return; + } + + headerStruct.put("length", value); + } + + /** + * + * @return + */ + public Double getHeaderLength() + { + /* Check if an attitune has been loaded before */ + if (!attituneLoaded) + { + return 0.; + } + + return (Double)headerStruct.get("length"); + } + + /** + * + */ + public void setHeaderKeywords(String value) + { + /* Check if an attitune has been loaded before */ + if (!attituneLoaded) + { + return; + } + + headerStruct.put("keywords", value); + } + + /** + * + * @return + */ + public String getHeaderKeywords() + { + /* Check if an attitune has been loaded before */ + if (!attituneLoaded) + { + return ""; + } + + return (String)headerStruct.get("keywords"); + } } Modified: software_suite_v2/software/tools/attitunesStudio/trunk/src/com/tuxisalive/attitunes/format/ATTXmlParser.java =================================================================== --- software_suite_v2/software/tools/attitunesStudio/trunk/src/com/tuxisalive/attitunes/format/ATTXmlParser.java 2008-08-07 10:05:24 UTC (rev 1450) +++ software_suite_v2/software/tools/attitunesStudio/trunk/src/com/tuxisalive/attitunes/format/ATTXmlParser.java 2008-08-09 10:57:55 UTC (rev 1451) @@ -192,6 +192,10 @@ { nodeStruct.put(childName, childValue); } + else if (childType.equals("list")) + { + nodeStruct.put(childName, childValue); + } else if (childType.equals("int")) { nodeStruct.put(childName, Integer.parseInt(childValue)); Modified: software_suite_v2/software/tools/attitunesStudio/trunk/src/com/tuxisalive/attitunes/visual/ATTBlockViewer.java =================================================================== --- software_suite_v2/software/tools/attitunesStudio/trunk/src/com/tuxisalive/attitunes/visual/ATTBlockViewer.java 2008-08-07 10:05:24 UTC (rev 1450) +++ software_suite_v2/software/tools/attitunesStudio/trunk/src/com/tuxisalive/attitunes/visual/ATTBlockViewer.java 2008-08-09 10:57:55 UTC (rev 1451) @@ -86,6 +86,10 @@ public TuxAPI tux = new TuxAPI("localhost", 270); + private boolean sceneHaveChanged = false; + + private boolean attituneIsTemplate = false; + /** * Constructor of the class. * @param width width of the viewer @@ -184,6 +188,8 @@ this.setVisible(true); /* Connect the tuxdroid api */ tux.server.autoConnect(TuxAPIConst.CLIENT_LEVEL_RESTRICTED, "AttitunesStudio", "attscene"); + /* Refresh the viewer */ + this.setZoomFactor(1); } /** @@ -237,6 +243,24 @@ /** * + * @return + */ + public Boolean getSceneHaveChanged() + { + return sceneHaveChanged; + } + + /** + * + * @return + */ + public boolean getAttituneIsTemplate() + { + return attituneIsTemplate; + } + + /** + * * @param path * @return */ @@ -438,6 +462,7 @@ if (scrollbarIsFocused) { scrollbarIsFocused = false; + sceneHaveChanged = true; events.emit(ATTConfig.EVENT_SCROLLBAR_DRAG_STOPPED); } if (draggingBlock) @@ -1076,16 +1101,73 @@ public ATTBlock createBlock(int rowIdx, Hashtable<String,Object> fctParams, double timeBegin, double timeLength) { ATTBlock resBlock = blockContainers[rowIdx].newBlock(); + resBlock.setFunctionParams(fctParams); resBlock.setPosition(timeBegin); - resBlock.setFunctionParams(fctParams); resBlock.setLength(timeLength); recalcFullTime(); setFocusedBlock(resBlock); this.repaint(); + sceneHaveChanged = true; return resBlock; } /** + * + * @param block + * @param fctParams + */ + public void updateBlock(ATTBlock block, Hashtable<String,Object> fctParams) + { + block.setFunctionParams(fctParams); + recalcFullTime(); + this.repaint(); + sceneHaveChanged = true; + } + + /** + * + */ + public boolean insertWaveFile(String wavePath) + { + if (attituneFile.insertWaveFile(wavePath)) + { + sceneHaveChanged = true; + return true; + } + + return false; + } + + /** + * + * @param waveName + * @return + */ + public boolean deleteWaveFile(String waveName) + { + if (attituneFile.deleteWaveFile(waveName)) + { + sceneHaveChanged = true; + return true; + } + + return false; + } + + /** + * Handle new attitune file + */ + public void createAttitune() + { + if (!loadAttitune("c:/template.att")) + { + return; + } + attituneIsTemplate = true; + sceneHaveChanged = true; + } + + /** * Delete a block from the scene * @param block */ @@ -1109,6 +1191,7 @@ blockContainers[i].deleteBlock(j); recalcFullTime(); this.repaint(); + sceneHaveChanged = true; } return; @@ -1174,14 +1257,45 @@ } this.repaint(); + attituneIsTemplate = false; + events.emit(ATTConfig.EVENT_ATTITUNE_LOADED, this); + return true; + } + + /** + * + * @param attFilePath + * @return + */ + public boolean saveAttitune(String attFilePath) + { + /* Refresh the blocks structure in the attitune object */ + attituneFile.setBlockStruct(getBlocksStruct()); + /* Save the attitune file */ + if (!attituneFile.saveAttituneFile(attFilePath)) + { + return false; + } + sceneHaveChanged = true; + events.emit(ATTConfig.EVENT_ATTITUNE_SAVED, this); + + /* Reload the attitune */ + if (attFilePath != attituneFile.getAttFilePath()) + { + if (!loadAttitune(attFilePath)) + { + return false; + } + } + return true; } /* * */ - private Hashtable<String,Object> getBlocksStruct() + public Hashtable<String,Object> getBlocksStruct() { Hashtable<String,Object> result = new Hashtable<String,Object>(); int count = 0; @@ -1368,6 +1482,8 @@ getFunctionParams().get("wav_name"))); } + sceneHaveChanged = true; + return newBlock; } } Modified: software_suite_v2/software/tools/attitunesStudio/trunk/src/com/tuxisalive/attitunes/visual/ATTSButton.java =================================================================== --- software_suite_v2/software/tools/attitunesStudio/trunk/src/com/tuxisalive/attitunes/visual/ATTSButton.java 2008-08-07 10:05:24 UTC (rev 1450) +++ software_suite_v2/software/tools/attitunesStudio/trunk/src/com/tuxisalive/attitunes/visual/ATTSButton.java 2008-08-09 10:57:55 UTC (rev 1451) @@ -23,7 +23,7 @@ try { - enabledIcon = new ImageIcon(getClass().getResource(baseIcon).getPath()); + enabledIcon = new ImageIcon(getClass().getResource(baseIcon)); } catch(Exception e) {} this.setIcon(enabledIcon); |
From: jaguarondi <c2m...@c2...> - 2008-08-07 10:05:21
|
Author: jaguarondi Date: 2008-08-07 12:05:24 +0200 (Thu, 07 Aug 2008) New Revision: 1450 Added: firmware/hex_dev/fuxusb.libusb.hex Log: * Added the libusb version of the latest USB firmare. Added: firmware/hex_dev/fuxusb.libusb.hex =================================================================== --- firmware/hex_dev/fuxusb.libusb.hex (rev 0) +++ firmware/hex_dev/fuxusb.libusb.hex 2008-08-07 10:05:24 UTC (rev 1450) @@ -0,0 +1,496 @@ +:1015B400121786120006300905120F3380F5121631 +:0815C4007C50F012004680EBA0 +:0C178600438F01C281D2A3D2AF020DDB61 +:0C179200C8040500C9000004CA000000E3 +:060DDB001218AD43BC80BC +:100DE10090011E1205B60000271043BC1090011E91 +:100DF100E0FCA3E0FDA3E0FEA3E0FFEC4D4E4F605D +:100E010018EF24FFFFEE34FFFEED34FFFDEC34FF5D +:0C0E1100FC90011E1205AA80D453BCEF17 +:100E1D007D80E4FF1218A6E4FF1216E61215FC53AE +:080E2D00F1FC43F101D2B322F4 +:10000600E5BD30E50512176C8012E5BD30E405123A +:10001600185B8008E5BD30E003121852E5BD30E3F9 +:100026000E53BDF71214179000FCE0600214F01294 +:0D0036001325120C9DE5F860031210DC226A +:0414A80041010E00F0 +:100E3500E5CFF0A3E5CFF0A3E5CFF0A3E5CFF02212 +:100E450090010BE4F07412A3F090011074FFF0A36D +:100E55002253CEFB43CE802253CEFD53CE7F22902C +:100E65000110E0FBA3E0FAA3E0F92253CE7F53CEB5 +:100E7500FB2290010BE4F0A322F053CEFB43CE10EE +:080E850022E4F5CF43CE102258 +:1015FC00E4900114F0A3F0A3F090010EF090013AE6 +:06160C00F0900139F0220C +:101159007D857F011218A67F011216E67D817F0227 +:101169001218A67F021216E67D817F031218A67F48 +:10117900031216E67D877F041218A67F041216E66D +:0C1189007D837F051218A67F050216E684 +:0618BB00E4F5C70209BDBF +:1009BD0090010FE5CFF090010DE5CFF090010FE024 +:1009CD005460707390010DE024FEB40A00506690DF +:1009DD0009EA75F003A4C58325F0C58373020A3DAA +:1009ED00020A42020A42020A12020A08020A4202DC +:1009FD000A0D020A17020A27020A38120613806F1F +:100A0D0012150C806A1215CC806590010FE07005EF +:100A1D00121350805A1216F7805590010FE0B481D1 +:100A2D000512182080491217428044120D77803F1D +:100A3D00121612803A803290010FE05460642070DB +:100A4D002890010DE0247E600F14601114601324B2 +:100A5D0003701412152A801712154880121214CA29 +:100A6D00800D1214EB8008800053CEFB1217065335 +:030A7D00CE7F2207 +:1015CC0090011EE5CFF053CEFB43BC011217CE9019 +:0715DC00011EE04480F5C68A +:0115E30022E5 +:10135000AFCF120E70EFD39401501B90010EEFF03F +:10136000B401091213CB12143D1218341217CE1205 +:09137000115943BC0222121706B8 +:011379002251 +:100D770090011E120E35120E70900120E0B4031878 +:100D870090011EE0701290013AF0900139F07F0453 +:100D97001216E67F051216E6900120E0B4010C90CA +:100DA700011EE0B401057F811216E6900120E0B430 +:100DB700020C90011EE0B401057F021216E69001B5 +:100DC70020E0B4050C90011EE0B401057F03121664 +:040DD700E60217CE4B +:10061300C20AAFCFAECFEE24FE60171460292402C6 +:100623006003020703120E457402F0A37465F0021F +:10063300070D90010B7401F07420120E4C7403F03B +:10064300A3743DF002070DEFB40900400302070352 +:1006530090065AF828287302067502068202069449 +:100663000206A10206B30206D00206BF0206E10299 +:1006730006F2120E457402F0A37477F002070D120E +:100683000E77740C120E4D7402F0A37489F00207F6 +:100693000D120E457402F0A37495F002070D120EAD +:1006A30077740C120E4D7402F0A374A7F002070DB9 +:1006B300120E457402F0A374B3F0804E120E7774D9 +:1006C3001E120E4D7402F0A374E7F0803D120E77F4 +:1006D3007422120E4D7402F0A374C5F0802C120E16 +:1006E30077741A120E4D7403F0A37405F0801B1275 +:1006F3000E77741E120E4D7403F0A3741FF0800A5C +:1007030053CEFB12170653CE7F22E5CFE5CF9001E0 +:100713001FE5CFF090011EE5CFF090010BE0FEA3A3 +:10072300E0FF90011EE0FCA3E0FDD39FEC9E400C94 +:10073300EF541F60028001D3920A800890010BECF2 +:10074300F0A3EDF0120E56D390010CE0942090012B +:100753000BE09400400B120E647D2012105740E70B +:1007630022120E6490010BA3E0FD121057502930A2 +:100773000A0A120E64E4FD121057501CE5CE5442CF +:100783007005E5CE30E2F5E5CE20E20CE5CE54422D +:08079300600653CE7F53CEFD3A +:01079B00223B +:10105700900120EDF01216A1900110EBF0A3EAF039 +:10106700A3E9F0900120E0FFC390010CE09FF0900E +:10107700010BE09400F0E5CE54427005E5CE30E078 +:10108700F553CEFEE5CE5442600853CEEF53CEFD66 +:04109700C322D3227B +:10150C00120E5690010EE0F5CF43CE10E5CE30E032 +:0E151C00FB53CEFEE5CE544260FA120E5D2265 +:0A182000120E5612170653CE7F2257 +:100EE300E5CFE5CFAFCF120E5690010FE0247F6020 +:100EF3000C14600E2402701975CF018014E4F5CF31 +:100F0300800FEF547F2413F582E43401F583E0F579 +:100F1300CF120E86E5CE30E0FBE5CE20E2F653CECF +:0F0F2300FEE5CE544260FAE5CE20E2F5120E5DF7 +:010F3200229C +:100FCB0090010FE07002803790010FE0B4010280B6 +:100FDB002E90010FE06402702CE5CF7028E5CFAFA7 +:100FEB00CFEF247F701975C70143CE20E4F5C7906E +:100FFB00011404120E7EE5CE30E0FB53CEFE2253DD +:06100B00CEFB12170622C5 +:100E8D0090010FE07002804790010FE0B4010280E5 +:100E9D003E90010FE06402703CE5CF7038E5CFAFB6 +:100EAD00CFEF601F247F702775C70153CEDF7F0101 +:100EBD001216E6E4F5C7900114120E7EE5CE30E071 +:100ECD00FB8008120E7FE5CE30E0FB53CEFE2253A1 +:060EDD00CEFB12170622F5 +:10152A0090011E120E35120E56120E86E5CE30E0CE +:0D153A00FB53CEFEE5CE544260FA120E5D6A +:011547002281 +:1015480090011E120E35120E56120E86E5CE30E0B0 +:0D155800FB53CEFEE5CE544260FA120E5D4C +:011565002263 +:1014CA0090011E120E35120E5675CF0A43CE10E544 +:1014DA00CE30E0FB53CEFEE5CE544260FA120E5DEA +:0114EA0022DF +:1014EB0090011E120E35120E5675CF0143CE10E52C +:1014FB00CE30E0FB53CEFEE5CE544260FA120E5DC9 +:01150B0022BD +:0C179E00900125120E35120E700217CEBD +:0C17AA00900129120E35120E700217CEAD +:0C17B60090012D120E35120E700217CE9D +:0C17C200900131120E35120E700217CE8D +:0F16F70053CEFBE5CE544260FA53CEFD0217CE20 +:0E174200E5CF90010AE5CFF053CEFB0217CEA3 +:10161200120E5690010AE0F5CF1217CEE5CE5442D3 +:0616220060FA120E5D22C9 +:0F17060043CE20E5CE30E3FB53CEDF53CEF722A8 +:0C17CE0043CE10E5CE30E0FB53CEFE22EF +:100265001201100100000020EB0307FF50000102FE +:100275000301120309040000000000000000000053 +:10028500000000000C034B00790073006F0068004C +:100295001203540075007800440072006F00690075 +:1002A50064000C03310030003000300031001203CF +:1002B500540075007800440072006F006900640006 +:1002C5002203540075007800440072006F00690035 +:1002D50064002D0053007000650061006B0065002F +:1002E50072001E03540075007800440072006F0010 +:1002F500690064002D004D006900630072006F0005 +:100305001A03540075007800440072006F006900FC +:1003150064002D005400540053001E035400750062 +:100325007800440072006F00690064002D004100F0 +:100335007500640069006F00090220010601048050 +:10034500320904000000010100080A2401000134FB +:10035500000201020C240201010200010000000656 +:100365000C24020201010001000005000924030319 +:100375000101000106092403040103000205090423 +:100385000100000102000609040101010102000645 +:10039500072401030102000B2402010101080140A9 +:1003A5001F00090581010800010000072501000063 +:1003B5000000090402000001020005090402010110 +:1003C50001020005072401020102000B24020101BC +:1003D500010801401F00090502010800010000078E +:1003E50025010000000009040300020000000007C9 +:1003F50005840340000107050503400001090404C5 +:1004050000000101000709240100011E0001050C7F +:100415002402070101000100000007092403080167 +:100425000300070709040500000102000709040588 +:10043500010101020007072401070102000B240244 +:100445000101010801401F00090503010800010021 +:08045500000725010000000072 +:0614AC00C106C107C105E5 +:1010DC00E5F830E00BE4F5C7E5CE30E2031218BBBF +:1010EC00E5F830E103121750E5F830E20312163D33 +:1010FC00E5F830E303121628E5F830E40312146225 +:0F110C00E5F830E509300006120C261211CE224C +:10168F0090013AE0600B75C704E5CE20E40343CE2A +:02169F00102217 +:0E13250090010EE06024121733501F20051CAB +:1013330075C70190011E7408F01216678FCF9001D4 +:0C1343001EE014F0E070F243CE10D20562 +:01134F00227B +:0E17500075C701E5CE30E00553CEFEC205227E +:1016280075C70330060B1218EEEF60057F08121518 +:051638006653CEFD2207 +:10163D0075C70220060B1218EEEF60057F08121514 +:05164D006653CEFD22F2 +:1011CE0075C705900139E0FF700CE5CE30E107538D +:1011DE00CEFD7401F022EFB4010EE5CE30E60953D8 +:1011EE00CEBFE4900139F022E5CE30E60453CEBFF7 +:0511FE002253CEFD228A +:1014620075C704E5CE30E01A53CEFE90013AE0147F +:10147200F0E0C394005002E4F090013AE0600343CC +:03148200CE102267 +:0414B20041014100B3 +:10148500EF24FFFFEE34FFFEED34FFFDEC34FFFCEF +:101495000205AAE0FCA3E0FDA3E0FEA3E0FFEC4DFE +:0314A5004E4F2285 +:100C260075C705E5CE5442606D1218EEEF149000BC +:100C3600FBF0AFCFE490011EF09000FBE0FE9001C8 +:100C46001EE0FDC39E501574BB2DF582E43400F5FD +:100C560083E5CFF090011EE004F080DDEF600A240A +:100C6600FE60300470300208F9C200D203E490013D +:100C76001EF090011EE0FF24BBF582E43400F583EC +:100C8600E0FE74182FF8A60690011EE004F0E0B40A +:060C960004E022120BA590 +:010C9C002235 +:100C9D0030076C90013AE0C39402506375C704901D +:100CAD000141E0FF04F08FCF30A3047F0080027F6D +:100CBD00018FCF900116E0F5CFE5106007131354A7 +:100CCD003FFF80027F008FCFE4F517E517C3951026 +:100CDD0050091218158FCF051780F0851017E517DD +:100CED00C3943C5007E4F5CF051780F212183490E9 +:0F0CFD00013AE004F012168FE4900116F0C207DE +:010D0C0022C4 +:1013A30075C70475CFF0EF60047F0080027F018F63 +:1013B300CFAF058FCFAF038FCF900123E0F5CF9051 +:0813C300013AE004F002168F6C +:1008F9009000BBE07001229000BBE0B401209000A1 +:10090900BEE02403600F14600F14600F146003022B +:1009190009A0D207220213CB021203020F82900010 +:10092900BBE0B4020DA3E0600614706BD20622C2CC +:1009390006229000BBE06406705D1218349017928D +:100949001209A19017931209A19017941209A8905E +:1009590017951209A89017961209AF9017971209BF +:10096900AF901797E4740193FF1215E49017991249 +:1009790009B690179A1209B690179BE493FF1215BE +:10098900E490179BE4740193FF1215E490179DE41A +:1009990093FF1215E4D20722E493FF1215E422E42F +:1009A90093FF1215E422E493FF1215E422E493FF66 +:0409B9001215E4220D +:0A120300E4F5A8F5B175C314C2812B +:10120D0090011F1205B60000271043BC1090011F5E +:10121D00121498600890011F12148580F053BCEFD2 +:0A122D00D2B375A61E75A6E180FE7F +:100F8200E4F5A8F5B175C314D2B3C2817B067D0125 +:0E0F92007F041215817B017DF47F041215810E +:100FA00090011F1205B60000271043BC1090011FCE +:100FB000121498600890011F12148580F053BCEF42 +:0B0FC00012189775A61E75A6E180FEB2 +:0918520053BDFE43BC40C28122DB +:0D176C0053BCBF53BDFE53BDDF53BDF7227C +:09185B0053BDEF1215FC02183414 +:0614B600C181C104C10266 +:0A182A00E490011BF090011AF02277 +:0E175E0012182AD201D291C202C204D2002275 +:10143D0053AFFE43C31043C30253C3F753C3FB4320 +:10144D00C32043C340D2B2D2B4D291D288D2A81213 +:05145D00182AD2002254 +:030003000218E2FE +:0318E200D20432FB +:1000460030B410C204E490011CF012182BC201C295 +:1000560091D202200203020264200403020264E435 +:1000660090011EF0C20490011BE0702C1217245060 +:100076000E900118300304740A80127402800E3048 +:10008600030790011874088004E4900118F0F5C580 +:1000960090011B7401F0805790011BE0B40119A375 +:1000A600E0B4110690011B7402F0900118E030E1F3 +:1000B6003B1216528FC5803790011BE0FF64027019 +:1000C60027A3E0FEB4150F900118E030E302C20347 +:1000D60090011B7403F0900118E030E30974062EBA +:1000E600F8E6F5C580098004EFB40303E4F5C5908E +:1000F600011CE004F090011AE0FF7030AEC4BE802F +:1001060003D38001C350F530A303020264900117A4 +:10011600E5C5F0E5C590011930E7057422F08003C6 +:100126007411F090011A7401F0020252EF6401702A +:100136004AAFC4BF8003D38001C350F530A3030286 +:100146000264900117E030E112D29090011CE02485 +:1001560097F582E43400F583E5C5F0900119E024B3 +:1001660001FFE433FE90011CE06F7001EE600302B4 +:10017600025290011A7402F002025290011AE064CF +:10018600026003020252AFC4BF8003D38001C35092 +:10019600F530A303020264900117E0F930E35790AB +:1001A6000119E0FF2405FDE433FC90011CE0FB7A15 +:1001B60000D39DEC6480F87480985015C3EB9FFFC4 +:1001C600EA9400FE741E2FF58274013EF583E5C5A0 +:1001D600F0900119E02406FFE433FE90011CE0B51F +:1001E6000714E4B50610A3E5C5F0E0FF900116E09C +:1001F600C39F5002EFF0900119E0FF2406FDE4339F +:10020600FC90011CE06D7001EC7041D200C202D27C +:1002160091D201E954826003121237900117E0303F +:10022600E33C900120E06036E490011FF090011F4E +:10023600E02420F582E43401F583E0FF1215E49012 +:10024600011FE004F0E0C3940440E22290011EE0A6 +:0E02560004F0300409E0C39405500302006A6E +:010264002277 +:0414BC004100FD00EE +:1012690074BB2FF582E43400F583E0FF9000FEE0C3 +:10127900FE04F0900104E0FCA3E02EF582E43CF5C5 +:1012890083EFF090011FE004F022E4900123F0FBCA +:011299002232 +:100BA5009000BBE0B4010512111B803120090E1223 +:100BB50012937D01FF1213A312187F80209000BBB2 +:100BC500E0B4030F12187F1212937DFE7F011213FA +:100BD500A3800A9000BBE0B40203120A809000FFD4 +:100BE500E0FF900106E0FEB50725900109E0FD90C4 +:100BF50000FEE0B50519900108E02DF0900107E031 +:100C05003400F0E49000FEF0900106F0D20822EEE8 +:100C1500C39F400C1212937D05FF1213A312187F78 +:010C250022AC +:100F33009000FCE07048300845781E7C017D017B01 +:100F4300017A0179007E007F0612052D9001247439 +:100F530040F01212F9900097E020E0F99000FC7441 +:100F630014F0900097E0C413135401FF9000FDE0C8 +:0F0F730004FDF0E4900123F0FB1213A3C2082247 +:100A8000900106E070779000BCE0900101F0A3E4D3 +:100A9000F09000BDE0FF900102E02FF0900101E036 +:100AA0003400F09000FBE0B404028039900101E0D2 +:100AB000FEA3E0FFEE547FFC900107E06C7003A3FF +:100AC000E06F6024EF64C07003EE641D601A900153 +:100AD00001E0640E7004A3E064C0600C1212937D08 +:100AE00003FF1213A312187F90011F7403F09001EB +:100AF0001FE0FFC39423501A12126980F190011F66 +:100B00007401F090011FE0FFC39421500512126997 +:080B100080F1900106E004F001 +:010B180022BA +:10111B009000FC74FAF01216B31213F19000BCE0BD +:10112B0025E0900100F09000BDE0900109F09000E7 +:10113B00BEE09000FFF0E4900107F0A3F09000FEFA +:0E114B00F0900106F09000FDF0D209C2A8223B +:08187F00C2091213CB02175E2F +:1016B3001218D212189F9001047400F0A37403F05F +:0116C3002204 +:1012F900900097E054BFF090011EE0900098F090A4 +:10130900011FE0FCA3E0FDEC900001F0A3EDF090DB +:0C1319000124E02402900096F002171559 +:1010110090008AE0FF04F0748B2FF582E43400F530 +:1010210083E595F022E0FF04F074012FF582E434AA +:1010310000F58322900096E0FF900000E0C39F221C +:10104100E0FBA3E0FAA3E0F9EA494B22A3E0FAA30B +:06105100E0F5828A832213 +:0418D2007593802268 +:07189F007593C043B1022262 +:0C17DA00900083EBF0A3EAF0A3E9F022FA +:0C17E600900087EBF0A3EAF0A3E9F022EA +:0F171500900097E04401F0E4900000F00218D635 +:0418D60043932022F6 +:0B180A00439310900097E054FEF02282 +:0318E5008F9522BA +:0418DA00439304220E +:0418DE005393FB2203 +:0318E800AF952297 +:0318EB00AF942295 +:0300430002079C15 +:10079C00C0E0C0F0C083C082C0D075D008AF94EF69 +:1007AC001205E708E80008010808011008091808F4 +:1007BC002920080928082930083338083940082925 +:1007CC004808365008265808496008496808497096 +:1007DC00084978085F80087188085F90087198084C +:1007EC0078A008A4A808A4B008CBB80833C0083374 +:1007FC00C8000008EB5393DF900098800812103566 +:10080C00500B121026E0FF1218E50208EB12180A22 +:10081C00900097E04440F00208EB12101190009702 +:10082C00E04402F00208E80208E31210119000867E +:10083C00E014FF90008AE0C39F502780229000971D +:10084C00E04401F090008AE4F0900097E054FBF053 +:10085C000208D912101190008AE0C39408500302C8 +:10086C0008D90208DE900097E04404F012189F901B +:10087C000083121041601890008AE0FF7B017A001F +:10088C00798BC00A90008312104DD00A1206119079 +:10089C000097E054FEF08047900087121041601AD8 +:1008AC007B017A007901C00A90008712104DD00AA2 +:1008BC007F82120611900096EFF0900000E4F09009 +:1008CC000000121026E0F59512103550051218DABA +:1008DC00800D1218DE800812189F800312180A531C +:0D08EC0093F7D0D0D082D083D0F0D0E0328E +:0618C100E4F514F513220A +:0F172400C3E5139514D394204003D38001C3224F +:101566008F17C3E51395146440600FAF130513EF8F +:0A157600543F2422F8A6CFD517E851 +:011580002248 +:10165200E514B513037F8022AF140514EF543F2421 +:0516620022F8E6FF2262 +:0618C700E4F516F5152200 +:0F173300C3E5159516D394204003D38001C3223C +:101237008F17C3E515951664406026E517FDEFC3C4 +:101247009DFDE49400FC74992DF58274003CF583B0 +:10125700E0FEAD150515ED543F2462F8A606D51737 +:01126700D1B5 +:011268002263 +:10166700E516B515037F8022AF160516EF543F2404 +:0516770062F8E6FF220D +:0214C000C10B5E +:0A183400E4F512F511F510C20B22C5 +:1015E400300B03121834AE10051074A22EF8A6079F +:0815F400E510B43C02D20B2209 +:0B181500AF11051174A22FF8E6FF22AE +:0214C200C10C5B +:1016C400E0FEA3E0FFE4FCFDFB7AFAF9F8D302059F +:0116D4009481 +:1013CB00D291C281E4900120F0A3F090012012167B +:1013DB00C44010900121E004F070F0900120E00473 +:0513EB00F080E8D28152 +:0113F00022DA +:1013F100C291C281E490011FF0A3F090011F121667 +:10140100C44010900120E004F070F090011FE0044E +:05141100F080E8D2812B +:0114160022B3 +:10167C0020A304D20CD322300C031213CBD200C201 +:02168C000CC38D +:01168E002239 +:0514C40042013B0000A5 +:1014170030090A7D207C017F007E01801520A30A08 +:101427007D207C007F107E0080087D007C047F008B +:061437007E0312129A224E +:10129A0090013CE004F0700690013BE004F09001FC +:1012AA003BE0FAA3E0FBB50707EAB50603C2B3229F +:1012BA00C3EB9DEA9C4009D2B3E490013BF0A3F052 +:0112CA002201 +:0D177900120553F5CF740129F9E43AFA2264 +:0718A6008FC7AF058FD422AC +:1011950030F805E4F5C7802E30F90575C7018026BE +:1011A50030FA0575C702801E30FB0575C70380162A +:1011B50030FC0575C704800E30FD0575C705800632 +:0911C50030FE0375C706AFC72216 +:0318EE00AFE22244 +:09186400AFE3EFFEADE2EDFF225F +:1016A100E4F5C7AF051DEF600512177980F543CE4C +:0216B100102205 +:0C17F200AF051DEF600512177980F5228D +:1016D500AF051DEF600AE5CF12056C12177E80F08D +:0116E50022E2 +:09186D008FC7E4F5CE43CE202222 +:1016E6007401A807088002C333D8FCF5D5E4F5D504 +:0116F60022D1 +:0718AD0075A41043A3022201 +:0718B4001218AD43BC8022B5 +:10137A0041746D656C202852290A63353133312D49 +:10138A007573622D6364632D315F305F320A0A0020 +:09139A001B631B5B3F32356C0044 +:0B109B00900135EBF0A3EAF0A3E9F0B0 +:1010A600900135E0FBA3E475F00112057EA9F0FA84 +:1010B600120553900138F06013E0B40A057F0D1253 +:1010C6001887900138E0FF12188780D47F0D121818 +:0610D600877F0A02188763 +:091876007BFF7A13799A02109BA2 +:100D0D0090013EEDF090013DEFF070097F0D12184E +:100D1D00877F0A80377F1B1218877F5B1218879099 +:100D2D00013EE0FFD394094003120D6B90013E127A +:100D3D000D5D7F3B12188790013DE0FFD394094074 +:100D4D0003120D6B90013D120D5D7F481218872225 +:100D5D00E075F00A84E5F02430FF12188722EF7554 +:0A0D6D00F00A842430FF12188722D8 +:0518CD00A298920D221B +:10159B00759840538FF7438F0175CBFF75CAF37561 +:0915AB00C834D2CA439812D322BD +:081887003099FDC2998F9922EE +:07188F003098FDAF99C298EB +:01189600222F +:0A183E008FC5E5C430E7FB7F0122EF +:0A18480043A22012FFC053A2DF22CA +:0C17FE008F1CAF058F1F121848AF1D2272 +:10158100A2AF920FC2AF8F1CAF038F1FAF058F1D8C +:09159100121848A20F92AF7F016D +:01159A00222E +:0812CB0090013FEFF0A3EDF0EC +:1012D300A2AF920EC2AFE4FD7F081217FE90013F4A +:1012E300E0F45FFFA3E04FF51D751C07121848A239 +:0512F3000E92AF7F0127 +:0112F80022D3 +:08189700C2AF43A22002F400DD +:03000000020B19D7 +:0C0B1900787FE4F6D8FD7581DD020B60EA +:10045D00E709F608DFFA8046E709F208DFFA803E81 +:10046D0088828C83E709F0A3DFFA8032E309F6086E +:10047D00DFFA8078E309F208DFFA807088828C83D6 +:10048D00E309F0A3DFFA806489828A83E0A3F6088A +:10049D00DFFA805889828A83E0A3F208DFFA804C64 +:1004AD0080D280FA80C680D4806980F2803380103B +:1004BD0080A680EA809A80A880DA80E280CA8033A4 +:1004CD0089828A83ECFAE493A3C8C582C8CCC5831C +:1004DD00CCF0A3C8C582C8CCC583CCDFE9DEE780EC +:1004ED000D89828A83E493A3F608DFF9ECFAA9F06B +:1004FD00EDFB2289828A83ECFAE0A3C8C582C8CCC1 +:10050D00C583CCF0A3C8C582C8CCC583CCDFEADED9 +:10051D00E880DB89828A83E493A3F208DFF980CC3B +:10052D0088F0EF60010E4E60C388F0ED2402B40434 +:10053D000050B9F582EB2402B4040050AF232345DB +:06054D0082239004AD734F +:10055300BB010689828A83E0225002E722BBFE02A6 +:09056300E32289828A83E49322D9 +:10056C00BB010689828A83F0225002F722BBFE016E +:02057C00F32268 +:10057E00A3F8E0C5F025F0F0E58215827002158330 +:06058E00E0C838F0E8228D +:10059400EB9FF5F0EA9E42F0E99D42F0EC6480C8DE +:0605A40064809845F0227E +:0C05AA00ECF0A3EDF0A3EEF0A3EFF022C4 +:1005B600A8828583F0D083D0821205CD1205CD1294 +:1005C60005CD1205CDE473E493A3C583C5F0C583B9 +:1005D600C8C582C8F0A3C583C5F0C583C8C582C88F +:0105E60022F2 +:1005E700D083D082F8E4937012740193700DA3A3A3 +:1005F70093F8740193F5828883E4737402936860B7 +:06060700EFA3A3A380DFB6 +:06060D008A838982E47378 +:100B25000215B4E493A3F8E493A34003F68001F21D +:100B350008DFF48029E493A3F85407240CC8C333D1 +:100B4500C4540F4420C8834004F456800146F6DFA0 +:100B5500E4800B01020408102040809014A8E47E74 +:100B6500019360BCA3FF543F30E509541FFEE49395 +:100B7500A360010ECF54C025E060A840B8E493A35C +:100B8500FAE493A3F8E493A3C8C582C8CAC583CA87 +:100B9500F0A3C8C582C8CAC583CADFE9DEE780BE3F +:0114C9000022 +:00000001FF |
From: jaguarondi <c2m...@c2...> - 2008-08-07 07:50:31
|
Author: jaguarondi Date: 2008-08-07 09:50:32 +0200 (Thu, 07 Aug 2008) New Revision: 1449 Added: firmware/hex/bootloader.fuxrf.hex firmware/hex/bootloader.tuxrf.hex Log: * Added the 0.3.0 version (I think) with bootloader included, useful to reprogram the RF with an ISP programmer. Added: firmware/hex/bootloader.fuxrf.hex =================================================================== --- firmware/hex/bootloader.fuxrf.hex (rev 0) +++ firmware/hex/bootloader.fuxrf.hex 2008-08-07 07:50:32 UTC (rev 1449) @@ -0,0 +1,129 @@ +:2000000021C03AC039C038C037C036C035C034C033C032C031C0D5C42FC02EC02DC02CC019 +:200020002BC02AC0E3C6B1C6D0C626C025C024C023C022C071C5E7C456C56EC575C59DC5F6 +:20004000ACC5C0C511241FBECFEFD2E0DEBFCDBF11E0A0E0B1E0EAE8FEE002C005900D9257 +:20006000A030B107D9F711E0A0E0B1E001C01D92A030B107E1F701C0C3CFCFEFD2E0DEBFF6 +:20008000CDBF1A9901C041C7E4D1F8D1A9D276D28093FC0122D2109287017894A0E0B0E0CD +:2000A000ECD6802D992780939101809191018F3F19F485E080939101BCD25F9841E150915C +:2000C000F10E752F7F718091C1018823E1F31092C1011092C2011092F20120E02093F30136 +:2000E0001A9BFECF429A1A99FECF42988091F501882309F445C01092F5018091F701882348 +:2001000049F11092F7018091020180FF0CC08091020182FF2BC08091020181FF23C08091A4 +:20012000F20182600BC08091020181FF17C08091020182FF1FC08091F20181608093F20155 +:200140008091F20184608093F20122E882E28093F40118C08091020180FF08C080910201F4 +:2001600082FF0EC08091F201826007C08091020181FF06C08091F20181608093F20122E03C +:200180004093F4018091F601882341F01092F60128608091F20188608093F2018091F80196 +:2001A000882331F028608091F20180618093F2018091850187FF58C028608091F201886057 +:2001C0008093F201809185018038B9F48091F00E8093FD01852F807E8093FE018091FE0129 +:2001E000872B8093FE018091F20E8093FF018091F30E8093000281E819C08091850181385E +:20020000D9F48091F40E8093FD018091F50E9091F60E892F99278093FE018091F50E809303 +:20022000FF018091F70E8093000282E8809385011BC01092F10147CF809185018238A1F425 +:200240008091F80E8093FD018091F90E9091FA0E892F99278093FE018091F90E8093FF0180 +:200260008091FB0E809300022EBD40980DB407FEFDCF61E01A99C5C0409A8091C20187311B +:2002800098F48091F101882339F08091C201E82FFF27ED53FE4F06C08091C201E82FFF2786 +:2002A000E652FE4F8EB580838091C2018F5F8093C2019091F301992309F044C08091F20109 +:2002C00082FF1CC08091F20180FF0CC08091C201823120F18091C201E82FFF27E850FF4F43 +:2002E000808123C08091C201823160F08091C201E82FFF27E050FF4F878517C08091F201CD +:2003000080FF08C08091C201E82FFF27E050FF4F81850BC08091F20181FF09C08091C20115 +:20032000E82FFF27E050FF4F80A18EBD01C09EBD9091C2018091F401981709F061C06093D4 +:20034000F3015EC08091F3018130C9F58091F20183FF1FC08091850187FF07C08091C201FA +:20036000E82FFF27E551FE4F11C08091F20182FF07C08091C201E82FFF27ED51FF4F06C03D +:200380008091C201E82FFF27EC50FF4F80818EBD01C01EBC8091C201282F33278091F40150 +:2003A000992704962817390759F582E08093F30180918501823821F51092850121C080912C +:2003C000F3018230F1F48091F20184FF0AC08091F8018EBD8091F801813021F01092F80185 +:2003E00001C01EBC8091C201282F33278091F401992705962817390719F483E08093F30186 +:2004000040980DB407FEFDCF8091F301833009F031CF409A8091C201873198F48091F101CC +:20042000882339F08091C201E82FFF27ED53FE4F06C08091C201E82FFF27E652FE4F8EB5AB +:2004400080838091F101882309F0F3CE6093F1013ACE80E285B983E184B981E388B98FE0EF +:2004600087B980EC8BB986EA8AB985E08093C40080E48CBD1DBC0DB40EB408958DB780959E +:20048000E0E0F1E02FEF32E0281B3109E217F30710F41192FBCF109290011092A80110929A +:2004A000A60181E08093A7011092BE011092BD011092BF011092C1011092F1011092F501C6 +:2004C0001092F6011092F7011092F8011092F9011092FA011092850108951F9395E5909301 +:2004E000420180914201809341018091410180934001909345018091450180934401809140 +:200500004401809343018FEF809347018091470180934601809187018093480116E3109322 +:20052000490110934A0110934B0187E080934C0181E080934D0110924E018091FC018093F9 +:200540004F0190935001909351013DD0109381018091FC0180938201109383011F91089518 +:2005600020E0281750F49FE00000000000000000915097FFF9CF2F5FF4CF0895CF93D6D143 +:200580005D9AC0E02C2F00002F5F2F3FE1F740E050E020E4CA0187709070892B19F4CC0FE3 +:2005A0004899C16021504F5F5F4F27FFF3CF01D28C2F9927CF910895E1DF8F77803608F0C5 +:2005C0008C5399270895ECE4F1E020E090914C01923020F0819128279150FACF20830895B3 +:2005E000FF920F931F93CF93E7DF80939201C1E081E0F82E0C2F11270E561E4FDDDFF80127 +:20060000808320E0D801E22FFF27EE56FE4F9C918081981721F02F5FC217A9F702C0FF2060 +:2006200049F7CF5FC43120F3CF911F910F91FF90089580918601806480938601BAD188D36C +:200640001092C0001092C1001092C20080E290E09093890080938800809190018823E1F337 +:20066000109290018091010181FFF6CF8091FC0180934A0180914D01846080934D01A3DF5D +:20068000809190018823E1F3109290018091010181FFF6CF8091010182FFF2CF84E38093DF +:2006A0004C019FEFE2E5F1E083E09193815087FFFCCF95E5E6E5F1E088E29193815087FF23 +:2006C000FCCF81DF8091860180618093860108958091860185FFDCC08091A70184FF12C079 +:2006E00080919001882371F08091010184FF0AC01092900180914D01877F80934D0180E291 +:200700008093A70180914E0180FF31C080914E0182FF04C084E080934E0102C010924E0130 +:200720008091F101882381F48091C30181FF50C0A4ECB1E0E1E4F1E090E18D91858B9150FA +:20074000319697FFFACF0FC08091DA0181FF40C0ABEDB1E0E1E4F1E090E18D91858B9150F9 +:20076000319697FFFACF80914E0182602FC080914E0181FF02C083E001C081E080934E0199 +:200780008091F101882381F48091C30181FF20C0A4ECB1E0E1E4F1E090E18D9184A79150AF +:2007A000319697FFFACF0FC08091DA0181FF10C0ABEDB1E0E1E4F1E090E18D9184A79150AE +:2007C000319697FFFACF80914E01846080934E018091F1018823B9F48091C30183FF37C0A4 +:2007E0008091F801882399F58091D5018530B9F0A5EDB1E0E2E5F1E093E08D918193915030 +:2008000097FFFBCF1AC08091DA0183FF20C08091F8018823E1F48091EC01853021F480E896 +:200820008093850114C0ACEEB1E0E2E5F1E093E08D918193915097FFFBCF80914E0188605A +:2008400080934E011092F90181E08093F8018091F801813091F48091F901893121F483E0B0 +:200860008093F8010AC080914E01886080934E018091F9018F5F8093F9018091FA0188233B +:2008800029F080914E01806880934E019CDE08958091A70181FF17C08091010184FF45C0D3 +:2008A00080914D01877F80934D018091A801809351018091A8018F5F8093A80184DE84E029 +:2008C0008093A70108958091A70182FF16C08091A801809351018091A8018F5F8093A8012D +:2008E00072DE8091A80184FF20C01092A7018091860180628093860108958091A70180FF58 +:2009000014C0A2E9B1E0E0E4F1E093E18D91828B9150319697FFFACF80914D018860809352 +:200920004D0151DE82E08093A7010895299A5A9A419A5D9828985C985998549A0895982F02 +:20094000299A59985C98419834E360FF0BC080919101880F80939101309191013167892F53 +:20096000855E0FC0892F845E20EA98E05C9827FF02C0599A01C05998220F5C9A915097FF8A +:20098000F5CF8068232F3327322F2227280F311D9FE05C9837FF02C0599A01C05998220F8F +:2009A000331F5C9A915097FFF4CF5C985998419A08955D98289829985A9841985C98599832 +:2009C00008951F920F920FB60F9211242F933F934F935F936F937F938F939F93AF93BF9329 +:2009E000CF93EF93FF93C0918801CF5F8C2F9927AA27BB27FC013197E830F10508F094C12B +:200A0000E65EFF4F09948091860185FF3FC08091A601E82FFF27EE56FE4F8081809387016A +:200A20008091A6018F5F8093A6018091A6018431C1F51092A6018091A70185FF12C08091CA +:200A4000BF01E82FFF27EE56FE4F8091C00180831092A7018091BF01E82FFF27E755FE4F52 +:200A600010828091BD019091BE0101969093BE018093BD018091BD019091BE01885E934083 +:200A800081F41092BE011092BD010BC080918701815E8093870180918701853610F010924C +:200AA000870161E0809187014ADF80E48093C00088E08093C1008091880090918900855917 +:200AC0009E4F909389008093880080918701809348018091860184FDFBDD80914C01845FBB +:200AE0008093890121C18091880090918900805F9A4F909389008093880010928A0186E48E +:200B00008093C200289A88E28093C10085E58093C6008093C60008C109DF80918800909179 +:200B200089008B5B9F4F49C08091860185FF0DC08091BD019091BE01892B39F48091A6011E +:200B4000E82FFF27E755FE4F108210928B0110928C011092900110928D0160E080918701A4 +:200B6000EEDE80918800909189008C5E9E4F90938900809388005498D7C08091880090910B +:200B80008900895A9F4F90938900809388005D9A8091870180938001C7C010928D01109237 +:200BA000C00080E98093C10086E48093C20080918800909189008C599B4F90938900809328 +:200BC0008800B2C01092C0001092C1001092C200F0DEC0E0809188009091890084559F4F7A +:200BE000909389008093880080918C018F3FE1F580918D018823C1F521E02093900188B1EE +:200C000098E0892788B9C093FB018091020180FF05C08091020182FD09C004C08091020190 +:200C200081FD04C08091F701882311F02093F5018091020183FF0AC08091FA01882361F4A8 +:200C400081E08093F6018093FA0106C08091FA01882311F01092FA018091020187FF22C084 +:200C600082E08093F8011EC081E08093F7018091860184FF0AC08091FB018F5F8093FB01CD +:200C80008091FB018F3F09F45F9A8091860185FF09C08091A601E82FFF27E755FE4F80811F +:200CA0008F5F80838091860185FF3EC08091A7018823B9F58091A601E82FFF27E755FE4F99 +:200CC0008081833070F180914D01886080934D018091A6018093BF018091A60180934F01B1 +:200CE0008091A601E82FFF27EE56FE4F8081835E8093C0018091C0018F3528F08091C00138 +:200D00008F558093C0018091C001809350018091C0019091A601890F8093510180E18093DA +:200D2000A70181E08093C101C0938801FF91EF91CF91BF91AF919F918F917F916F915F91A9 +:200D40004F913F912F910F900FBE0F901F90189510928500109284001092800082E08093D8 +:200D6000810080936F0086BB08951092850010928400109280001092820082E086BB1092BA +:200D80006F0083E0809381000895DEBBDFB7DABDCBBDD1E0C0918A01C05CD881D093C600D7 +:200DA000CF53C0938A01C83009F42998D0918901DC1731F4D0E4D093C000D8E4D093C100C3 +:200DC000CBB5DAB5DFBFDEB31895DEBBDFB7DABDD0E0D093C000D093C100D093C2005A9854 +:200DE00028984198DAB5DFBFDEB318959EBBEABDFBBDFFB7F8BD90918C019430B1F0E0E8F1 +:200E0000F1E0E90FF081E091C600FE1771F5939590938C01943059F5E0918400E0938E0105 +:200E2000E0918500E0938F0122C09091C600F1E0E0918B019083E395EF73E0938B01F091B5 +:200E40008D01F927F0938D01909100019E1779F49FEF90938C0190E09093C1009093C20018 +:200E60005A985D984198299802C010928C01F8B5FFBFFBB5EAB59EB31895F999FECFB2BD7A +:200E8000A1BDF89A119600B40895FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF80 +:200EA0000FEFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF52 +:200EC0000FEFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF32 +:200EE0000FEFFFFFFFFFFFFFFFFFFFFFFFFFFFFFC8030300C9EEFF00CA000000FFFFFFFFB8 +:200F00008091BC008823E4F7089500E010E068018DE38093B80086E68093BA0084EC8093B1 +:200F2000BC00EEDF8091B900887F803609F0FFCF84EC8093BC00E4DF8091B900887F80384F +:200F400009F0FFCF8091BB00182F84EC8093BC00D7DF8091B900887F803809F0FFCF809161 +:200F6000BB00082FC8018F739070892B09F0FFCF8FE00030180708F0FFCFE80184EC809349 +:200F8000BC00EE24FF248FE3B82EBADF8091B900887F803891F4E0FC04C08091BB00C82EFF +:200FA0000DC08091BB00D82E81E00601FE0180935700E8951124229601C0FFCF84EC809345 +:200FC000BC00BA940894E11CF11CB7FEDECF98DF8091B900887F803A09F0FFCF84EC8093B3 +:180FE000BC0083E0F80180935700E89585E0F80180935700E89595CF51 +:00000001FF Added: firmware/hex/bootloader.tuxrf.hex =================================================================== --- firmware/hex/bootloader.tuxrf.hex (rev 0) +++ firmware/hex/bootloader.tuxrf.hex 2008-08-07 07:50:32 UTC (rev 1449) @@ -0,0 +1,129 @@ +:2000000021C03AC039C038C037C036C0DDC134C033C032C031C012C52FC02EC02DC02CC032 +:200020002BC02AC0C5C693C6B2C626C025C024C023C022C060C524C545C55DC564C5B3C540 +:20004000C2C5D6C511241FBECFEFD2E0DEBFCDBF11E0A0E0B1E0E8E6FEE002C005900D922F +:20006000A030B107D9F711E0A0E0B1E001C01D92A030B107E1F701C0C3CFCDEFD2E0DEBFF8 +:20008000CDBF14BE88E10FB6F89480936000109260000FBE579A1A82198289819A818F5FCB +:2000A0009F4F31F089819A8101969A838983F5CF4E9901C02AC799D1A7D17894A0E0B0E0F1 +:2000C000CBD6802D992780939101809191018F3F19F485E08093910115D25F9A41E18091D2 +:2000E000AC018823E1F31092AC011092AD011092DF0190E04093DE019093DD011A9BFECF0E +:20010000409A1A99FECF83E184B980E48CBD1DBC0DB40EB440988091E501882309F445C05F +:200120001092E5018091E701882349F11092E7018091020180FF0CC08091020182FF2BC0F0 +:200140008091020181FF23C08091DF0182600BC08091020181FF17C08091020182FF1FC0AB +:200160008091DF0181608093DF018091DF0184608093DF0192E882E28093DE0118C0809139 +:20018000020180FF08C08091020182FF0EC08091DF01826007C08091020181FF06C08091AD +:2001A000DF0181608093DF0192E04093DE018091E601882341F01092E60198608091DF0121 +:2001C00088608093DF018091E801882331F098608091DF0180618093DF019EBD429A0DB4C9 +:2001E00007FEFDCF1A99A3C042988091AD01873198F48091DC01882339F08091AD01E82FA3 +:20020000FF27E255FE4F06C08091AD01E82FFF27EB53FE4F8EB580838091AD018F5F8093E1 +:20022000AD019091DD01992309F043C08091DF0182FF1CC08091DF0180FF0CC08091AD0110 +:20024000823120F18091AD01E82FFF27E850FF4F808123C08091AD01823160F08091AD01F3 +:20026000E82FFF27E050FF4F878517C08091DF0180FF08C08091AD01E82FFF27E050FF4F2E +:2002800081850BC08091DF0181FF09C08091AD01E82FFF27E050FF4F80A18EBD01C09EBD51 +:2002A0009091AD018091DE01981709F03FC081E03BC08091DD01813031F58091DF0183FF43 +:2002C00014C08091DF0182FF07C08091AD01E82FFF27ED51FF4F06C08091AD01E82FFF27C7 +:2002E000EC50FF4F80818EBD01C01EBC8091AD01282F33278091DE01992704962817390754 +:20030000A9F482E011C08091DD01823081F48091E8019091E401892B8EBD8091E80181304D +:2003200011F01092E80183E08093DD01429A0DB407FEFDCF8091DD01833009F053CF4298D8 +:200340008091AD018731A0F58091DC018823B9F08091AD01E82FFF27E255FE4F8EB5808389 +:200360008091AE0183FF24C0A0EEB1E0E0ECF1E094E081918D93915097FFFBCF16C08091CD +:20038000AD01E82FFF27EB53FE4F8EB580838091C50183FF0DC0A0EEB1E0E7EDF1E094E043 +:2003A00081918D93915097FFFBCF80E88093E40190E08091DC01882309F491E09093DC01F3 +:2003C0001CBC83E084B98BCE1F920F920FB60F9211248F93809160008F7B809360008F912F +:2003E0000F900FBE0F901F90189590E395B983E084B998B98FE087B980E48BB986EA8AB9DA +:2004000085E08093C40008958DB78095E0E0F1E02FEF32E0281B3109E217F30710F41192D2 +:20042000FBCF109290011092A60181E08093A7011092AC011092DC011092E5011092E6017B +:200440001092E7011092E8011092E9011092EA011092850196E3909381019093820190935F +:20046000830125E52093420180914201809341018091410180934001209345018091450158 +:200480008093440180914401809343018FEF8093470180914701809346018091870180931F +:2004A00048019093490190934A0190934B0187E080934C0182E080934D0110924E0120937B +:2004C0004F0120935001209351010FD0089520E0281750F49FE00000000000000000915064 +:2004E00097FFF9CF2F5FF4CF0895ECE4F1E020E090914C01923020F0819128279150FACFC4 +:20050000208308950F931F93CF9300E0009387014AD284E0DCDF80918701815E809387019C +:2005200080918701853610F010928701809187018093800160E0809187013ED2549885E2D4 +:20054000C6DF5D9A85E0C3DF10928D011092C00080E98093C10086E48093C200E8D380911E +:200560008C018F3F89F5C0918D01CC2369F510910101113049F55AD2C0938C0180918601B0 +:20058000806880938601209184003091850080918E0190918F01281B390B83E0220F331FA0 +:2005A0008A95E1F78AE094E0821B930B9093890080938800AFD380910301809382018093A4 +:2005C0004A0134D2012F07C08091840090918500815C984A20F21092C200002309F498CFDC +:2005E000809190018823E1F3109290018091010180FFF6CF8091010182FFF2CF80914D019C +:20060000846080934D0171DF809190018823E1F3109290018091010180FFF6CF8091010187 +:2006200082FFF2CF84E380934C019FEFE2E5F1E083E09193815087FFFCCF95E5E6E5F1E0CC +:2006400088E29193815087FFFCCF4FDF80918601806180938601CF911F910F91089580914B +:20066000860185FF54C180919001882339F18091010183FF23C01092900180910301809310 +:20068000AA01809104018093AB018091AA018431A8F48091AB018F3588F48091AA019091F3 +:2006A000AB01890F90910501891741F480914D01806180934D0180E28093A70180914E01DC +:2006C00080FF31C080914E0182FF04C084E080934E0102C010924E018091DC01882381F47E +:2006E0008091AE0181FF50C0AFEAB1E0E1E4F1E090E18D91858B9150319697FFFACF0FC075 +:200700008091C50181FF40C0A6ECB1E0E1E4F1E090E18D91858B9150319697FFFACF809112 +:200720004E0182602FC080914E0181FF02C083E001C081E080934E018091DC01882381F402 +:200740008091AE0181FF20C0AFEAB1E0E1E4F1E090E18D9184A79150319697FFFACF0FC029 +:200760008091C50181FF10C0A6ECB1E0E1E4F1E090E18D9184A79150319697FFFACF8091C7 +:200780004E01846080934E018091850187FF81C080918501803841F52091E801222321F5EC +:2007A0008091F00E809352019091F10E892F807E809353019F7180915301892B80935301F7 +:2007C0008091F20E809354018091F30E8093550180914E01886080934E012093E90181E07D +:2007E0008093E80181E827C080918501813831F52091E801222311F58091F40E80935201D9 +:200800008091F50E9091F60E892F9927809353018091F50E809354018091F70E80935501C5 +:2008200080914E01886080934E012093E90181E08093E80182E88093850149C08091850171 +:20084000823809F044C02091E801222309F03FC08091F80E809352018091F90E9091FA0E4C +:20086000892F9927809353018091F90E809354018091FB0E8093550180914E01886080933B +:200880004E012093E90181E08093E801209385011EC08091E4018823D1F08091E8018823F1 +:2008A000B1F48093E401A0EEB1E0E2E5F1E093E08D918193915097FFFBCF80914E018860B6 +:2008C00080934E011092E90181E08093E8018091E801813091F48091E901893121F483E070 +:2008E0008093E8010AC080914E01886080934E018091E9018F5F8093E9018091EA018823FB +:2009000089F180914E01806880934E012BC08091A70181FF10C080919001882309F442C073 +:2009200010929001809105018F5F8093A80184E08093A70108958091A70182FF15C08091E7 +:20094000A8018F5F8093A8018091A80184FF2AC08091860180628093860180914D018F7E9D +:2009600080934D01C2DD08958091A70180FF1AC08091010183FF16C0E0E0F1E0A2E9B1E0B0 +:2009800093E186818D939150319697FFFACF80914D01806180934D01A8DD1092900182E0FA +:2009A0008093A7010895299A5A9A419A5D9828985C985998549A0895982F299A59985C98B9 +:2009C000419834E360FF0BC080919101880F80939101309191013167892F855E0FC0892F11 +:2009E000845E20EA98E05C9827FF02C0599A01C05998220F5C9A915097FFF5CF8068232F76 +:200A00003327322F2227280F311D9FE05C9837FF02C0599A01C05998220F331F5C9A9150E3 +:200A200097FFF4CF5C985998419A08955D98289829985A9841985C98599808951F920F92EB +:200A40000FB60F9211242F933F934F935F936F937F938F939F93AF93BF93CF93EF93FF9321 +:200A6000C0918801CF5F8C2F9927AA27BB27FC013197E830F10508F039C1E65EFF4F09944C +:200A800061E08091870198DF80E48093C00088E08093C100809188009091890085599E4F84 +:200AA000909389008093880080918701809348018091860184FDD3DD80914C01845F8093DD +:200AC000890114C18091880090918900805F9A4F909389008093880010928A0186E48093BB +:200AE000C200289A88E28093C10085E58093C6008093C600FBC057DF8091880090918900E4 +:200B00008B5B9F4F70C08091860185FF29C08091A601E82FFF27EE56FE4F808180938701AA +:200B20008091A6018F5F8093A6018091A601843111F51092A6018091A70185FF1CC01092DE +:200B4000A7018091AA01E82FFF27EE56FE4F8091AB01808380914D018F7E80934D010BC00B +:200B600080918701815E8093870180918701853610F01092870110928B0110928C011092E5 +:200B8000900110928D0160E08091870115DF80918800909189008C5E9E4F909389008093EE +:200BA00088005498A3C08091880090918900895A9F4F90938900809388005D9A8091870173 +:200BC0008093800193C010928D011092C00080E98093C10086E48093C20080918800909166 +:200BE00089008C599B4F90938900809388007EC01092C0001092C1001092C20017DFC0E059 +:200C000080918C018F3F09F04EC080918D01882309F049C080918E0190918F01815F9B4FFA +:200C2000909389008093880021E02093900188B198E0892788B9C093EB018091020180FFB4 +:200C400005C08091020182FD09C004C08091020181FD04C08091E701882311F02093E5011B +:200C60008091020183FF11C08091EA01882399F480910601843019F480E88093850181E09E +:200C80008093E6018093EA0106C08091EA01882311F01092EA018091020187FF20C082E085 +:200CA0008093E8011CC0809188009091890084559F4F909389008093880081E08093E701AF +:200CC0008091860184FF0BC08091EB018F5F8093EB018091EB018F3F11F45F98B0D08091EC +:200CE000860185FF03C081E08093AC01C0938801FF91EF91CF91BF91AF919F918F917F91C9 +:200D00006F915F914F913F912F910F900FBE0F901F9018951092850010928400109280009D +:200D200082E08093810080936F0086BB08951092850010928400109280001092820082E068 +:200D400086BB10926F0083E0809381000895DEBBDFB7DABDCBBDD1E0C0918A01C05CD8815D +:200D6000D093C600CF53C0938A01C83009F42998D0918901DC1731F4D0E4D093C000D8E4FE +:200D8000D093C100CBB5DAB5DFBFDEB31895DEBBDFB7DABDD0E0D093C000D093C100D09324 +:200DA000C2005A9828984198DAB5DFBFDEB318959EBBEABDFBBDFFB7F8BD90918C019430E6 +:200DC000B1F0E0E8F1E0E90FF081E091C600FE1771F5939590938C01943059F5E0918400DF +:200DE000E0938E01E0918500E0938F0122C09091C600F1E0E0918B019083E395EF73E09301 +:200E00008B01F0918D01F927F0938D01909100019E1779F49FEF90938C0190E09093C10030 +:200E20009093C2005A985D984198299802C010928C01F8B5FFBFFBB5EAB59EB31895A89566 +:200E400088E190E028E00FB6F894A895809360000FBE20936000FFCFF999FECFB2BDA1BDD6 +:200E6000F89A119600B40895FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00 +:200E80000FEFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF72 +:200EA0000FEFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF52 +:200EC0000FEFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF32 +:200EE0000FEFFFFFFFFFFFFFFFFFFFFFFFFFFFFFC8020300C9EEFF00CA000000FFFFFFFFB9 +:200F00008091BC008823E4F7089500E010E068018DE38093B80084E68093BA0084EC8093B3 +:200F2000BC00EEDF8091B900887F803609F0FFCF84EC8093BC00E4DF8091B900887F80384F +:200F400009F0FFCF8091BB00182F84EC8093BC00D7DF8091B900887F803809F0FFCF809161 +:200F6000BB00082FC8018F739070892B09F0FFCF8FE00030180708F0FFCFE80184EC809349 +:200F8000BC00EE24FF248FE3B82EBADF8091B900887F803891F4E0FC04C08091BB00C82EFF +:200FA0000DC08091BB00D82E81E00601FE0180935700E8951124229601C0FFCF84EC809345 +:200FC000BC00BA940894E11CF11CB7FEDECF98DF8091B900887F803A09F0FFCF84EC8093B3 +:180FE000BC0083E0F80180935700E89585E0F80180935700E89595CF51 +:00000001FF |
From: jaguarondi <c2m...@c2...> - 2008-08-04 10:08:59
|
Author: jaguarondi Date: 2008-08-04 12:09:02 +0200 (Mon, 04 Aug 2008) New Revision: 1448 Modified: firmware/tuxaudio/branches/new_rf/init.c firmware/tuxaudio/branches/new_rf/main.c firmware/tuxaudio/branches/new_rf/varis.c firmware/tuxaudio/branches/new_rf/varis.h Log: * Added a timer (2) for sending the sensors status instead of the audio timer. Modified: firmware/tuxaudio/branches/new_rf/init.c =================================================================== --- firmware/tuxaudio/branches/new_rf/init.c 2008-08-03 14:25:41 UTC (rev 1447) +++ firmware/tuxaudio/branches/new_rf/init.c 2008-08-04 10:09:02 UTC (rev 1448) @@ -101,25 +101,18 @@ OCR1BH = 0x00; OCR1BL = 0x00; - // Timer/Counter 2 initialization - // Clock source: System Clock - // Clock value: Timer 2 Stopped - // Mode: Normal top=FFh - // OC2A output: Disconnected - // OC2B output: Disconnected - ASSR = 0x00; + /* Timer/Counter 2 initialization + * Clock source: System Clock/1024 + * Mode: Normal (top=FFh) */ TCCR2A = 0x00; - TCCR2B = 0x00; - TCNT2 = 0x00; - OCR2A = 0x00; - OCR2B = 0x00; + TCCR2B = _BV(CS22) | _BV(CS21) | _BV(CS20); // Timer/Counter 0 Interrupt(s) initialization TIMSK0 = 0x01; // Timer/Counter 1 Interrupt(s) initialization TIMSK1 = 0x00; // Timer/Counter 2 Interrupt(s) initialization - TIMSK2 = 0x00; + TIMSK2 = _BV(TOIE2); // Analog Comparator initialization // Analog Comparator: Off Modified: firmware/tuxaudio/branches/new_rf/main.c =================================================================== --- firmware/tuxaudio/branches/new_rf/main.c 2008-08-03 14:25:41 UTC (rev 1447) +++ firmware/tuxaudio/branches/new_rf/main.c 2008-08-04 10:09:02 UTC (rev 1448) @@ -81,6 +81,8 @@ /* Set when sleep should be entered */ static uint8_t pre_sleep_delay = 0; +/* When sensor values should be sent to the computer */ +static bool send_sensors_flag; ISR(SIG_PIN_CHANGE1) { @@ -222,9 +224,9 @@ /*sleep();*/ /*}*/ - if (sendSensorsFlag) + if (send_sensors_flag) { - sendSensorsFlag = 0; + send_sensors_flag = false; if (pre_sleep_delay > 1) /* There's a delay before the sleep function is actually called * otherwise other commands on the stack can't be executed */ @@ -265,6 +267,14 @@ } } +/* Timer 2 interrupt, used as main tick for sending sensor values. + * clk = 8MHz/1024, + * ISR each 256*1024/8e6 = 33ms */ +ISR(SIG_OVERFLOW2) +{ + send_sensors_flag = true; +} + //static inline void audio_sampling(void) __attribute__ ( ( always_inline ) ); //void audio_sampling(void) __attribute__ ( ( signal ) ); //void audio_sampling(void) @@ -322,7 +332,7 @@ /* send status to the behavioural CPU, 8KHz divided by 256 lead to a * status sent each 32ms */ //if (--sendSensorsCmpt == 0) - //sendSensorsFlag = 1; + //send_sensors_flag = 1; ////asm volatile ( ////"pop r25 \n" ////"pop r23 \n" @@ -342,8 +352,6 @@ /* Microphone at 8kHz */ FifoPut_inl(ADCFifo, ADCH); ADCSRA |= 0x40; - if (--sendSensorsCmpt == 0) - sendSensorsFlag = 1; } // XXX DEBUG: used to generate a saw waveform @@ -363,7 +371,7 @@ * Timer 0 overflow interrupt service routine (PWM) * 32KHz timer so the ISR is called each 31.25us */ -#if 0 +#if 1 ISR(SIG_OVERFLOW0) { /* timer 0 is clocked at 32KHz so we divide it by 4 to get 8KHz */ @@ -375,7 +383,7 @@ } #endif -#if 1 +#if 0 ISR(SIG_OVERFLOW0) __attribute__((naked)); ISR(SIG_OVERFLOW0) { Modified: firmware/tuxaudio/branches/new_rf/varis.c =================================================================== --- firmware/tuxaudio/branches/new_rf/varis.c 2008-08-03 14:25:41 UTC (rev 1447) +++ firmware/tuxaudio/branches/new_rf/varis.c 2008-08-04 10:09:02 UTC (rev 1448) @@ -61,7 +61,6 @@ volatile unsigned char audioLevel; uint8_t soundToPlay; -unsigned char sendSensorsCmpt, sendSensorsFlag; unsigned char audio_level, battery_level; uint8_t power_on_reset_delay = 20; Modified: firmware/tuxaudio/branches/new_rf/varis.h =================================================================== --- firmware/tuxaudio/branches/new_rf/varis.h 2008-08-03 14:25:41 UTC (rev 1447) +++ firmware/tuxaudio/branches/new_rf/varis.h 2008-08-04 10:09:02 UTC (rev 1448) @@ -70,7 +70,6 @@ extern volatile unsigned char audioLevel; extern uint8_t soundToPlay; -extern unsigned char sendSensorsCmpt, sendSensorsFlag; extern unsigned char audio_level, battery_level; extern uint8_t power_on_reset_delay; |
From: remi <c2m...@c2...> - 2008-08-03 14:25:44
|
Author: remi Date: 2008-08-03 16:25:41 +0200 (Sun, 03 Aug 2008) New Revision: 1447 Modified: software_suite_v2/tuxware/tuxhttpserver/trunk/src/installer.nsi Log: * updated the installer Modified: software_suite_v2/tuxware/tuxhttpserver/trunk/src/installer.nsi =================================================================== --- software_suite_v2/tuxware/tuxhttpserver/trunk/src/installer.nsi 2008-08-02 11:15:31 UTC (rev 1446) +++ software_suite_v2/tuxware/tuxhttpserver/trunk/src/installer.nsi 2008-08-03 14:25:41 UTC (rev 1447) @@ -34,7 +34,9 @@ SectionIn RO ; Stop tuxhttpserver - ExecDos::exec "c:\tuxdroid\bin\tuxhttpservice_uninstall.bat" + ExecDos::exec /NOUNLOAD /ASYNC /TIMEOUT=5000 "c:\tuxdroid\bin\tuxhttpservice_uninstall.bat" + Pop $0 + ExecDos::wait $0 SectionEnd ; ----------------------------------------------------------------------------- @@ -103,7 +105,9 @@ ; ----------------------------------------------------------------------------- Section -Post ; Install the server as service - ExecDos::exec "c:\tuxdroid\bin\tuxhttpservice_install.bat" + ExecDos::exec /NOUNLOAD /ASYNC /TIMEOUT=5000 "c:\tuxdroid\bin\tuxhttpservice_install.bat" + Pop $0 + ExecDos::wait $0 ; Quit the installer Quit @@ -114,7 +118,9 @@ ; ----------------------------------------------------------------------------- Section "Uninstall" ; Uninstall the server as service - ExecDos::exec "c:\tuxdroid\bin\tuxhttpservice_uninstall.bat" + ExecDos::exec /NOUNLOAD /ASYNC /TIMEOUT=5000 "c:\tuxdroid\bin\tuxhttpservice_uninstall.bat" + Pop $0 + ExecDos::wait $0 ; Remove registry keys DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\TuxHTTPServer" |
From: ulhume <c2m...@c2...> - 2008-08-02 11:15:21
|
Author: ulhume Date: 2008-08-02 13:15:31 +0200 (Sat, 02 Aug 2008) New Revision: 1446 Modified: software_suite_v2/software/gadgets/tuxdroid-gadget-weather/trunk/tuxdroid-gadget-weather/sources/net/karmaLab/tuxDroid/gadgets/WeatherGadget.java Log: Removed deprecated call Modified: software_suite_v2/software/gadgets/tuxdroid-gadget-weather/trunk/tuxdroid-gadget-weather/sources/net/karmaLab/tuxDroid/gadgets/WeatherGadget.java =================================================================== --- software_suite_v2/software/gadgets/tuxdroid-gadget-weather/trunk/tuxdroid-gadget-weather/sources/net/karmaLab/tuxDroid/gadgets/WeatherGadget.java 2008-08-02 11:15:10 UTC (rev 1445) +++ software_suite_v2/software/gadgets/tuxdroid-gadget-weather/trunk/tuxdroid-gadget-weather/sources/net/karmaLab/tuxDroid/gadgets/WeatherGadget.java 2008-08-02 11:15:31 UTC (rev 1446) @@ -69,7 +69,7 @@ } public static void main(String[] args) throws Exception { - new WeatherGadget().boot(new Configuration()); + new WeatherGadget().boot(args, new Configuration()); } private String getData(Element node, String label) { |
From: ulhume <c2m...@c2...> - 2008-08-02 11:15:00
|
Author: ulhume Date: 2008-08-02 13:15:10 +0200 (Sat, 02 Aug 2008) New Revision: 1445 Modified: software_suite_v2/software/tools/tuxdroid-gadget-tester/trunk/tuxdroid-gadget-tester/sources/com/kysoh/tuxdroid/gadget/framework/tester/GadgetPanel.java Log: Modified to handle multiple command for a gadget. Modified: software_suite_v2/software/tools/tuxdroid-gadget-tester/trunk/tuxdroid-gadget-tester/sources/com/kysoh/tuxdroid/gadget/framework/tester/GadgetPanel.java =================================================================== --- software_suite_v2/software/tools/tuxdroid-gadget-tester/trunk/tuxdroid-gadget-tester/sources/com/kysoh/tuxdroid/gadget/framework/tester/GadgetPanel.java 2008-08-02 11:14:45 UTC (rev 1444) +++ software_suite_v2/software/tools/tuxdroid-gadget-tester/trunk/tuxdroid-gadget-tester/sources/com/kysoh/tuxdroid/gadget/framework/tester/GadgetPanel.java 2008-08-02 11:15:10 UTC (rev 1445) @@ -50,16 +50,19 @@ public class GadgetPanel extends JPanel { - public class StartAction extends TreeActionItem { + public class GadgetCommandAction extends TreeActionItem { + private final GadgetToken command; + @Override public void actionPerformed(ActionEvent e) { GadgetInstance instance = gadget.create(); - instance.start(gadgetParametersEditor.getValues()); + instance.start(command, gadgetParametersEditor.getValues()); } - public StartAction() { - super("start"); + public GadgetCommandAction(GadgetToken token) { + super(token.getDescription()); + this.command = token; } } @@ -107,20 +110,6 @@ } } - public class CommandInstanceAction extends InstanceAction { - private final GadgetToken token; - - @Override - public void actionPerformed(ActionEvent e) { - getInstance().sendCommand(token.getName()); - } - - public CommandInstanceAction(GadgetInstance instance, GadgetToken token) { - super(token.getName(), instance); - this.token = token; - } - } - private static class TreeActionItem extends AbstractAction { public TreeActionItem(String label) { super(label); @@ -248,9 +237,7 @@ public void starting(GadgetInstance instance) { TreeActionItem item = new InstanceAction("Instance #" + instance.getId(), instance); item.getActions().add(new AbortInstanceAction(instance)); - for (GadgetToken token : gadget.getCommands()) { - item.getActions().add(new CommandInstanceAction(instance, token)); - } + actionsRoot.getActions().add(item); ((ActionsListModel) actionsTree.getModel()).update(); } @@ -296,7 +283,9 @@ // Actions actionsRoot = new TreeActionItem(gadget.getDescription().getName()); - actionsRoot.getActions().add(new StartAction()); + for (GadgetToken token : gadget.getCommands()) { + actionsRoot.getActions().add(new GadgetCommandAction(token)); + } actionsRoot.getActions().add(new StopAllAction()); actionsTree = new JTree(new ActionsListModel()); actionsTree.addMouseListener(new ActionTreeMouseObserver()); @@ -356,7 +345,6 @@ console.append(" " + description.getName() + " v" + description.getVersion() + " [" + description.getAuthor() + "]"); console.append(" " + description.getDescription()); console.append(" UUID : " + description.getUuid()); - console.append(" execution : " + description.getExecutionMode()); console.append(" WorkingPath : " + gadget.getInterpreter().getWorkingPath()); console.append(" iconFile : " + description.getIconFile()); console.append(" HelpFile : " + gadget.getHelpFile()); |
From: ulhume <c2m...@c2...> - 2008-08-02 11:14:39
|
Author: ulhume Date: 2008-08-02 13:14:45 +0200 (Sat, 02 Aug 2008) New Revision: 1444 Modified: software_suite_v2/software/gadgets/tuxdroid-gadget-mpd/trunk/tuxdroid-gadget-mpd/gadgets.xml software_suite_v2/software/gadgets/tuxdroid-gadget-mpd/trunk/tuxdroid-gadget-mpd/sources/net/karmaLab/tuxDroid/gadgets/MPDGadget.java Log: removed service behavior removed deprecated calls Modified: software_suite_v2/software/gadgets/tuxdroid-gadget-mpd/trunk/tuxdroid-gadget-mpd/gadgets.xml =================================================================== --- software_suite_v2/software/gadgets/tuxdroid-gadget-mpd/trunk/tuxdroid-gadget-mpd/gadgets.xml 2008-08-02 11:14:20 UTC (rev 1443) +++ software_suite_v2/software/gadgets/tuxdroid-gadget-mpd/trunk/tuxdroid-gadget-mpd/gadgets.xml 2008-08-02 11:14:45 UTC (rev 1444) @@ -10,7 +10,6 @@ <author>Y. Brault (C) http://artisan.karma-lab.net 2008</author> <version>1.0</version> <iconFile>resources/MPDGadget.png</iconFile> - <executionMode>service</executionMode> <uuid>f63af23e-7ae0-4389-b89b-bc5a8185b0b4</uuid> </description> <parameters> @@ -25,5 +24,9 @@ type="integer" defaultValue="6600" /> </parameters> + <commands> + <command name="play" description="Play"/> + <command name="stop" description="Stop playing"/> + </commands> </gadget> </gadgets> \ No newline at end of file Modified: software_suite_v2/software/gadgets/tuxdroid-gadget-mpd/trunk/tuxdroid-gadget-mpd/sources/net/karmaLab/tuxDroid/gadgets/MPDGadget.java =================================================================== --- software_suite_v2/software/gadgets/tuxdroid-gadget-mpd/trunk/tuxdroid-gadget-mpd/sources/net/karmaLab/tuxDroid/gadgets/MPDGadget.java 2008-08-02 11:14:20 UTC (rev 1443) +++ software_suite_v2/software/gadgets/tuxdroid-gadget-mpd/trunk/tuxdroid-gadget-mpd/sources/net/karmaLab/tuxDroid/gadgets/MPDGadget.java 2008-08-02 11:14:45 UTC (rev 1444) @@ -22,9 +22,6 @@ package net.karmaLab.tuxDroid.gadgets; -import java.io.BufferedReader; -import java.io.InputStreamReader; - import org.bff.javampd.MPD; import org.bff.javampd.MPDPlayer; @@ -62,28 +59,21 @@ } public static void main(String[] args) throws Exception { - new MPDGadget().boot(new Configuration()); + new MPDGadget().boot(args, new Configuration()); } @Override public void start() throws SimpleGadgetException { try { + throwTrace("Command : " + getCommand()); + throwTrace(configuration().host + ":" + configuration().port); MPD mpd = new MPD(configuration().host, configuration().port); MPDPlayer client = mpd.getMPDPlayer(); - throwTrace(configuration().host + ":" + configuration().port); - BufferedReader reader = new BufferedReader(new InputStreamReader(System.in)); - while (true) { - throwTrace("Waiting for command"); - String command = reader.readLine(); - throwTrace("New command " + command); - if (command.equals("play")) { - client.play(); - } else if (command.equals("stop")) { - client.stop(); - } else if (command.equals("quit")) { - System.exit(0); - } + if (getCommand().equals("play")) { + client.play(); + } else if (getCommand().equals("stop")) { + client.stop(); } } catch (Exception e) { |
From: ulhume <c2m...@c2...> - 2008-08-02 11:14:10
|
Author: ulhume Date: 2008-08-02 13:14:20 +0200 (Sat, 02 Aug 2008) New Revision: 1443 Removed: software_suite_v2/software/gadgets/DemosGadgets/tuxdroid-gadget-java-samples/trunk/tuxdroid-gadget-java-samples/sources/net/karmaLab/tuxDroid/gadgets/DeprecatedHelloWorldGadget.java Modified: software_suite_v2/software/gadgets/DemosGadgets/tuxdroid-gadget-java-samples/trunk/tuxdroid-gadget-java-samples/sources/net/karmaLab/tuxDroid/gadgets/HelloWorldGadget.java Log: Removed deprecated call Deleted: software_suite_v2/software/gadgets/DemosGadgets/tuxdroid-gadget-java-samples/trunk/tuxdroid-gadget-java-samples/sources/net/karmaLab/tuxDroid/gadgets/DeprecatedHelloWorldGadget.java =================================================================== --- software_suite_v2/software/gadgets/DemosGadgets/tuxdroid-gadget-java-samples/trunk/tuxdroid-gadget-java-samples/sources/net/karmaLab/tuxDroid/gadgets/DeprecatedHelloWorldGadget.java 2008-08-02 11:13:50 UTC (rev 1442) +++ software_suite_v2/software/gadgets/DemosGadgets/tuxdroid-gadget-java-samples/trunk/tuxdroid-gadget-java-samples/sources/net/karmaLab/tuxDroid/gadgets/DeprecatedHelloWorldGadget.java 2008-08-02 11:14:20 UTC (rev 1443) @@ -1,106 +0,0 @@ -/* This file is part of "TuxDroid Gadget Java API Samples". - * Copyright 2008, kysoh - * Author : Yoran Brault - * eMail : software@_bad_karma-lab.net (remove _bad_ before sending an email) - * Site : http://www.kysoh.com/ - * - * "TuxDroid Gadget Java API Samples" 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.1 of - * the License, or (at your option) any later version. - * - * "TuxDroid Gadget Java API Samples" 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 "TuxDroid Gadget Java API Samples"; if not, write to the Free - * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA - * 02110-1301 USA, or see the FSF site: http://www.fsf.org. - */ - -package net.karmaLab.tuxDroid.gadgets; - -import java.io.IOException; - -import com.kysoh.tuxdroid.gadget.framework.gadget.SimpleGadget; -import com.kysoh.tuxdroid.gadget.framework.gadget.SimpleGadgetConfiguration; - -/** - * Simple Hello World gadget. - * - * @author Yoran Brault - */ -public class DeprecatedHelloWorldGadget extends SimpleGadget { - - /** - * This is the storage of our gadget. This configuration is dynamicaly - * binded to instance parameters from the control center. You should make it - * as a plain JavaBean with private fields, getters AND setters in order to - * have a working binding. - */ - public static class Configuration extends SimpleGadgetConfiguration { - private String message = "I'm a verrry simple gadget !!"; - - /** - * Message value. - * - * @return the message - */ - public String getMessage() { - return message; - } - - /** - * Change the message to notify after the "Hello" - * - * @param message - * the message to set - */ - public void setMessage(String message) { - this.message = message; - } - - } - - /** - * The main class is here to boot the gadget. You can use this in a - * stand-alone version too. - * - * @param args - * @throws InterruptedException - * @throws IOException - */ - public static void main(String[] args) throws InterruptedException, IOException { - new DeprecatedHelloWorldGadget().boot(); - } - - /** - * This field host our configuration. - */ - private Configuration configuration; - - /** - * This method should be overiden in order to give a feature to the gadget. - * You should leave this as soon as possible !! - * - * @see com.kysoh.tuxdroid.gadget.framework.gadget.SimpleGadget#start() - */ - @Override - public void start() { - speak("Hello World : " + configuration.getMessage()); - } - - /** - * This method should be overiden in order to initialize the gadget. Don't - * call any ancester method except the setConfguration method - * - * @see com.kysoh.tuxdroid.gadget.framework.gadget.SimpleGadget#start() - */ - @Override - protected void initialize() { - configuration = new Configuration(); - setConfiguration(configuration); - } -} Modified: software_suite_v2/software/gadgets/DemosGadgets/tuxdroid-gadget-java-samples/trunk/tuxdroid-gadget-java-samples/sources/net/karmaLab/tuxDroid/gadgets/HelloWorldGadget.java =================================================================== --- software_suite_v2/software/gadgets/DemosGadgets/tuxdroid-gadget-java-samples/trunk/tuxdroid-gadget-java-samples/sources/net/karmaLab/tuxDroid/gadgets/HelloWorldGadget.java 2008-08-02 11:13:50 UTC (rev 1442) +++ software_suite_v2/software/gadgets/DemosGadgets/tuxdroid-gadget-java-samples/trunk/tuxdroid-gadget-java-samples/sources/net/karmaLab/tuxDroid/gadgets/HelloWorldGadget.java 2008-08-02 11:14:20 UTC (rev 1443) @@ -73,7 +73,7 @@ * @throws IOException */ public static void main(String[] args) throws InterruptedException, IOException { - new HelloWorldGadget().boot(new Configuration()); + new HelloWorldGadget().boot(args, new Configuration()); } /** |
From: ulhume <c2m...@c2...> - 2008-08-02 11:13:42
|
Author: ulhume Date: 2008-08-02 13:13:50 +0200 (Sat, 02 Aug 2008) New Revision: 1442 Modified: software_suite_v2/software/gadgets/tuxdroid-gadget-feed/trunk/tuxdroid-gadget-feed/sources/net/karmaLab/tuxDroid/gadgets/FeedGadget.java Log: Removed deprecated call Modified: software_suite_v2/software/gadgets/tuxdroid-gadget-feed/trunk/tuxdroid-gadget-feed/sources/net/karmaLab/tuxDroid/gadgets/FeedGadget.java =================================================================== --- software_suite_v2/software/gadgets/tuxdroid-gadget-feed/trunk/tuxdroid-gadget-feed/sources/net/karmaLab/tuxDroid/gadgets/FeedGadget.java 2008-08-02 11:13:40 UTC (rev 1441) +++ software_suite_v2/software/gadgets/tuxdroid-gadget-feed/trunk/tuxdroid-gadget-feed/sources/net/karmaLab/tuxDroid/gadgets/FeedGadget.java 2008-08-02 11:13:50 UTC (rev 1442) @@ -100,7 +100,7 @@ } public static void main(String[] args) throws Exception { - new FeedGadget().boot(new Configuration()); + new FeedGadget().boot(args, new Configuration()); } @Override |
From: ulhume <c2m...@c2...> - 2008-08-02 11:13:30
|
Author: ulhume Date: 2008-08-02 13:13:40 +0200 (Sat, 02 Aug 2008) New Revision: 1441 Modified: software_suite_v2/software/gadgets/tuxdroid-gadget-clock/trunk/tuxdroid-gadget-clock/sources/net/karmaLab/tuxDroid/gadgets/ClockGadget.java Log: Removed deprecated call Modified: software_suite_v2/software/gadgets/tuxdroid-gadget-clock/trunk/tuxdroid-gadget-clock/sources/net/karmaLab/tuxDroid/gadgets/ClockGadget.java =================================================================== --- software_suite_v2/software/gadgets/tuxdroid-gadget-clock/trunk/tuxdroid-gadget-clock/sources/net/karmaLab/tuxDroid/gadgets/ClockGadget.java 2008-08-02 11:12:56 UTC (rev 1440) +++ software_suite_v2/software/gadgets/tuxdroid-gadget-clock/trunk/tuxdroid-gadget-clock/sources/net/karmaLab/tuxDroid/gadgets/ClockGadget.java 2008-08-02 11:13:40 UTC (rev 1441) @@ -31,7 +31,7 @@ public class ClockGadget extends SimpleGadget<SimpleGadgetConfiguration> { public static void main(String[] args) throws Exception { - new ClockGadget().boot(new SimpleGadgetConfiguration()); + new ClockGadget().boot(args, new SimpleGadgetConfiguration()); } private final Calendar calendar = new GregorianCalendar(); |
From: ulhume <c2m...@c2...> - 2008-08-02 11:13:03
|
Author: ulhume Date: 2008-08-02 13:12:56 +0200 (Sat, 02 Aug 2008) New Revision: 1440 Removed: software_suite_v2/software/tuxdroid-gadget-framework/trunk/tuxdroid-gadget-framework/sources/com/kysoh/tuxdroid/gadget/framework/container/GadgetExecutionMode.java Modified: software_suite_v2/software/tuxdroid-gadget-framework/trunk/tuxdroid-gadget-framework/sources/com/kysoh/tuxdroid/gadget/framework/container/GadgetDescription.java software_suite_v2/software/tuxdroid-gadget-framework/trunk/tuxdroid-gadget-framework/sources/com/kysoh/tuxdroid/gadget/framework/container/GadgetInstance.java software_suite_v2/software/tuxdroid-gadget-framework/trunk/tuxdroid-gadget-framework/sources/com/kysoh/tuxdroid/gadget/framework/container/GadgetsContainer.java software_suite_v2/software/tuxdroid-gadget-framework/trunk/tuxdroid-gadget-framework/sources/com/kysoh/tuxdroid/gadget/framework/container/interpreters/GadgetInterpreter.java software_suite_v2/software/tuxdroid-gadget-framework/trunk/tuxdroid-gadget-framework/sources/com/kysoh/tuxdroid/gadget/framework/gadget/SimpleGadget.java Log: Added multi command support Removed "service" mode. Each gadget should now hold there own instance Modified: software_suite_v2/software/tuxdroid-gadget-framework/trunk/tuxdroid-gadget-framework/sources/com/kysoh/tuxdroid/gadget/framework/container/GadgetDescription.java =================================================================== --- software_suite_v2/software/tuxdroid-gadget-framework/trunk/tuxdroid-gadget-framework/sources/com/kysoh/tuxdroid/gadget/framework/container/GadgetDescription.java 2008-08-01 10:27:21 UTC (rev 1439) +++ software_suite_v2/software/tuxdroid-gadget-framework/trunk/tuxdroid-gadget-framework/sources/com/kysoh/tuxdroid/gadget/framework/container/GadgetDescription.java 2008-08-02 11:12:56 UTC (rev 1440) @@ -31,16 +31,6 @@ private String description; private String author; private String version; - private GadgetExecutionMode executionMode; - - /** - * @param executionMode - * the executionMode to set - */ - public void setExecutionMode(GadgetExecutionMode executionMode) { - this.executionMode = executionMode; - } - private String helpFile; private String iconFile; private UUID uuid; @@ -61,13 +51,6 @@ } /** - * @return the executionMode - */ - public GadgetExecutionMode getExecutionMode() { - return executionMode; - } - - /** * @return the name */ public String getName() { Deleted: software_suite_v2/software/tuxdroid-gadget-framework/trunk/tuxdroid-gadget-framework/sources/com/kysoh/tuxdroid/gadget/framework/container/GadgetExecutionMode.java =================================================================== --- software_suite_v2/software/tuxdroid-gadget-framework/trunk/tuxdroid-gadget-framework/sources/com/kysoh/tuxdroid/gadget/framework/container/GadgetExecutionMode.java 2008-08-01 10:27:21 UTC (rev 1439) +++ software_suite_v2/software/tuxdroid-gadget-framework/trunk/tuxdroid-gadget-framework/sources/com/kysoh/tuxdroid/gadget/framework/container/GadgetExecutionMode.java 2008-08-02 11:12:56 UTC (rev 1440) @@ -1,28 +0,0 @@ -/* This file is part of "TuxDroid Gadget Framework". - * Copyright 2008, kysoh - * Author : Yoran Brault - * eMail : software@_bad_karma-lab.net (remove _bad_ before sending an email) - * Site : http://www.kysoh.com/ - * - * "TuxDroid Gadget Framework" 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.1 of - * the License, or (at your option) any later version. - * - * "TuxDroid Gadget Framework" 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 "TuxDroid Gadget Framework"; if not, write to the Free - * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA - * 02110-1301 USA, or see the FSF site: http://www.fsf.org. - */ - -package com.kysoh.tuxdroid.gadget.framework.container; - -public enum GadgetExecutionMode { - service, command, gui; - -} Modified: software_suite_v2/software/tuxdroid-gadget-framework/trunk/tuxdroid-gadget-framework/sources/com/kysoh/tuxdroid/gadget/framework/container/GadgetInstance.java =================================================================== --- software_suite_v2/software/tuxdroid-gadget-framework/trunk/tuxdroid-gadget-framework/sources/com/kysoh/tuxdroid/gadget/framework/container/GadgetInstance.java 2008-08-01 10:27:21 UTC (rev 1439) +++ software_suite_v2/software/tuxdroid-gadget-framework/trunk/tuxdroid-gadget-framework/sources/com/kysoh/tuxdroid/gadget/framework/container/GadgetInstance.java 2008-08-02 11:12:56 UTC (rev 1440) @@ -51,9 +51,11 @@ private class Worker extends Thread { private Shell shell; private final GadgetInstanceParameters values; + private final GadgetToken command; - public Worker(GadgetInstanceParameters values) { + public Worker(GadgetToken command, GadgetInstanceParameters values) { this.values = values; + this.command = command; } public void abort() { @@ -84,7 +86,7 @@ // } shell.setEnvironement(environement.toArray(new String[environement.size()])); gadget.listeners.fire().starting(GadgetInstance.this); - gadget.interpreter.run(shell); + gadget.interpreter.run(shell, command); } catch (Throwable e) { gadget.listeners.fire().errors(GadgetInstance.this, e.getMessage()); } finally { @@ -140,16 +142,17 @@ return worker == null ? -1 : worker.getId(); } - public void start(GadgetInstanceParameters values) { + public void start(GadgetToken command, GadgetInstanceParameters values) { if (worker != null) { throw new ApplicationError("This instance is already running..."); } - worker = new Worker(values); + worker = new Worker(command, values); worker.start(); } - public void sendCommand(String name) { + // Plus tard, peut-être... + private void sendCommand(String name) { System.out.println("Sending command : " + name); name += "\n"; try { Modified: software_suite_v2/software/tuxdroid-gadget-framework/trunk/tuxdroid-gadget-framework/sources/com/kysoh/tuxdroid/gadget/framework/container/GadgetsContainer.java =================================================================== --- software_suite_v2/software/tuxdroid-gadget-framework/trunk/tuxdroid-gadget-framework/sources/com/kysoh/tuxdroid/gadget/framework/container/GadgetsContainer.java 2008-08-01 10:27:21 UTC (rev 1439) +++ software_suite_v2/software/tuxdroid-gadget-framework/trunk/tuxdroid-gadget-framework/sources/com/kysoh/tuxdroid/gadget/framework/container/GadgetsContainer.java 2008-08-02 11:12:56 UTC (rev 1440) @@ -47,9 +47,6 @@ import com.kysoh.tuxdroid.gadget.framework.container.interpreters.GadgetPerlInterpreter; import com.kysoh.tuxdroid.gadget.framework.container.interpreters.GadgetPythonInterpreter; -import com.kysoh.tuxdroid.gadget.framework.container.interpreters.GadgetPerlInterpreter; -import com.kysoh.tuxdroid.gadget.framework.container.interpreters.GadgetPythonInterpreter; - public class GadgetsContainer { class AutoDeployerObserver implements AutoDeployerListener { public void deployementError(Throwable exception) { @@ -164,7 +161,6 @@ public void addGadget(File gadgetPath, Gadget gadget) throws GadgetsContainerException { GadgetDescription description = gadget.getDescription(); validate(description, "No description found for this gadget"); - validate(description.getExecutionMode(), "Execution Mode should be defined"); validate(description.getName(), "Name not defined"); validate(description.getUuid(), "UUID not defined"); validate(gadget.getInterpreter().getExecutable(), "Interpreter/Excecutable not defined"); Modified: software_suite_v2/software/tuxdroid-gadget-framework/trunk/tuxdroid-gadget-framework/sources/com/kysoh/tuxdroid/gadget/framework/container/interpreters/GadgetInterpreter.java =================================================================== --- software_suite_v2/software/tuxdroid-gadget-framework/trunk/tuxdroid-gadget-framework/sources/com/kysoh/tuxdroid/gadget/framework/container/interpreters/GadgetInterpreter.java 2008-08-01 10:27:21 UTC (rev 1439) +++ software_suite_v2/software/tuxdroid-gadget-framework/trunk/tuxdroid-gadget-framework/sources/com/kysoh/tuxdroid/gadget/framework/container/interpreters/GadgetInterpreter.java 2008-08-02 11:12:56 UTC (rev 1440) @@ -29,6 +29,8 @@ import net.karmaLab.shell.transport.ShellTransortException; import net.karmaLab.tools.SystemInformation; +import com.kysoh.tuxdroid.gadget.framework.container.GadgetToken; + abstract public class GadgetInterpreter { private String executable = ""; private String parameters = ""; @@ -62,9 +64,12 @@ return workingPath; } - public final int run(Shell shell) throws ShellTransortException { + public final int run(Shell shell, GadgetToken command) throws ShellTransortException { String commandLine = prepareCommandLine(); + if (command != null) { + commandLine += " " + command.getName(); + } CommandResult result = shell.run(commandLine); return result.exitStatus(); Modified: software_suite_v2/software/tuxdroid-gadget-framework/trunk/tuxdroid-gadget-framework/sources/com/kysoh/tuxdroid/gadget/framework/gadget/SimpleGadget.java =================================================================== --- software_suite_v2/software/tuxdroid-gadget-framework/trunk/tuxdroid-gadget-framework/sources/com/kysoh/tuxdroid/gadget/framework/gadget/SimpleGadget.java 2008-08-01 10:27:21 UTC (rev 1439) +++ software_suite_v2/software/tuxdroid-gadget-framework/trunk/tuxdroid-gadget-framework/sources/com/kysoh/tuxdroid/gadget/framework/gadget/SimpleGadget.java 2008-08-02 11:12:56 UTC (rev 1440) @@ -131,13 +131,21 @@ * * <pre> * public static void main(String[] args) throws Exception { - * new MyBeautifulGadget().boot(new MyGadgetConfiguration()); + * new MyBeautifulGadget().boot(args, new MyGadgetConfiguration()); * } * </pre> + * + * @param arguments + * command line arguments (those you get with main + * @param configuration + * a new configuration object */ @SuppressWarnings("deprecation") - protected void boot(CONFIGURATION configuration) { + protected void boot(String[] arguments, CONFIGURATION configuration) { try { + if (arguments.length > 0) { + command = arguments[0]; + } this.configuration = configuration; initialize(); loadEnvironementData(); @@ -147,7 +155,32 @@ } } + private String command = null; + /** + * @return the command + */ + protected String getCommand() { + return command; + } + + /** + * @param command + * the command to set + */ + protected void setCommand(String command) { + this.command = command; + } + + /** + * User boot with arguments instead + */ + @Deprecated + protected void boot(CONFIGURATION configuration) { + boot(new String[] {}, configuration); + } + + /** * This method is used a starting point for the gadget. The standard way to * use this adding in your inherited gadget class something like this : * |
From: remi <c2m...@c2...> - 2008-08-01 10:27:11
|
Author: remi Date: 2008-08-01 12:27:21 +0200 (Fri, 01 Aug 2008) New Revision: 1439 Modified: software_suite_v2/tuxware/tuxhttpserver/trunk/src/installer.nsi Log: * missed replacement in the next commit Modified: software_suite_v2/tuxware/tuxhttpserver/trunk/src/installer.nsi =================================================================== --- software_suite_v2/tuxware/tuxhttpserver/trunk/src/installer.nsi 2008-08-01 10:25:34 UTC (rev 1438) +++ software_suite_v2/tuxware/tuxhttpserver/trunk/src/installer.nsi 2008-08-01 10:27:21 UTC (rev 1439) @@ -33,8 +33,7 @@ ; Needed SectionIn RO - ; Stop tuxhttpserver - ;ExecWait "c:\tuxdroid\bin\tuxhttpservice_uninstall.bat" + ; Stop tuxhttpserver ExecDos::exec "c:\tuxdroid\bin\tuxhttpservice_uninstall.bat" SectionEnd @@ -104,7 +103,6 @@ ; ----------------------------------------------------------------------------- Section -Post ; Install the server as service - ;ExecWait "c:\tuxdroid\bin\tuxhttpservice_install.bat" ExecDos::exec "c:\tuxdroid\bin\tuxhttpservice_install.bat" ; Quit the installer @@ -116,7 +114,7 @@ ; ----------------------------------------------------------------------------- Section "Uninstall" ; Uninstall the server as service - ExecWait "c:\tuxdroid\bin\tuxhttpservice_uninstall.bat" + ExecDos::exec "c:\tuxdroid\bin\tuxhttpservice_uninstall.bat" ; Remove registry keys DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\TuxHTTPServer" |
From: remi <c2m...@c2...> - 2008-08-01 10:25:28
|
Author: remi Date: 2008-08-01 12:25:34 +0200 (Fri, 01 Aug 2008) New Revision: 1438 Modified: software_suite_v2/tuxware/tuxhttpserver/trunk/src/installer.nsi software_suite_v2/tuxware/tuxhttpserver/trunk/src/tuxhttpservice_install.bat software_suite_v2/tuxware/tuxhttpserver/trunk/src/tuxhttpservice_uninstall.bat Log: * updated the installer script. The service installation/uninstallation is now fully hidden Modified: software_suite_v2/tuxware/tuxhttpserver/trunk/src/installer.nsi =================================================================== --- software_suite_v2/tuxware/tuxhttpserver/trunk/src/installer.nsi 2008-08-01 09:17:29 UTC (rev 1437) +++ software_suite_v2/tuxware/tuxhttpserver/trunk/src/installer.nsi 2008-08-01 10:25:34 UTC (rev 1438) @@ -34,7 +34,8 @@ SectionIn RO ; Stop tuxhttpserver - ExecWait "c:\tuxdroid\bin\tuxhttpservice_uninstall.bat" + ;ExecWait "c:\tuxdroid\bin\tuxhttpservice_uninstall.bat" + ExecDos::exec "c:\tuxdroid\bin\tuxhttpservice_uninstall.bat" SectionEnd ; ----------------------------------------------------------------------------- @@ -103,7 +104,8 @@ ; ----------------------------------------------------------------------------- Section -Post ; Install the server as service - ExecWait "c:\tuxdroid\bin\tuxhttpservice_install.bat" + ;ExecWait "c:\tuxdroid\bin\tuxhttpservice_install.bat" + ExecDos::exec "c:\tuxdroid\bin\tuxhttpservice_install.bat" ; Quit the installer Quit Modified: software_suite_v2/tuxware/tuxhttpserver/trunk/src/tuxhttpservice_install.bat =================================================================== --- software_suite_v2/tuxware/tuxhttpserver/trunk/src/tuxhttpservice_install.bat 2008-08-01 09:17:29 UTC (rev 1437) +++ software_suite_v2/tuxware/tuxhttpserver/trunk/src/tuxhttpservice_install.bat 2008-08-01 10:25:34 UTC (rev 1438) @@ -1,2 +1,2 @@ -c:\tuxdroid\bin\tuxhttpserver\tuxhttpservice.exe /INSTALL +c:\tuxdroid\bin\tuxhttpserver\tuxhttpservice.exe /INSTALL /SILENT net start "TuxHTTPServer" \ No newline at end of file Modified: software_suite_v2/tuxware/tuxhttpserver/trunk/src/tuxhttpservice_uninstall.bat =================================================================== --- software_suite_v2/tuxware/tuxhttpserver/trunk/src/tuxhttpservice_uninstall.bat 2008-08-01 09:17:29 UTC (rev 1437) +++ software_suite_v2/tuxware/tuxhttpserver/trunk/src/tuxhttpservice_uninstall.bat 2008-08-01 10:25:34 UTC (rev 1438) @@ -1,2 +1,2 @@ net stop "TuxHTTPServer" -c:\tuxdroid\bin\tuxhttpserver\tuxhttpservice.exe /UNINSTALL \ No newline at end of file +c:\tuxdroid\bin\tuxhttpserver\tuxhttpservice.exe /UNINSTALL /SILENT \ No newline at end of file |
From: Paul_R <c2m...@c2...> - 2008-08-01 09:17:28
|
Author: Paul_R Date: 2008-08-01 11:17:29 +0200 (Fri, 01 Aug 2008) New Revision: 1437 Modified: software_suite_v2/software/tools/tuxController/trunk/src/GUI/components/advancedViewPanel.java Log: * Increase the size of an icon Modified: software_suite_v2/software/tools/tuxController/trunk/src/GUI/components/advancedViewPanel.java =================================================================== --- software_suite_v2/software/tools/tuxController/trunk/src/GUI/components/advancedViewPanel.java 2008-07-31 13:51:57 UTC (rev 1436) +++ software_suite_v2/software/tools/tuxController/trunk/src/GUI/components/advancedViewPanel.java 2008-08-01 09:17:29 UTC (rev 1437) @@ -85,7 +85,7 @@ GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0)); win.imgRFState.setIcon(win.iconRFOff); - win.imgRFState.setBounds(205, 30, 205, 20); + win.imgRFState.setBounds(205, 25, 205, 30); win.imgRFState.setText(bundle.getString("lblRFState")); win.imgRFState.setHorizontalTextPosition(SwingConstants.LEFT); win.imgRFState.setHorizontalAlignment(SwingConstants.RIGHT); |
From: remi <c2m...@c2...> - 2008-07-31 13:51:49
|
Author: remi Date: 2008-07-31 15:51:57 +0200 (Thu, 31 Jul 2008) New Revision: 1436 Modified: software_suite_v2/software/tools/attitunesStudio/trunk/src/com/tuxisalive/attitunes/format/ATTBlockParams.java Log: * fixed a little warning Modified: software_suite_v2/software/tools/attitunesStudio/trunk/src/com/tuxisalive/attitunes/format/ATTBlockParams.java =================================================================== --- software_suite_v2/software/tools/attitunesStudio/trunk/src/com/tuxisalive/attitunes/format/ATTBlockParams.java 2008-07-31 13:49:27 UTC (rev 1435) +++ software_suite_v2/software/tools/attitunesStudio/trunk/src/com/tuxisalive/attitunes/format/ATTBlockParams.java 2008-07-31 13:51:57 UTC (rev 1436) @@ -576,6 +576,7 @@ * @param struct * @return */ + @SuppressWarnings("unchecked") public static Hashtable<String,Object> copyBlockStruct(Hashtable<String,Object> struct) { Hashtable<String,Object> result = new Hashtable<String,Object>(); |
From: remi <c2m...@c2...> - 2008-07-31 13:49:18
|
Author: remi Date: 2008-07-31 15:49:27 +0200 (Thu, 31 Jul 2008) New Revision: 1435 Modified: software_suite_v2/software/tools/attitunesStudio/trunk/src/com/tuxisalive/attitunes/format/ATTFormatReadWrite.java software_suite_v2/software/tools/attitunesStudio/trunk/src/com/tuxisalive/attitunes/format/ATTXmlParser.java Log: * added the attitune hashtable object to xml file functions. Modified: software_suite_v2/software/tools/attitunesStudio/trunk/src/com/tuxisalive/attitunes/format/ATTFormatReadWrite.java =================================================================== --- software_suite_v2/software/tools/attitunesStudio/trunk/src/com/tuxisalive/attitunes/format/ATTFormatReadWrite.java 2008-07-31 11:38:00 UTC (rev 1434) +++ software_suite_v2/software/tools/attitunesStudio/trunk/src/com/tuxisalive/attitunes/format/ATTFormatReadWrite.java 2008-07-31 13:49:27 UTC (rev 1435) @@ -43,6 +43,7 @@ private String wavsPath = ""; private Hashtable<String,Object> xmlStruct; private Hashtable<String,Object> blocksStruct; + private Hashtable<String,Object> headerStruct; /* * @@ -103,6 +104,9 @@ blocksStruct = (Hashtable)blocksStruct.get("script"); blocksStruct = (Hashtable)blocksStruct.get("timeline"); + /* Get the header structure */ + headerStruct = (Hashtable)xmlStruct.get("header"); + return true; } @@ -177,6 +181,15 @@ /** * + * @return + */ + public Hashtable<String,Object> getHeaderStruct() + { + return headerStruct; + } + + /** + * * @param waveName * @return */ Modified: software_suite_v2/software/tools/attitunesStudio/trunk/src/com/tuxisalive/attitunes/format/ATTXmlParser.java =================================================================== --- software_suite_v2/software/tools/attitunesStudio/trunk/src/com/tuxisalive/attitunes/format/ATTXmlParser.java 2008-07-31 11:38:00 UTC (rev 1434) +++ software_suite_v2/software/tools/attitunesStudio/trunk/src/com/tuxisalive/attitunes/format/ATTXmlParser.java 2008-07-31 13:49:27 UTC (rev 1435) @@ -5,8 +5,10 @@ import java.io.FileInputStream; import java.util.*; -import javax.xml.parsers.DocumentBuilder; -import javax.xml.parsers.DocumentBuilderFactory; +import javax.xml.parsers.*; +import javax.xml.transform.*; +import javax.xml.transform.stream.*; +import javax.xml.transform.dom.*; import org.w3c.dom.Document; import org.w3c.dom.Node; import org.w3c.dom.Element; @@ -19,9 +21,153 @@ */ public class ATTXmlParser { + /* Global xml struct for the xml write */ + private static Document doc; + /* - * + * Insert a leaf in the xml structure */ + private static void insertLeaf(Node parentNode, String textID, Object textValue) + { + Node leafNode; + String typeString; + Element element; + Node text; + + leafNode = doc.createElement(textID); + + if (textValue.getClass().toString().equals("class java.lang.String")) + { + if (textValue == "") + { + textValue = " "; + } + typeString = "str"; + } + else if (textValue.getClass().toString().equals("class java.lang.Double")) + { + typeString = "float"; + } + else if (textValue.getClass().toString().equals("class java.lang.Float")) + { + typeString = "float"; + } + else if (textValue.getClass().toString().equals("class java.lang.Integer")) + { + typeString = "int"; + } + else + { + typeString = "str"; + } + + element = (Element)leafNode; + element.setAttribute("type", typeString); + text = doc.createTextNode(textValue.toString()); + leafNode.appendChild(text); + parentNode.appendChild(leafNode); + } + + /* + * Insert a node in the xml structure + */ + private static Node insertNode(Node parentNode, String nodeID) + { + Node newNode; + + newNode = doc.createElement(nodeID); + parentNode.appendChild(newNode); + + return newNode; + } + + /* + * Xml node constructor + */ + @SuppressWarnings("unchecked") + private static void nodeStructToNXML(Node parentNode, + Hashtable<String,Object> nodeStruct) + { + String key; + Node newNode; + Iterator<String> it = (Iterator<String>)nodeStruct.keys(); + + while (it.hasNext()) + { + key = (String)it.next(); + + if (!nodeStruct.get(key).getClass().toString().equals("class java.util.Hashtable")) + { + insertLeaf(parentNode, key, nodeStruct.get(key)); + } + else + { + newNode = insertNode(parentNode, key); + nodeStructToNXML(newNode, (Hashtable<String,Object>)nodeStruct.get(key)); + } + } + } + + /* + * Write a xml document object to a xml file + */ + private static void writeXML(Document xmldoc, StreamResult out) + throws TransformerConfigurationException, TransformerException + { + DOMSource domSource = new DOMSource(xmldoc); + TransformerFactory tf = TransformerFactory.newInstance(); + Transformer transformer = tf.newTransformer(); + transformer.setOutputProperty + (OutputKeys.OMIT_XML_DECLARATION, "no"); + transformer.setOutputProperty(OutputKeys.METHOD, "xml"); + transformer.setOutputProperty(OutputKeys.ENCODING,"UTF-8"); + transformer.transform(domSource, out); + } + + /** + * Convert a hashtable structure to a xml file + */ + public static boolean structToXml(Hashtable<String,Object> struct, String path) + { + DocumentBuilderFactory xmlObj; + DocumentBuilder db = null; + Node rootNode; + StreamResult out; + + xmlObj = DocumentBuilderFactory.newInstance(); + + try + { + db = xmlObj.newDocumentBuilder(); + } + catch (Exception e) + { + return false; + } + + doc = db.newDocument(); + rootNode = doc.createElement("scene"); + doc.appendChild(rootNode); + + nodeStructToNXML(rootNode, struct); + + out = new StreamResult(path); + + try + { + writeXML(doc, out); + } + catch (Exception e) + { + return false; + } + + return true; + } + + /* + * Xml node to hashtable constructor + */ private static void nodeXMLToStruct(Node parentNode, Hashtable<String,Object> nodeStruct) { int i; |