summaryrefslogtreecommitdiff
path: root/digital/io-hub/src/robospierre/element.h
diff options
context:
space:
mode:
authorNicolas Schodet2011-06-02 04:19:25 +0200
committerNicolas Schodet2011-06-02 04:19:25 +0200
commitb1050f4948c2fcb6b952094e1679b6d02edf0b9b (patch)
tree339cc2fcea89aa447999c7fcc8a5bfa9e6685af9 /digital/io-hub/src/robospierre/element.h
parent4bf3121c81de96a6c67d7e5d4bb53f0c33fc5e74 (diff)
digital/io-hub: handle failure to choose another element_id
Diffstat (limited to 'digital/io-hub/src/robospierre/element.h')
-rw-r--r--digital/io-hub/src/robospierre/element.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/digital/io-hub/src/robospierre/element.h b/digital/io-hub/src/robospierre/element.h
index 5a15f6b0..8366907b 100644
--- a/digital/io-hub/src/robospierre/element.h
+++ b/digital/io-hub/src/robospierre/element.h
@@ -94,6 +94,9 @@ struct element_t
int8_t bonus_load;
/** Bonus coefficient (or Mallus if negative) for unload scores. */
int8_t bonus_unload;
+ /** Failure expiration date, can not take this element until chrono is
+ * lower than this date in seconds. */
+ uint8_t failure_until_s;
};
typedef struct element_t element_t;
@@ -152,6 +155,10 @@ element_taken (uint8_t element_id, uint8_t element_type);
void
element_down (uint8_t element_id, uint8_t element_type);
+/** Call this function when taking an element failled. */
+void
+element_failure (uint8_t element_id);
+
/** Gives the nearest element from a position. */
uint8_t
element_give_position (position_t pos);