NagaokaRoboticsClub_mbedTeam / R1307

Dependents:   NHK2017_octopus2 NHK2017_octopus2_drive 2018NHK_gakugaku_robo 2018NHK_gaku_ver2

Fork of R1307 by Wataru Nakata

Files at this revision

API Documentation at this revision

Comitter:
UCHITAKE
Date:
Wed Nov 01 08:03:03 2017 +0000
Parent:
2:deb20a97e035
Child:
4:927d58c8eec1
Commit message:
cupsuled;

Changed in this revision

r1307.cpp Show annotated file Show diff for this revision Revisions of this file
r1307.h Show annotated file Show diff for this revision Revisions of this file
--- a/r1307.cpp	Wed Oct 11 18:00:52 2017 +0900
+++ b/r1307.cpp	Wed Nov 01 08:03:03 2017 +0000
@@ -38,5 +38,28 @@
   gX_acc = x_acc;
   gY_acc = y_acc;
   gZ_acc = z_acc;
-  return;
+}
+float R1307::getRate()
+{
+    return gRate;
+}
+
+float R1307::getAngle()
+{
+    return gAngle;
 }
+
+float R1307::getAccX()
+{
+    return gX_acc;
+}
+
+float R1307::getAccY()
+{
+    return gY_acc;
+}
+
+float R1307::getAccZ()
+{
+    return gZ_acc;
+}
--- a/r1307.h	Wed Oct 11 18:00:52 2017 +0900
+++ b/r1307.h	Wed Nov 01 08:03:03 2017 +0000
@@ -7,15 +7,14 @@
 private:
   Serial serial;
   Ticker ticker;
-
-public:
-  R1307 (PinName tx_,PinName rx_);
-  void update();
   float gAngle;
   float gRate;
   float gX_acc;
   float gY_acc;
   float gZ_acc;
+public:
+  R1307 (PinName tx_,PinName rx_);
+  void update();
 };
 
 #endif /* end of include guard: R1307_H */