customizing code for Aliexpress 14 bit version with MA702

Dependencies:   mbed FastPWM3

Files at this revision

API Documentation at this revision

Comitter:
ahmed_lv
Date:
Tue Nov 10 07:43:56 2020 +0000
Parent:
51:11cf80a2d899
Commit message:
renamed count to countt and added mbed official library

Changed in this revision

CAN/CAN_com.cpp 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/CAN/CAN_com.cpp	Fri Apr 05 03:46:51 2019 +0000
+++ b/CAN/CAN_com.cpp	Tue Nov 10 07:43:56 2020 +0000
@@ -1,8 +1,8 @@
 #include "CAN_com.h"
 
 
- #define P_MIN -12.5f
- #define P_MAX 12.5f
+ #define P_MIN -95.5f // was -12.5
+ #define P_MAX 95.5f // was 12.5
  #define V_MIN -45.0f
  #define V_MAX 45.0f
  #define KP_MIN 0.0f
--- a/main.cpp	Fri Apr 05 03:46:51 2019 +0000
+++ b/main.cpp	Tue Nov 10 07:43:56 2020 +0000
@@ -54,7 +54,7 @@
 
 PositionSensorAM5147 spi(16384, 0.0, NPP);  
 
-volatile int count = 0;
+volatile int countt = 0;
 volatile int state = REST_MODE;
 volatile int state_change;
 
@@ -198,7 +198,7 @@
             case MOTOR_MODE:                                                   // Run torque control
                 if(state_change){
                     enter_torque_mode();
-                    count = 0;
+                    countt = 0;
                     }
                 else{
                 /*
@@ -224,7 +224,7 @@
                 commutate(&controller, &observer, &gpio, controller.theta_elec);           // Run current loop
 
                 controller.timeout++;
-                count++; 
+                countt++; 
             
                 }     
                 break;
--- a/mbed-dev.lib	Fri Apr 05 03:46:51 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	Tue Nov 10 07:43:56 2020 +0000
@@ -0,0 +1,1 @@
+https://os.mbed.com/users/mbed_official/code/mbed/builds/65be27845400
\ No newline at end of file