X-Git-Url: http://git.droids-corp.org/?p=aversive.git;a=blobdiff_plain;f=projects%2Fmicrob2010%2Fcobboard%2Fshovel.c;fp=projects%2Fmicrob2010%2Fcobboard%2Fshovel.c;h=e06638d1d060a60147be0ef1acabcae551fd9bef;hp=8714367decc766ba438a7a2b1ce722e413a83a20;hb=04f1061f2c5959ce87f632591576097f540dfc14;hpb=e6e4582229cd4ed8ffe73bdfbae79d236129df3b diff --git a/projects/microb2010/cobboard/shovel.c b/projects/microb2010/cobboard/shovel.c index 8714367..e06638d 100644 --- a/projects/microb2010/cobboard/shovel.c +++ b/projects/microb2010/cobboard/shovel.c @@ -46,8 +46,8 @@ #define SHOVEL_DOWN 100 #define SHOVEL_MID 4500 #define SHOVEL_UP 11300 -#define SHOVEL_KICKSTAND_UP 12800 -#define SHOVEL_KICKSTAND_DOWN 10000 +#define SHOVEL_KICKSTAND_UP 13400 +#define SHOVEL_KICKSTAND_DOWN 10400 static int32_t shovel_k1 = 1000; static int32_t shovel_k2 = 20; @@ -140,9 +140,9 @@ void shovel_up(void) { shovel_current_limit_enable(0); if (state_get_cob_count() <= 1) - quadramp_set_1st_order_vars(&cobboard.shovel.qr, 1000, 2500); + quadramp_set_1st_order_vars(&cobboard.shovel.qr, 700, 2500); else - quadramp_set_1st_order_vars(&cobboard.shovel.qr, 2000, 2500); + quadramp_set_1st_order_vars(&cobboard.shovel.qr, 1000, 2500); quadramp_set_2nd_order_vars(&cobboard.shovel.qr, 80, 15); cs_set_consign(&cobboard.shovel.cs, SHOVEL_UP); } @@ -175,6 +175,11 @@ uint8_t shovel_is_down(void) return shovel_is_at_pos(SHOVEL_DOWN); } +uint8_t shovel_is_mid(void) +{ + return shovel_is_at_pos(SHOVEL_MID); +} + void shovel_init(void) { shovel_autopos();