Prototyp V2

Dependencies:   PM2_Libary

Branch:
michi
Revision:
76:d1bbdcd54703
Parent:
75:3831b90a4ae0
Parent:
74:d7569d530f6c
Child:
77:508d8fda4aa0
--- a/main.cpp	Wed Apr 27 10:43:19 2022 +0200
+++ b/main.cpp	Wed Apr 27 10:44:50 2022 +0200
@@ -79,6 +79,8 @@
 extern double mapping (float adc_value_mV);
 
 // calculates the deg which the arm has to take to reach a certain height (the input height has to be the height of OK Gripper area)
+// PARAM: height_mm = height which OK Gripperarea has to reach.
+// RETURN: deg_arm = absolut Position in deg that the arm has to take.
 float calc_arm_deg_for_height(int height_mm)
 {
     float deg_arm;
@@ -187,10 +189,11 @@
     enable_motors = 0;
 }
 
-//only turns the arm until the robot is on the next step
+//turns the arm until the robot is on the next step
 void lift_up()
 {
     float position_lift_end_deg = asin((-dist_arm_ground - (dist_grappleratt_grappler_uk-gripper_area_height)) / arm_length) - 90; // calculates the degree which has to be reached in order to get on top of next step
+    float relativ_turns_arm = turn_absolut_deg(position_lift_end_deg, positionController_M_Arm.getRotation());
     
     enable_motors = 1;
     positionController_M_Arm.setDesiredRotation(0, max_speed_rps_arm);