2014 Eurobot fork

Dependencies:   mbed-rtos mbed QEI

Revision:
64:c979fb1cd3b5
Parent:
63:c2c6269767b8
Child:
67:be3ea5450cc7
--- a/main.cpp	Sun Apr 14 14:32:43 2013 +0000
+++ b/main.cpp	Sun Apr 14 14:59:57 2013 +0000
@@ -73,20 +73,16 @@
     Ticker motorcontroltestticker;
     motorcontroltestticker.attach(MotorControl::motor_control_isr, 0.05);
     // ai layer thread
-    //Thread aithread(AI::ailayer, NULL, osPriorityNormal, 2048);
+    Thread aithread(AI::ailayer, NULL, osPriorityNormal, 2048);
     
     // motion layer periodic callback
-    //RtosTimer motion_timer(motion::motionlayer, osTimerPeriodic);
-    //motion_timer.start(50);
+    RtosTimer motion_timer(motion::motionlayer, osTimerPeriodic);
+    motion_timer.start(50);
 
-    //Thread printingThread(Printing::printingloop, NULL, osPriorityLow, 2048);
-    
-    //while(1){
-    //    printf("r:%f, l:%f, t:%f\r\n", right_encoder.getTicks()*ENCODER_M_PER_TICK, left_encoder.getTicks()*ENCODER_M_PER_TICK, SystemTime.read());
-    //}
+    Thread printingThread(Printing::printingloop, NULL, osPriorityLow, 2048);
 
-    //measureCPUidle(); //repurpose thread for idle measurement
-    
+    measureCPUidle(); //repurpose thread for idle measurement
+    /*
     MotorControl::set_omegacmd(0);
     for(float spd = 0.02; spd <= 0.5; spd *= 1.4){
     
@@ -114,7 +110,7 @@
         printf("targetspd:%f, fwd:%f, rot:%f\r\n", spd, f, r);
         Thread::wait(5000);
     }
-    
+    */
     Thread::wait(osWaitForever);
    
 }