MEC-B / Mycan

Dependents:   MastarNode_AR MastarNode_AR InterfaceNode AR_MastarNode_copy

Files at this revision

API Documentation at this revision

Comitter:
TanakaTarou
Date:
Mon Aug 06 05:40:22 2018 +0000
Parent:
2:67a12201e80b
Commit message:
send?return???

Changed in this revision

Mycan.cpp Show annotated file Show diff for this revision Revisions of this file
Mycan.h Show annotated file Show diff for this revision Revisions of this file
--- a/Mycan.cpp	Tue Jul 10 12:37:13 2018 +0000
+++ b/Mycan.cpp	Mon Aug 06 05:40:22 2018 +0000
@@ -15,9 +15,9 @@
     _expressAbsoluteValue();//絶対値にする関数
 }
 
-void Mycan::send()
+bool Mycan::send()
 {
-    can.write(CANMessage(td_id, (char*)&td_data, 8));
+    return can.write(CANMessage(td_id, (char*)&td_data, 8));
 }
 
 void Mycan::read()
--- a/Mycan.h	Tue Jul 10 12:37:13 2018 +0000
+++ b/Mycan.h	Mon Aug 06 05:40:22 2018 +0000
@@ -10,7 +10,7 @@
         
         void set (unsigned int _id, int _num, short int _data);//Messageの設定をする, numは1~7とする
         
-        void send ();//書き込み
+        bool send ();//書き込み
         
         void read ();//読み込み