sotsuron

Fork of linearMirrorMotion1017 by Hiromasa Oku

Revision:
24:ab74d2018e6c
Parent:
22:e86d63dfbbe1
Child:
25:423050363215
--- a/renderclass.h	Fri Jun 28 02:30:51 2013 +0000
+++ b/renderclass.h	Tue Jul 02 08:26:45 2013 +0000
@@ -2,7 +2,11 @@
 #include <vector>
 #define PI 3.14159
 
-#define RENDER_INTERVAL 7000// in microseconds
+#define RENDER_INTERVAL 500// in microseconds
+#define WAITING_FIRST 1 // this means WAITING_FIRST number of interrupt cycles in case of the first point
+#define WAITING_LAST 1
+
+enum stateMachine{NORMAL_POINT, FIRST_POINT, AFTER_LAST_POINT};
 
 struct point2dl {
     int x,y;
@@ -10,7 +14,7 @@
 };
 
 struct letter {
-    int pointnum;
+    int pointnum; //not used for the time being
     vector<point2dl> letpoints;
 };
 
@@ -35,6 +39,9 @@
     int currentPoints;
     point2dl drawPoint;
     
+    stateMachine rendererState;
+    int firstPointCounter, lastPointCounter;
+    
     Ticker renderTimer;
     Timer   speedTimer;