]> git.droids-corp.org - aversive.git/blobdiff - projects/microb2010/mainboard/strat_db.h
circuit strat, first version
[aversive.git] / projects / microb2010 / mainboard / strat_db.h
index 1b5314f836be6e5b7e78726691232360d31169c2..b770b43df4f2265d84e883fe2760092690ee6803 100644 (file)
@@ -33,7 +33,7 @@ struct corn_db {
 };
 
 struct tomato_db {
-       /* nothing for now */
+       uint8_t idx;
 };
 
 /* structure describing the status of a waypoint */
@@ -87,6 +87,11 @@ struct strat_db {
 /* global structure storing the database */
 extern struct strat_db strat_db;
 
+/* return the nearest waypoint that is not a corn: xp and yp contains
+ * the input and output, and ip, jp are only outputs. return 0 on
+ * success. */
+int8_t xycoord_to_ijcoord(int16_t *xp, int16_t *yp, uint8_t *ip, uint8_t *jp);
+
 /* convert i,j coords to x,y coords */
 int8_t ijcoord_to_xycoord(uint8_t i, uint8_t j, int16_t *x, int16_t *y);