#define WAYPOINTS_NBY 8
/*
- * Corn position and lines
+ * Corn position and lines, valid for YELLOW.
*
* vertical lines
* O 1 2 3 4 5
* 1/ c0 c15 \1
* |-----+ +-----|
* 2/ | | \2
- * | | | |
+ * | Yellow Blue |
* 0 +-----+-----------------------------+-----+
* 0 x 3000
*
* 2 |
* 1-----+ +-----|
* 0 | | |
- * | | | |
+ * | Yellow Blue |
* 0 +-----+-----------------------------+-----+
* 0 x 3000
*
+ *
+ * Corn position and lines, valid for BLUE.
+ *
+ * vertical lines
+ * 5 4 3 2 1 0
+ * 0 +-----|-----|-----|-----|-----|-----|-----+
+ * | c14 c9 c5 |
+ * | c17 c11 c7 c2 | diag
+ * | c13 c8 c4 | lines
+ * 0/ c16 c10 c6 c1 \0
+ * y | c12 c3 |
+ * 1/ c15 c0 \1
+ * |-----+ +-----|
+ * 2/ | | \2
+ * | Yellow Blue |
+ * 2100 +-----+-----------------------------+-----+
+ * 3000 x 0
+ *
+ * Ball (tomato) and i,j coords (for waypoints)
+ *
+ * 0 +-12-11-10--9--8--7--6--5--4--3--2--1--0--+
+ * 7 t9 t5 |
+ * 6 t11 t7 t3 |
+ * 5 t13 t8 t4 t1 |
+ * 4 t10 t6 t2 |
+ * y 3 t12 t0 |
+ * 2 |
+ * 1-----+ +-----|
+ * 0 | | |
+ * | Yellow Blue |
+ * 2100 +-----+-----------------------------+-----+
+ * 3000 x 0
+ *
*/
/* useful traj flags */
#define TRAJ_FLAGS_SMALL_DIST (END_TRAJ|END_BLOCKING|END_INTR)
/* default acc */
-#define ACC_DIST 10.
-#define ACC_ANGLE 10.
+#define ACC_DIST 12.
+#define ACC_ANGLE 16.
/* default speeds */
-#define SPEED_DIST_FAST 2500.
-#define SPEED_ANGLE_FAST 2000.
-#define SPEED_DIST_SLOW 1000.
-#define SPEED_ANGLE_SLOW 1000.
-#define SPEED_DIST_VERY_SLOW 400.
-#define SPEED_ANGLE_VERY_SLOW 400.
+#define SPEED_DIST_FAST 1200.
+#define SPEED_ANGLE_FAST 800.
+#define SPEED_DIST_SLOW 500.
+#define SPEED_ANGLE_SLOW 500.
+#define SPEED_DIST_VERY_SLOW 200.
+#define SPEED_ANGLE_VERY_SLOW 200.
+
+#define SPEED_CLITOID_SLOW 250.
+#define SPEED_CLITOID_FAST 500.
+
/* strat infos structures */
struct strat_conf {
uint8_t dump_enabled;
-#define STRAT_CONF_XXX 0x01
+ uint8_t opp_orange;
+ uint8_t orphan_tomato;
+
+ int8_t prev_wait_obstacle;
+
+#define STRAT_CONF_OUR_ORANGE 0x01
+#define STRAT_CONF_WAIT_OBSTACLE 0x02
+#define STRAT_CONF_STRAIGHT_BEGIN 0x04
uint8_t flags;
};
extern struct strat_conf strat_conf;
+extern volatile uint8_t strat_lpack60;
+extern volatile uint8_t strat_rpack60;
+extern volatile uint8_t strat_want_pack;
/* in strat.c */
void strat_conf_dump(const char *caller);
void strat_goto_near(int16_t x, int16_t y, uint16_t dist);
uint8_t strat_main(void);
void strat_event(void *dummy);
+void strat_event_enable(void);
+void strat_event_disable(void);
+uint8_t prepare_hill(uint8_t orange_color, int16_t posx);
+uint8_t run_to_the_hills(uint8_t orange_color);
+uint8_t get_orphan_tomatoes(void);
#endif