From c60d987228c653e19ce9f9386b3fef7fc28cb396 Mon Sep 17 00:00:00 2001 From: dufourj Date: Wed, 24 May 2006 23:24:17 +0000 Subject: Es : - analysis system for seen color. ES : - add stat function for hole RVB sensor. --- n/es-2006/src/main.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'n') diff --git a/n/es-2006/src/main.c b/n/es-2006/src/main.c index 172c385..ca3fec1 100644 --- a/n/es-2006/src/main.c +++ b/n/es-2006/src/main.c @@ -58,6 +58,8 @@ uint8_t others_jackcolor_stat_enable, others_jackcolor_stats; /* Stat for RVB front sensors */ uint8_t sniff_rvb_front_enable, sniff_rvb_front_stats; +/* Stat for RVB hole sensor */ +uint8_t sniff_rvb_hole_enable, sniff_rvb_hole_stats; /* XXX Debug stats */ uint8_t main_stats[4]; @@ -151,6 +153,10 @@ proto_callback (uint8_t cmd, uint8_t size, uint8_t *args) case c ('C', 1): sniff_rvb_front_enable = sniff_rvb_front_stats = args[0]; break; + /* RVB Hole sensor */ + case c ('D', 1): + sniff_rvb_hole_enable = sniff_rvb_hole_stats = args[0]; + break; /* Enable all sensors */ case c ('u', 1): sensor_rvb_upper_sensors (args[0]); @@ -354,6 +360,18 @@ main (void) else sniff_rvb_front_stats = 1; } + /* RVB Hole */ + if (sniff_rvb_hole_enable && !--sniff_rvb_hole_stats) + { + if (sensor_rvb_state_sleeeping ()) + { + /* Re init stats system for this sensor */ + sniff_rvb_hole_stats = sniff_rvb_hole_enable; + proto_send1b ('D', sniff_rvb_analysis_ball (5)); + } + else + sniff_rvb_hole_stats = 1; + } main_stats[1] = TCNT0; -- cgit v1.2.3