123487
Dependencies: mbed-dev-f303 FastPWM3
Diff: main.cpp
- Revision:
- 57:8200454194cf
- Parent:
- 56:9353ebcf19c6
- Child:
- 58:bed739c83fac
--- a/main.cpp Thu Jan 02 16:15:46 2020 +0000 +++ b/main.cpp Thu Dec 24 02:30:24 2020 +0000 @@ -475,7 +475,10 @@ drv.print_faults(); wait(.1); //printf("%.4f\n\r", controller.v_bus); - + printf("adc1: %.3d\n\r",controller.adc2_raw = ADC1->DR); + printf("adc2: %.3d\n\r",controller.adc2_raw = ADC2->DR); + printf("adc3: %.3d\n\r",controller.adc2_raw = ADC3->DR); + wait(1); if(state == MOTOR_MODE) { //printf("%.3f %.3f %.3f\n\r", (float)observer.temperature, (float)observer.temperature2, observer.resistance); @@ -485,7 +488,10 @@ //printf(" True speed: %.3f\n\r", controller.dtheta_mech*60/(2*PI)); //shaorui ADD //wait(2); //printf("speed:%.3f\n\r", controller.dtheta_mech); - printf("position:%.3f\n\r", controller.theta_mech*360/(2*PI)); + //printf("position:%.3f\n\r", controller.theta_mech*360/(2*PI)); + printf("adc1: %.3d\n\r",controller.adc2_raw = ADC1->DR); + printf("adc2: %.3d\n\r",controller.adc2_raw = ADC2->DR); + printf("adc3: %.3d\n\r",controller.adc2_raw = ADC3->DR); //wait(.002); wait(1); }