summaryrefslogtreecommitdiff
path: root/digital/io-hub/src/robospierre/bot.h
diff options
context:
space:
mode:
authorNicolas Schodet2011-05-29 09:51:30 +0200
committerNicolas Schodet2011-05-29 09:57:32 +0200
commit21deab476ce421f04d367959110afbd85656bdde (patch)
treed3812e1da8269dc676a01ccc1ae6781ed649553c /digital/io-hub/src/robospierre/bot.h
parent4042e67d5aed51502538b96c959d88fd3cc1779a (diff)
digital/io-hub: softer clamp & door control
Diffstat (limited to 'digital/io-hub/src/robospierre/bot.h')
-rw-r--r--digital/io-hub/src/robospierre/bot.h28
1 files changed, 16 insertions, 12 deletions
diff --git a/digital/io-hub/src/robospierre/bot.h b/digital/io-hub/src/robospierre/bot.h
index 1ba432a8..bd7cc181 100644
--- a/digital/io-hub/src/robospierre/bot.h
+++ b/digital/io-hub/src/robospierre/bot.h
@@ -141,20 +141,24 @@
#define BOT_PWM_DOOR_BACK_BOTTOM 3
#define BOT_PWM_DOOR_BACK_TOP 4
-#define BOT_PWM_CLAMP_OPEN_TIME 125
-#define BOT_PWM_CLAMP_OPEN 0x1ff, 125, 0
-#define BOT_PWM_CLAMP_CLOSE_TIME 75
-#define BOT_PWM_CLAMP_CLOSE -0x3ff, 75, 0
+#define BOT_PWM_CLAMP_OPEN_TIME 150
+#define BOT_PWM_CLAMP_OPEN 0x1ff, 150, 0
+#define BOT_PWM_CLAMP_CLOSE_TIME 150
+#define BOT_PWM_CLAMP_CLOSE -0x1ff, 150, 0
#define BOT_PWM_DOOR_OPEN_TIME 12
-#define BOT_PWM_DOOR_OPEN 0x3ff, 37, 0x55
-#define BOT_PWM_DOOR_CLOSE_TIME 50
+#define BOT_PWM_DOOR_OPEN(slot) \
+ 0x1ff, (((slot) == CLAMP_SLOT_FRONT_BOTTOM \
+ || (slot) == CLAMP_SLOT_BACK_BOTTOM) ? 80 : 62), 0x55
+#define BOT_PWM_DOOR_CLOSE_TIME 100
#define BOT_PWM_DOOR_CLOSE(slot) \
- -0x3ff, 50, ((slot == CLAMP_SLOT_FRONT_BOTTOM \
- || slot == CLAMP_SLOT_BACK_BOTTOM) ? -0x100 : -0x180)
-
-#define BOT_PWM_CLAMP_INIT 0x1ff, 125, 0
-#define BOT_PWM_DOOR_INIT 0x1ff, 74, 0x55
-#define BOT_PWM_CLAMP_DOOR_INIT 125
+ -0x1ff, (((slot) == CLAMP_SLOT_FRONT_BOTTOM \
+ || (slot) == CLAMP_SLOT_BACK_BOTTOM) ? 80 : 62), \
+ (((slot) == CLAMP_SLOT_FRONT_BOTTOM \
+ || (slot) == CLAMP_SLOT_BACK_BOTTOM) ? -0x100 : -0x180)
+
+#define BOT_PWM_CLAMP_INIT 0x1ff, 150, 0
+#define BOT_PWM_DOOR_INIT 0x1ff, 80, 0x55
+#define BOT_PWM_CLAMP_DOOR_INIT 150
#endif /* bot_h */