2015/08/14

Dependencies:   VNH5019

Dependents:   Cansat_program4_1

Fork of cansat by Mami Yokokawa

Files at this revision

API Documentation at this revision

Comitter:
s1200058
Date:
Thu Aug 06 17:06:08 2015 +0000
Parent:
3:a7510585a11a
Child:
5:534a54a44b22
Commit message:
test

Changed in this revision

VNH5019.lib Show annotated file Show diff for this revision Revisions of this file
cansat.cpp Show annotated file Show diff for this revision Revisions of this file
cansat.h Show annotated file Show diff for this revision Revisions of this file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/VNH5019.lib	Thu Aug 06 17:06:08 2015 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/teams/aigamozu/code/VNH5019/#1bcdb655df71
--- a/cansat.cpp	Thu Jul 23 09:16:21 2015 +0000
+++ b/cansat.cpp	Thu Aug 06 17:06:08 2015 +0000
@@ -50,6 +50,36 @@
 double CanSat::get_robotKalman_y(){
     return robotK_y;
 }
+double CanSat::get_compass_z(){
+    return compass_z;
+}
+double CanSat::get_target_distance(){
+    return target_distance;
+}
+double CanSat::get_target_x(){
+    return target_x;
+}
+double CanSat::get_target_y(){
+    return target_y;
+}
+int CanSat::get_speed(){
+    return speed;
+}
+int CanSat::get_robot_angle(){
+    return robot_angle;
+}
+int CanSat::get_target_angle(){
+    return target_angle;
+}
+double CanSat::get_pressure(){
+    return pressure;
+}
+double CanSat::get_temperature(){
+    return temperature;
+} 
+double CanSat::get_humidity(){
+    return humidity;
+}
 //////////////////////////////
 //          Set             //
 //////////////////////////////
@@ -89,4 +119,16 @@
     CanSat::acceleration_x = x;
     CanSat::acceleration_y = y;
     CanSat::acceleration_z = z;
+}
+void CanSat::set_target_distance(double distance){
+    CanSat::target_distance = distance;
+}
+void CanSat::set_speed(int new_speed){
+    CanSat::speed = new_speed;
+}
+void CanSat::set_robot_angle(int new_robot_angle){
+    CanSat::robot_angle = new_robot_angle;
+}
+void CanSat::set_target_angle(int new_target_angle){
+    CanSat::target_angle = new_target_angle;
 }
\ No newline at end of file
--- a/cansat.h	Thu Jul 23 09:16:21 2015 +0000
+++ b/cansat.h	Thu Aug 06 17:06:08 2015 +0000
@@ -36,6 +36,17 @@
         double get_robot_y();
         double get_robotKalman_x();
         double get_robotKalman_y();
+        double get_compass_z();
+        double get_target_distance();
+        double get_target_x();
+        double get_target_y();
+        
+        int get_speed();
+        int get_robot_angle();
+        int get_target_angle();
+
+        double get_temperature();
+        double get_humidity();
         
         //set関数
         void set_robot_x(double);
@@ -49,6 +60,11 @@
         void set_temperature(double t);
         void set_humidity(double h);
         void set_acceleration(double x, double y, double z);
+        
+        void set_target_distance(double distance);
+        void set_speed(int new_speed);
+        void set_robot_angle(int robot_angle);
+        void set_target_angle(int target_angle);
 
     private:
         //モータ
@@ -75,4 +91,4 @@
         int target_distance;
 };
 
-#endif
\ No newline at end of file
+#endif