A Roboteq controller c++ interface to allow a Brushless motor control on a CAN bus. Used for a FBL2360 reference.
Dependencies: CAN_FIFO_Triporteur
Diff: RoboteqController.cpp
- Revision:
- 1:57b8f6ed930b
- Parent:
- 0:faf0960419c1
- Child:
- 2:d61b4a989cab
diff -r faf0960419c1 -r 57b8f6ed930b RoboteqController.cpp --- a/RoboteqController.cpp Sat May 05 15:41:25 2018 +0000 +++ b/RoboteqController.cpp Sat May 05 16:14:43 2018 +0000 @@ -1,10 +1,12 @@ #include "RoboteqController.h" -RoboteqController::RoboteqController() : node_id(1), mot_num(0), Id_CSS_REQ(SDO_REQUEST+node_id), Id_CSS_ANS(SDO_ANSWER+node_id){ +RoboteqController::RoboteqController(){ } -RoboteqController::RoboteqController(uint8_t node_id, uint8_t mot_num) : node_id(node_id), mot_num(mot_num), - Id_CSS_REQ(SDO_REQUEST+node_id), Id_CSS_ANS(SDO_ANSWER+node_id) { +RoboteqController::RoboteqController(ControllerCAN* controller, uint8_t node_id, uint8_t mot_num) : + PeripheralCAN(controller), + node_id(node_id), mot_num(mot_num), + Id_CSS_REQ(SDO_REQUEST+node_id), Id_CSS_ANS(SDO_ANSWER+node_id) { PeripheralCAN::addIdRead(&Id_CSS_REQ); PeripheralCAN::addIdRead(&Id_CSS_ANS); }