mit

Dependencies:   mbed FastPWM3

Files at this revision

API Documentation at this revision

Comitter:
wyc136
Date:
Tue May 04 12:52:52 2021 +0000
Parent:
49:10638a45c3ac
Commit message:
123

Changed in this revision

Config/motor_config.h Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed-dev.lib Show diff for this revision Revisions of this file
mbed.bld Show annotated file Show diff for this revision Revisions of this file
--- 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
--- 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{
                 /*
--- 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
--- /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