summaryrefslogtreecommitdiff
path: root/n/es-2006/src/sniff_rvb.h
diff options
context:
space:
mode:
Diffstat (limited to 'n/es-2006/src/sniff_rvb.h')
-rw-r--r--n/es-2006/src/sniff_rvb.h26
1 files changed, 7 insertions, 19 deletions
diff --git a/n/es-2006/src/sniff_rvb.h b/n/es-2006/src/sniff_rvb.h
index 313af5a..b318485 100644
--- a/n/es-2006/src/sniff_rvb.h
+++ b/n/es-2006/src/sniff_rvb.h
@@ -36,6 +36,8 @@
#define RVB_SNIFF_BLUE 1
#define RVB_SNIFF_RED 2
#define RVB_SNIFF_OTHER 3
+#define RVB_SNIFF_BLACK 4
+#define RVB_SNIFF_WHITE 5
/** Mode for color detection
* ONLY_GREEN is faster but tells only if it's green or not
@@ -44,30 +46,11 @@
#define RVB_SNIFF_ALL_COLORS 1
-/** Used for blue/red test */
-#define RVB_THRESHOLD_POSITIVE 0
-#define RVB_THRESHOLD_NEGATIVE 1
-
-#define RVB_THRESHOLD_BLUE 0
-#define RVB_THRESHOLD_RED 1
-
-/** Reference color. */
-extern uint16_t sniff_rvb_reference_color[RVB_MAX_SENSOR][RVB_SNIFF_MAX_INDEX];
-/** Threshold table data. */
-extern uint16_t sniff_rvb_threshold[2][RVB_MAX_SENSOR][RVB_SNIFF_MAX_INDEX];
-/** Used to build threshold */
-extern uint8_t sniff_rvb_sign[2][RVB_MAX_SENSOR][RVB_SNIFF_MAX_INDEX];
-
/** 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 sniff_rvb_set_ref_color (uint8_t sensor, uint8_t color);
-/** Set the threshold of the differents colors.
- * There are used for the algorithm that distinguish colors.
- */
-void sniff_rvb_set_threshold (uint8_t color, int16_t red_ts, int16_t
- blue_ts, int16_t clear_ts, int16_t green_ts);
/** Analysis a color :
* - sensor : the sensor number to analysis ;
@@ -76,6 +59,11 @@ void sniff_rvb_set_threshold (uint8_t color, int16_t red_ts, int16_t
*/
uint8_t sniff_rvb_analysis_color (uint8_t sensor, uint8_t mode);
+/* Test "barillet" black/white
+ * - sensor : the sensor number to analysis ;
+*/
+uint8_t sniff_rvb_ball (uint8_t sensor);
+
/** Configure the sensor analysis system.
* - ref_ratio : ratio for the reference color.
*/