summaryrefslogtreecommitdiff
path: root/n/es-2006/src/sensor_rvb.h
diff options
context:
space:
mode:
Diffstat (limited to 'n/es-2006/src/sensor_rvb.h')
-rw-r--r--n/es-2006/src/sensor_rvb.h28
1 files changed, 25 insertions, 3 deletions
diff --git a/n/es-2006/src/sensor_rvb.h b/n/es-2006/src/sensor_rvb.h
index de9a498..ef53706 100644
--- a/n/es-2006/src/sensor_rvb.h
+++ b/n/es-2006/src/sensor_rvb.h
@@ -68,13 +68,35 @@ void sensor_rvb_init (void);
void sensor_rvb_start_capture (void);
/** Configure some internal variables.
- * - false_ic = maximum input capture to ignore before begining the real
+ * - false_ic : maximum input capture to ignore before begining the real
* capture.
- * - max_ov = maximum overflow of the timer/counter 1 before setting the
+ * - max_ov : maximum overflow of the timer/counter 1 before setting the
* sensor dead. uint8_t !
- * - latency = delay between change for sensor. Must be more than 100ns. This
+ * - latency : delay between change for sensor. Must be more than 100ns. This
* setting is in ns.
*/
void sensor_rvb_config (uint8_t false_ic, uint8_t max_ov, uint8_t latency);
+/** Set the current color seen by some sensors as the reference color.
+ * It must be called at the begining of the match for setting the green value.
+ */
+void sensor_rvb_set_ref_color (void);
+
+/** Set the threshold of the differents colors.
+ * There are used for the algorithm that distinguish colors.
+ */
+void sensor_rvb_set_threshold (uint8_t color, uint16_t red_ts, uint16_t
+ blue_ts, uint16_t clear_ts, uint16_t green_ts);
+
+/** Analysis a color :
+ * - sensor : the sensor number to analysis ;
+ * - mode : for futur use.
+ * return the color number.
+ */
+uint8_t sensor_rvb_analysis_color (uint8_t sensor, uint8_t mode);
+
+/** Update pins connected to the asserv AVR with the colors seen by the
+ * sensors. */
+void sensor_rvb_update_asserv_pins (void);
+
#endif // sensor_rvb_h