2014 Eurobot fork
Dependencies: mbed-rtos mbed QEI
Diff: main.cpp
- Revision:
- 46:adcd57a5e402
- Parent:
- 45:77cf6375348a
- Child:
- 50:937e860f4621
--- a/main.cpp Fri Apr 12 20:40:52 2013 +0000 +++ b/main.cpp Fri Apr 12 20:59:18 2013 +0000 @@ -75,29 +75,29 @@ pc.baud(115200); - - // InitSerial(); - // wait(1); - // Kalman::KalmanInit(); + wait(2); + InitSerial(); + wait(3); + Kalman::KalmanInit(); - // Thread predictthread(Kalman::predictloop, NULL, osPriorityNormal, 2084);//512); //temp 2k - // Kalman::start_predict_ticker(&predictthread); + Thread predictthread(Kalman::predictloop, NULL, osPriorityNormal, 2084);//512); //temp 2k + Kalman::start_predict_ticker(&predictthread); - // Thread updatethread(Kalman::updateloop, NULL, osPriorityNormal, 2084); + Thread updatethread(Kalman::updateloop, NULL, osPriorityNormal, 2084); - // Ticker motorcontroltestticker; - // motorcontroltestticker.attach(MotorControl::motor_control_isr, 0.05); + 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); + Thread printingThread(Printing::printingloop, NULL, osPriorityLow, 2048); - // measureCPUidle(); //repurpose thread for idle measurement - colourtest(); + measureCPUidle(); //repurpose thread for idle measurement + //colourtest(); //pt_test(); while(true) { Thread::wait(osWaitForever);