BE@R lab / Mbed 2 deprecated BEAR_Motion

Dependencies:   BEAR_Reciever Motor eeprom iSerial mbed

Fork of DogPID by Digital B14

Files at this revision

API Documentation at this revision

Comitter:
b0ssiz
Date:
Tue Feb 02 01:31:15 2016 +0000
Parent:
31:d6fa5e8e26b3
Child:
33:65cfa4b72195
Child:
34:0cf04acfe422
Commit message:
Fixed bug and Change position variable

Changed in this revision

BEAR_Reciever.lib Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/BEAR_Reciever.lib	Mon Feb 01 19:02:56 2016 +0000
+++ b/BEAR_Reciever.lib	Tue Feb 02 01:31:15 2016 +0000
@@ -1,1 +1,1 @@
-https://developer.mbed.org/teams/BEaR-lab/code/BEAR_Reciever/#a4771499856a
+https://developer.mbed.org/teams/BEaR-lab/code/BEAR_Reciever/#2a7476156519
--- a/main.cpp	Mon Feb 01 19:02:56 2016 +0000
+++ b/main.cpp	Tue Feb 02 01:31:15 2016 +0000
@@ -130,7 +130,7 @@
 void Move_Upper()
 {
     Read_Encoder(EncoderA);
-    Upper_Position = (int)Get_EnValue(data);
+    Upper_Position = Get_EnValue(data);
 
     Up_PID.setProcessValue(Upper_Position);
 
@@ -146,7 +146,7 @@
 void Move_Lower()
 {
     Read_Encoder(EncoderB);
-    Lower_Position = (int)Get_EnValue(data);
+    Lower_Position = Get_EnValue(data);
 
     Low_PID.setProcessValue(Lower_Position);
 
@@ -175,8 +175,8 @@
                         break;
                     }
                     case MOTOR_UPPER_ANG: {
-                        uint8_t IntUpAngle[2],FloatUpAngle[2];
-                        uint8_t IntLowAngle[2],FloatLowAngle[2];
+                        uint8_t IntUpAngle[2];
+                        uint8_t IntLowAngle[2];
 
                         IntUpAngle[0]=command[1];
                         IntUpAngle[1]=command[2];
@@ -330,7 +330,7 @@
                         int i;
                         for(i=0; i<8; i++) {
                             Angle_Range_Up[i]=command[1+i];
-                        //printf("%d Angle = 0x%02x\r\n",i,Angle_Range_Up[i]);
+                            //printf("%d Angle = 0x%02x\r\n",i,Angle_Range_Up[i]);
                         }
                         break;
                     }
@@ -729,7 +729,7 @@
     wait(0.5);
     }
     */
-    
+
 
     //Recieve.attach(&Rc,0.025);
     //Start_Up();
@@ -741,7 +741,6 @@
     while(1) {
         myled =0;
         //wait_ms(10);
-
 ///////////////////////////////////////////////////// start
         //Set Set_point
         Up_PID.setSetPoint(Upper_SetPoint);