zhang boie / Mbed 2 deprecated Hobbyking_Cheetah_Compact_DRV8323

Dependencies:   mbed FastPWM3

Files at this revision

API Documentation at this revision

Comitter:
abe5b02d-a2d4-4fe9-818e-c4e57c809ea4
Date:
Fri Jun 17 07:58:45 2022 +0000
Parent:
51:6cd89bd6fcaa
Commit message:
2022--6-17

Changed in this revision

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/main.cpp	Wed Jul 17 03:40:12 2019 +0000
+++ b/main.cpp	Fri Jun 17 07:58:45 2022 +0000
@@ -54,7 +54,8 @@
 
 PositionSensorAM5147 spi(16384, 0.0, NPP);  
 
-volatile int count = 0;
+//volatile int count = 0;
+volatile int count1 = 0;
 volatile int state = REST_MODE;
 volatile int state_change;
 
@@ -200,7 +201,8 @@
             case MOTOR_MODE:                                                   // Run torque control
                 if(state_change){
                     enter_torque_mode();
-                    count = 0;
+                    //count = 0;
+                    count1 = 0;
                     }
                 else{
                 /*
@@ -226,7 +228,8 @@
                 commutate(&controller, &observer, &gpio, controller.theta_elec);           // Run current loop
 
                 controller.timeout++;
-                count++; 
+                //count++; 
+                count1++; 
             
                 }     
                 break;
--- a/mbed-dev.lib	Wed Jul 17 03:40:12 2019 +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/#902f8c6731d6
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Fri Jun 17 07:58:45 2022 +0000
@@ -0,0 +1,1 @@
+https://os.mbed.com/users/mbed_official/code/mbed/builds/65be27845400
\ No newline at end of file