summaryrefslogtreecommitdiff
path: root/n/es-2006/src/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'n/es-2006/src/main.c')
-rw-r--r--n/es-2006/src/main.c18
1 files changed, 18 insertions, 0 deletions
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;