ouais ok

Dependents:   roboticLab_withclass_3_July

Fork of ISR_Mini-explorer by ISR UC

Files at this revision

API Documentation at this revision

Comitter:
Ludwigfr
Date:
Wed Jul 12 18:08:02 2017 +0000
Parent:
2:92ca9a6a1d4e
Commit message:
test;

Changed in this revision

robot.h Show annotated file Show diff for this revision Revisions of this file
diff -r 92ca9a6a1d4e -r b996cbe5dabd robot.h
--- a/robot.h	Tue Jul 11 16:54:58 2017 +0000
+++ b/robot.h	Wed Jul 12 18:08:02 2017 +0000
@@ -51,9 +51,6 @@
 int IRobot=0;
 int JRobot=0;
 
-float D_cm=0;
-float L_cm=0;
-
 //SAIDAS DIGITAIS (normal)
 DigitalOut  q_pha_mot_rig       (PTE4,0);     //Phase Motor Right
 DigitalOut  q_sleep_mot_rig     (PTE3,0);     //Nano Sleep Motor Right
@@ -1016,11 +1013,12 @@
     ticks2d=ticks1d;
     ticks2e=ticks1e;
 
-    D_cm= (float)D_ticks*((3.25*3.1415)/4096);
-    L_cm= (float)E_ticks*((3.25*3.1415)/4096);
+    float D_cm= (float)D_ticks*((3.25*3.1415)/4096);
+    float L_cm= (float)E_ticks*((3.25*3.1415)/4096);
     //pc.printf("\r\nD_cm:%f",D_cm);
     //pc.printf("\r\nL_cm:%f",L_cm);
     float CM=(D_cm + L_cm)/2;
+
     //pc.printf("\r\nCM:%f",CM);
     theta +=(D_cm - L_cm)/7.18;
     theta = atan2(sin(theta), cos(theta));