From ecbe3387a90b1ca0e8a8584af631ae2d1f9c61d8 Mon Sep 17 00:00:00 2001 From: zer0 Date: Mon, 3 May 2010 00:42:16 +0200 Subject: [PATCH] shovel speed and carry servo optim --- projects/microb2010/cobboard/actuator.c | 8 +++----- projects/microb2010/cobboard/shovel.c | 6 +++++- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/projects/microb2010/cobboard/actuator.c b/projects/microb2010/cobboard/actuator.c index 8a15ca9..c6a685b 100644 --- a/projects/microb2010/cobboard/actuator.c +++ b/projects/microb2010/cobboard/actuator.c @@ -45,19 +45,17 @@ #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); diff --git a/projects/microb2010/cobboard/shovel.c b/projects/microb2010/cobboard/shovel.c index 42ab78b..b2a8cc0 100644 --- a/projects/microb2010/cobboard/shovel.c +++ b/projects/microb2010/cobboard/shovel.c @@ -40,6 +40,7 @@ #include #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); } -- 2.39.5