git.droids-corp.org
/
aversive.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
french cup + idf cup
[aversive.git]
/
projects
/
microb2010
/
cobboard
/
shovel.c
diff --git
a/projects/microb2010/cobboard/shovel.c
b/projects/microb2010/cobboard/shovel.c
index
8714367
..
e06638d
100644
(file)
--- 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_DOWN 100
#define SHOVEL_MID 4500
#define SHOVEL_UP 11300
-#define SHOVEL_KICKSTAND_UP 1
28
00
-#define SHOVEL_KICKSTAND_DOWN 10
0
00
+#define SHOVEL_KICKSTAND_UP 1
34
00
+#define SHOVEL_KICKSTAND_DOWN 10
4
00
static int32_t shovel_k1 = 1000;
static int32_t shovel_k2 = 20;
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)
{
shovel_current_limit_enable(0);
if (state_get_cob_count() <= 1)
- quadramp_set_1st_order_vars(&cobboard.shovel.qr,
10
00, 2500);
+ quadramp_set_1st_order_vars(&cobboard.shovel.qr,
7
00, 2500);
else
else
- quadramp_set_1st_order_vars(&cobboard.shovel.qr,
2
000, 2500);
+ quadramp_set_1st_order_vars(&cobboard.shovel.qr,
1
000, 2500);
quadramp_set_2nd_order_vars(&cobboard.shovel.qr, 80, 15);
cs_set_consign(&cobboard.shovel.cs, SHOVEL_UP);
}
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);
}
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();
void shovel_init(void)
{
shovel_autopos();