WANG YUCHAO
/
Motor_DRV8323RH_for_20190
mit
Revision 50:7dfd3eb439e8, committed 2021-05-04
- Comitter:
- wyc136
- Date:
- Tue May 04 12:52:52 2021 +0000
- Parent:
- 49:10638a45c3ac
- Commit message:
- 123
Changed in this revision
diff -r 10638a45c3ac -r 7dfd3eb439e8 Config/motor_config.h --- a/Config/motor_config.h Sat Dec 05 06:55:55 2020 +0000 +++ b/Config/motor_config.h Tue May 04 12:52:52 2021 +0000 @@ -6,7 +6,7 @@ #define L_Q 0.00003f //Henries //#define KT .075f //N-m per peak phase amp, = WB*NPP*3/2 #define KT .08f -#define NPP 21 //Number of pole pairs +#define NPP 14 //Number of pole pairs //#define GR 1.0f #define GR 49.0f //Gear ratio //#define KT_OUT 0.45f //KT*GR
diff -r 10638a45c3ac -r 7dfd3eb439e8 main.cpp --- a/main.cpp Sat Dec 05 06:55:55 2020 +0000 +++ b/main.cpp Tue May 04 12:52:52 2021 +0000 @@ -49,7 +49,7 @@ PositionSensorAM5147 spi(16384, 0.0, NPP); //14 bits encoder, 21 NPP -volatile int count = 0; +//volatile int count = 0; volatile int state = REST_MODE; volatile int state_change; @@ -187,7 +187,7 @@ case MOTOR_MODE: // Run torque control if(state_change){ enter_torque_mode(); - count = 0; + // count = 0; } else{ /*
diff -r 10638a45c3ac -r 7dfd3eb439e8 mbed-dev.lib --- a/mbed-dev.lib Sat Dec 05 06:55:55 2020 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1 +0,0 @@ -https://os.mbed.com/users/benkatz/code/mbed-dev-f303/#36facd806e4a
diff -r 10638a45c3ac -r 7dfd3eb439e8 mbed.bld --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Tue May 04 12:52:52 2021 +0000 @@ -0,0 +1,1 @@ +https://os.mbed.com/users/mbed_official/code/mbed/builds/65be27845400 \ No newline at end of file