#include "main.h"
#include "actuator.h"
-#define COBROLLER_SPEED 800
+#define COBROLLER_SPEED 600
//#define COBROLLER_SPEED 400
-#define SERVO_DOOR_OPEN 260
-#define SERVO_DOOR_CLOSED 500
-#define SERVO_DOOR_BLOCK 500
+#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 400 // 510
void actuator_init(void)
{
-
+ servo_door_open();
+ servo_carry_open();
}
#include "shovel.h"
#define SHOVEL_DOWN 100
-#define SHOVEL_MID 4900
-#define SHOVEL_UP 10000
+#define SHOVEL_MID 4500
+#define SHOVEL_UP 11000
/* init spickle position at beginning */
static void shovel_autopos(void)
void shovel_down(void)
{
+ quadramp_set_1st_order_vars(&cobboard.shovel.qr, 2500, 2500);
quadramp_set_2nd_order_vars(&cobboard.shovel.qr, 50, 80);
cs_set_consign(&cobboard.shovel.cs, SHOVEL_DOWN);
}
void shovel_mid(void)
{
+ quadramp_set_1st_order_vars(&cobboard.shovel.qr, 2500, 2500);
quadramp_set_2nd_order_vars(&cobboard.shovel.qr, 80, 80);
cs_set_consign(&cobboard.shovel.cs, SHOVEL_MID);
}
void shovel_up(void)
{
- quadramp_set_2nd_order_vars(&cobboard.shovel.qr, 80, 20);
+ 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);
}
if (cob_count >= 5)
spickle_pack(side);
else if (is_deployed(side) && !is_autoharvest(side))
- spickle_mid(side);
+ spickle_deploy(side); /*spickle_mid(side);*/
else if (is_deployed(side) && is_autoharvest(side))
spickle_deploy(side);
else
/* eat the cob */
spickle_pack(side);
- time_wait_ms(250);
+ time_wait_ms(200);
cobroller_on(side);
/* check that cob is correctly in place */