Dave Lu
/
FYDP
IMU and knee angle. No servo yet
Fork of FYDP_Final2 by
Diff: main.cpp
- Revision:
- 1:815f16490da8
- Parent:
- 0:21019d94ad33
- Child:
- 2:7b3822eacad8
--- a/main.cpp Sat Mar 21 21:31:29 2015 +0000 +++ b/main.cpp Sat Mar 21 21:54:52 2015 +0000 @@ -67,14 +67,24 @@ } } +void IMU2_thread(void const *args) +{ + test_dmp2(); + start_dmp2(mpu2); + while(1) + { + update_dmp2(); + Thread::yield(); + } +} void IMU_thread(void const *args) { bt.baud(BT_BAUD_RATE); //you have to do this for some reason test_dmp(); - test_dmp2(); + test_dmp2(); bt.baud(BT_BAUD_RATE); //you have to do this for some reason start_dmp(mpu); - start_dmp2(mpu2); + start_dmp2(mpu2); //calibrate_1(); while(1) { @@ -124,6 +134,8 @@ Thread IMU_th(IMU_thread,NULL,osPriorityNormal, 2048,NULL); + // Thread IMU2_th(IMU_thread,NULL,osPriorityNormal, 2048,NULL); + // Thread current_sense(CURRENT_thread,NULL,osPriorityNormal,300,NULL); //this thread for monitoring current is unnecessary. Thread use lotsa rams. Kill it. //Thread optflow_th(optflow_thread, NULL, osPriorityNormal, 500, NULL);