]> git.droids-corp.org - aversive.git/commitdiff
shovel speed and carry servo optim
authorzer0 <zer0@carbon.local>
Sun, 2 May 2010 22:42:16 +0000 (00:42 +0200)
committerzer0 <zer0@carbon.local>
Sun, 2 May 2010 22:42:16 +0000 (00:42 +0200)
projects/microb2010/cobboard/actuator.c
projects/microb2010/cobboard/shovel.c

index 8a15ca941e3f46293d671801a2123589d4813917..c6a685b8624d81667a11d60ceadf3655dd72fb07 100644 (file)
 #include "main.h"
 #include "actuator.h"
 
-#define COBROLLER_SPEED 1200
-//#define COBROLLER_SPEED 600
-//#define COBROLLER_SPEED 400
+#define COBROLLER_SPEED 1000
 
 #define SERVO_DOOR_OPEN 300
 #define SERVO_DOOR_CLOSED 530
 #define SERVO_DOOR_BLOCK 530
 
 #define SERVO_CARRY_L_OPEN 295
-#define SERVO_CARRY_L_CLOSED 440//400 // 510
+#define SERVO_CARRY_L_CLOSED 430 //400
 
 #define SERVO_CARRY_R_OPEN 455
-#define SERVO_CARRY_R_CLOSED 310//350 // 250
+#define SERVO_CARRY_R_CLOSED 320 //350
 
 void actuator_init(void);
 
index 42ab78bce33c89b094357edf05064b5efd41a471..b2a8cc0501a66f7adad1b015851385700510c217 100644 (file)
@@ -40,6 +40,7 @@
 #include <rdline.h>
 
 #include "main.h"
+#include "state.h"
 #include "shovel.h"
 
 #define SHOVEL_DOWN 100
@@ -84,7 +85,10 @@ void shovel_mid(void)
 
 void shovel_up(void)
 {
-       quadramp_set_1st_order_vars(&cobboard.shovel.qr, 2000, 2500);
+       if (state_get_cob_count() <= 1)
+               quadramp_set_1st_order_vars(&cobboard.shovel.qr, 1000, 2500);
+       else
+               quadramp_set_1st_order_vars(&cobboard.shovel.qr, 2000, 2500);
        quadramp_set_2nd_order_vars(&cobboard.shovel.qr, 80, 15);
        cs_set_consign(&cobboard.shovel.cs, SHOVEL_UP);
 }