ChoroQ

Files at this revision

API Documentation at this revision

Comitter:
shintamainjp
Date:
Sun Sep 19 23:49:38 2010 +0000
Parent:
0:2a40e6db61c2
Commit message:

Changed in this revision

ChoroQ.cpp Show annotated file Show diff for this revision Revisions of this file
TransmitterChoroQ.cpp Show annotated file Show diff for this revision Revisions of this file
diff -r 2a40e6db61c2 -r 97921a2adf78 ChoroQ.cpp
--- a/ChoroQ.cpp	Sun Sep 19 23:30:35 2010 +0000
+++ b/ChoroQ.cpp	Sun Sep 19 23:49:38 2010 +0000
@@ -91,6 +91,7 @@
         timer.start();
         irtx.setData(buf, BITLENGTH_FOR_CHORO_Q);
         wait_ms(interval_time);
+        
         /*
          * I don't need keep a interval time if I use only a CHORO Q.
          * But kids need more CHORO Q cars sometime.
@@ -102,6 +103,7 @@
             const int ms = timer.read_ms();
             wait_ms(PACKET_INTERVAL_MS - ms);
         } else {
+            wait_ms(interval_time);
             timer.stop();
         }
     }
diff -r 2a40e6db61c2 -r 97921a2adf78 TransmitterChoroQ.cpp
--- a/TransmitterChoroQ.cpp	Sun Sep 19 23:30:35 2010 +0000
+++ b/TransmitterChoroQ.cpp	Sun Sep 19 23:49:38 2010 +0000
@@ -74,8 +74,9 @@
         data.buffer[i] = buf[i];
     }
 
+    static const double correction = 1.20;
     ticker.detach();
-    ticker.attach_us(this, &TransmitterChoroQ::tick, TUS_TAKARATOMY);
+    ticker.attach_us(this, &TransmitterChoroQ::tick, TUS_TAKARATOMY * correction);
 
     UNLOCK();
     return bitlength;