X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;ds=sidebyside;f=projects%2Fmicrob2010%2Fcobboard%2Fshovel.c;h=e06638d1d060a60147be0ef1acabcae551fd9bef;hb=HEAD;hp=1f38e1a313aeb8c1590adddd3dc46353e72677bb;hpb=28da5858ac871c626153f47566e968ecb05ff52b;p=aversive.git diff --git a/projects/microb2010/cobboard/shovel.c b/projects/microb2010/cobboard/shovel.c index 1f38e1a..e06638d 100644 --- a/projects/microb2010/cobboard/shovel.c +++ b/projects/microb2010/cobboard/shovel.c @@ -45,9 +45,9 @@ #define SHOVEL_DOWN 100 #define SHOVEL_MID 4500 -#define SHOVEL_UP 11000 -#define SHOVEL_KICKSTAND_UP 12800 -#define SHOVEL_KICKSTAND_DOWN 10000 +#define SHOVEL_UP 11300 +#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();