CANopen library

Dependents:   SDC21XX_Motor

Fork of CANopen_Node by Pierre David

Files at this revision

API Documentation at this revision

Comitter:
kkoichy
Date:
Mon Jul 11 11:02:12 2016 +0000
Parent:
8:7f20c24f653d
Commit message:
Added comments and example programm

Changed in this revision

CANopen_Node.cpp Show annotated file Show diff for this revision Revisions of this file
diff -r 7f20c24f653d -r 822973c25f99 CANopen_Node.cpp
--- a/CANopen_Node.cpp	Mon Jul 11 10:25:50 2016 +0000
+++ b/CANopen_Node.cpp	Mon Jul 11 11:02:12 2016 +0000
@@ -3,16 +3,12 @@
 
 namespace mbed {
     
-        CANopen_Node::CANopen_Node(uint8_t _id, CAN * _can)
+        CANopen_Node::CANopen_Node(uint8_t _id, CAN * _can): node_id(_id), can(_can)
         {
-            can = _can;
-            node_id = _id;
             
         }
-        CANopen_Node::CANopen_Node(uint8_t _id, CAN * _can, int _baud)
+        CANopen_Node::CANopen_Node(uint8_t _id, CAN * _can, int _baud): node_id(_id), can(_can)
         {
-            can = _can;
-            node_id = _id;
             can->frequency(_baud);
             
         }