A Roboteq controller c++ interface to allow a Brushless motor control on a CAN bus. Used for a FBL2360 reference.

Dependencies:   CAN_FIFO_Triporteur

Files at this revision

API Documentation at this revision

Comitter:
zephyrcare
Date:
Mon Jun 25 14:52:57 2018 +0000
Parent:
6:f9c4795448c1
Commit message:
Seuil de direction et d'acc?l?ration; offset direction et accel

Changed in this revision

RoboteqController.cpp Show annotated file Show diff for this revision Revisions of this file
RoboteqController.h Show annotated file Show diff for this revision Revisions of this file
diff -r f9c4795448c1 -r 33d64a3c48a2 RoboteqController.cpp
--- a/RoboteqController.cpp	Wed Jun 13 09:07:45 2018 +0000
+++ b/RoboteqController.cpp	Mon Jun 25 14:52:57 2018 +0000
@@ -147,3 +147,8 @@
     
     SDO_command(0, cCANGO, mot_num, data);
 }
+
+int16_t RoboteqController::getSpeed(uint8_t mot_num){
+    if(mot_num == 1) return speed1;
+    else if(mot_num == 2) return speed2;     
+}
\ No newline at end of file
diff -r f9c4795448c1 -r 33d64a3c48a2 RoboteqController.h
--- a/RoboteqController.h	Wed Jun 13 09:07:45 2018 +0000
+++ b/RoboteqController.h	Mon Jun 25 14:52:57 2018 +0000
@@ -57,6 +57,8 @@
     
     void sendCommand(uint8_t mot_num, uint32_t cmd);
     
+    int16_t getSpeed(uint8_t mot_num); 
+    
     protected:
     
     static const uint16_t RPDO_ID[4];   // RPDO msg IDs to send data to the controller