Author: remi
Date: 2009-01-15 18:36:04 +0100 (Thu, 15 Jan 2009)
New Revision: 3471

Modified:
   
software_suite_v2/tuxware/java-api/trunk/src/com/tuxisalive/api/TuxAPIAttitune.java
   
software_suite_v2/tuxware/java-api/trunk/src/com/tuxisalive/api/TuxAPIFlippers.java
   
software_suite_v2/tuxware/java-api/trunk/src/com/tuxisalive/api/TuxAPILedBase.java
   
software_suite_v2/tuxware/java-api/trunk/src/com/tuxisalive/api/TuxAPIMouthEyes.java
   
software_suite_v2/tuxware/java-api/trunk/src/com/tuxisalive/api/TuxAPISoundFlash.java
   
software_suite_v2/tuxware/java-api/trunk/src/com/tuxisalive/api/TuxAPISpinning.java
   
software_suite_v2/tuxware/java-api/trunk/src/com/tuxisalive/api/TuxAPIWav.java
Log:
* Fixed a bug in the commands which contain a float representations

Modified: 
software_suite_v2/tuxware/java-api/trunk/src/com/tuxisalive/api/TuxAPIAttitune.java
===================================================================
--- 
software_suite_v2/tuxware/java-api/trunk/src/com/tuxisalive/api/TuxAPIAttitune.java
 2009-01-15 15:26:01 UTC (rev 3470)
+++ 
software_suite_v2/tuxware/java-api/trunk/src/com/tuxisalive/api/TuxAPIAttitune.java
 2009-01-15 17:36:04 UTC (rev 3471)
@@ -60,7 +60,7 @@
         */
        public Boolean play(Double begin)
        {
-               String cmd = String.format("attitune/play?begin=%g", begin);
+               String cmd = String.format("attitune/play?begin=%s", 
begin.toString());
                return cmdSimpleResult(cmd);
        }
        

Modified: 
software_suite_v2/tuxware/java-api/trunk/src/com/tuxisalive/api/TuxAPIFlippers.java
===================================================================
--- 
software_suite_v2/tuxware/java-api/trunk/src/com/tuxisalive/api/TuxAPIFlippers.java
 2009-01-15 15:26:01 UTC (rev 3470)
+++ 
software_suite_v2/tuxware/java-api/trunk/src/com/tuxisalive/api/TuxAPIFlippers.java
 2009-01-15 17:36:04 UTC (rev 3471)
@@ -215,8 +215,8 @@
                        return false;
                }
                
-               cmd = 
String.format("flippers/on_during?duration=%g&final_state=%s", 
-                               duration, finalState);
+               cmd = 
String.format("flippers/on_during?duration=%s&final_state=%s", 
+                               duration.toString(), finalState);
                Boolean ret = cmdSimpleResult(cmd);
                if (ret)
                {

Modified: 
software_suite_v2/tuxware/java-api/trunk/src/com/tuxisalive/api/TuxAPILedBase.java
===================================================================
--- 
software_suite_v2/tuxware/java-api/trunk/src/com/tuxisalive/api/TuxAPILedBase.java
  2009-01-15 15:26:01 UTC (rev 3470)
+++ 
software_suite_v2/tuxware/java-api/trunk/src/com/tuxisalive/api/TuxAPILedBase.java
  2009-01-15 17:36:04 UTC (rev 3471)
@@ -68,7 +68,8 @@
                
                if (fxType == TuxAPIConst.LFX_NONE)
                {
-                       cmd = String.format("leds/on?intensity=%g&leds=%s", 
intensity, ledNamex);
+                       cmd = String.format("leds/on?intensity=%s&leds=%s",
+                                       intensity.toString(), ledNamex);
                }
                else
                {
@@ -81,8 +82,8 @@
                                fxStep = 3;
                        }
                        fxCType = TuxAPIConst.LFXEX_GRADIENT_NBR;
-                       cmd = 
String.format("leds/set?fx_speed=0.5&fx_step=%d&fx_type=%s&intensity=%g&leds=%s",
-                                       fxStep, fxCType, intensity, ledNamex);
+                       cmd = 
String.format("leds/set?fx_speed=0.5&fx_step=%d&fx_type=%s&intensity=%s&leds=%s",
+                                       fxStep, fxCType, intensity.toString(), 
ledNamex);
                }
                return cmdSimpleResult(cmd);
        }
@@ -166,8 +167,8 @@
                
                if (fxType == TuxAPIConst.LFX_NONE)
                {
-                       cmd = 
String.format("leds/blink?leds=%s&count=%d&delay=%g", ledNamex,
-                                       count, delay);
+                       cmd = 
String.format("leds/blink?leds=%s&count=%d&delay=%s", ledNamex,
+                                       count, delay.toString());
                }
                else
                {
@@ -181,8 +182,8 @@
                        }
                        fxCType = TuxAPIConst.LFXEX_GRADIENT_NBR;
                        fxSpeed = delay / 3.0;
-                       cmd = 
String.format("leds/pulse?count=%d&fx_speed=%g&fx_step=%d&fx_type=%s&leds=%s&max_intensity=1.0&min_intensity=0.0&period=%g",
-                                       count, fxSpeed, fxStep, fxCType, 
ledNamex, delay);
+                       cmd = 
String.format("leds/pulse?count=%d&fx_speed=%s&fx_step=%d&fx_type=%s&leds=%s&max_intensity=1.0&min_intensity=0.0&period=%s",
+                                       count, fxSpeed.toString(), fxStep, 
fxCType, ledNamex, delay.toString());
                }
                return cmdSimpleResult(cmd);
        }
@@ -256,8 +257,8 @@
                
                if (fxType == TuxAPIConst.LFX_NONE)
                {
-                       cmd = 
String.format("leds/blink?leds=%s&count=%d&delay=%g", ledNamex,
-                                       count, delay);
+                       cmd = 
String.format("leds/blink?leds=%s&count=%d&delay=%s", ledNamex,
+                                       count, delay.toString());
                }
                else
                {
@@ -271,8 +272,8 @@
                        }
                        fxCType = TuxAPIConst.LFXEX_GRADIENT_NBR;
                        fxSpeed = delay / 3.0;
-                       cmd = 
String.format("leds/pulse?count=%d&fx_speed=%g&fx_step=%d&fx_type=%s&leds=%s&max_intensity=1.0&min_intensity=0.0&period=%g",
-                                       count, fxSpeed, fxStep, fxCType, 
ledNamex, delay);
+                       cmd = 
String.format("leds/pulse?count=%d&fx_speed=%s&fx_step=%d&fx_type=%s&leds=%s&max_intensity=1.0&min_intensity=0.0&period=%s",
+                                       count, fxSpeed.toString(), fxStep, 
fxCType, ledNamex, delay.toString());
                }
                return cmdSimpleResult(cmd);
        }

Modified: 
software_suite_v2/tuxware/java-api/trunk/src/com/tuxisalive/api/TuxAPIMouthEyes.java
===================================================================
--- 
software_suite_v2/tuxware/java-api/trunk/src/com/tuxisalive/api/TuxAPIMouthEyes.java
        2009-01-15 15:26:01 UTC (rev 3470)
+++ 
software_suite_v2/tuxware/java-api/trunk/src/com/tuxisalive/api/TuxAPIMouthEyes.java
        2009-01-15 17:36:04 UTC (rev 3471)
@@ -165,8 +165,8 @@
                        return false;
                }
                
-               cmd = String.format("%s/on_during?duration=%g&final_state=%s", 
pPartName, 
-                               duration, finalState);
+               cmd = String.format("%s/on_during?duration=%s&final_state=%s", 
pPartName, 
+                               duration.toString(), finalState);
                return cmdSimpleResult(cmd);
        }
        

Modified: 
software_suite_v2/tuxware/java-api/trunk/src/com/tuxisalive/api/TuxAPISoundFlash.java
===================================================================
--- 
software_suite_v2/tuxware/java-api/trunk/src/com/tuxisalive/api/TuxAPISoundFlash.java
       2009-01-15 15:26:01 UTC (rev 3470)
+++ 
software_suite_v2/tuxware/java-api/trunk/src/com/tuxisalive/api/TuxAPISoundFlash.java
       2009-01-15 17:36:04 UTC (rev 3471)
@@ -52,8 +52,8 @@
         */
        public Boolean playAsync(Integer track, Double volume)
        {
-               String cmd = 
String.format("sound_flash/play?track=%d&volume=%g", track,
-                               volume);
+               String cmd = 
String.format("sound_flash/play?track=%d&volume=%s", track,
+                               volume.toString());
                return cmdSimpleResult(cmd);
        }
        

Modified: 
software_suite_v2/tuxware/java-api/trunk/src/com/tuxisalive/api/TuxAPISpinning.java
===================================================================
--- 
software_suite_v2/tuxware/java-api/trunk/src/com/tuxisalive/api/TuxAPISpinning.java
 2009-01-15 15:26:01 UTC (rev 3470)
+++ 
software_suite_v2/tuxware/java-api/trunk/src/com/tuxisalive/api/TuxAPISpinning.java
 2009-01-15 17:36:04 UTC (rev 3471)
@@ -242,7 +242,8 @@
         */
        public Boolean leftOnDuringAsync(Double duration, Integer speed)
        {
-               String cmd = 
String.format("spinning/left_on_during?duration=%g", duration);
+               String cmd = 
String.format("spinning/left_on_during?duration=%s",
+                               duration.toString());
                Boolean ret = cmdSimpleResult(cmd);
                if (ret)
                {
@@ -273,7 +274,8 @@
         */
        public Boolean rightOnDuringAsync(Double duration, Integer speed)
        {
-               String cmd = 
String.format("spinning/right_on_during?duration=%g", duration);
+               String cmd = 
String.format("spinning/right_on_during?duration=%s",
+                               duration.toString());
                Boolean ret = cmdSimpleResult(cmd);
                if (ret)
                {

Modified: 
software_suite_v2/tuxware/java-api/trunk/src/com/tuxisalive/api/TuxAPIWav.java
===================================================================
--- 
software_suite_v2/tuxware/java-api/trunk/src/com/tuxisalive/api/TuxAPIWav.java  
    2009-01-15 15:26:01 UTC (rev 3470)
+++ 
software_suite_v2/tuxware/java-api/trunk/src/com/tuxisalive/api/TuxAPIWav.java  
    2009-01-15 17:36:04 UTC (rev 3471)
@@ -53,8 +53,8 @@
         */
        public Boolean playAsync(String waveFile, Double begin, Double end)
        {
-               String cmd = String.format("wav/play?path=%s&begin=%g&end=%g", 
-                               waveFile, begin, end);
+               String cmd = String.format("wav/play?path=%s&begin=%s&end=%s", 
+                               waveFile, begin.toString(), end.toString());
                
                return cmdSimpleResult(cmd);
        }


------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
Tux-droid-svn mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tux-droid-svn

Reply via email to