git.droids-corp.org
/
aversive.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
6e25ac3
)
enhance debug sensors on ballboard
author
zer0
<zer0@carbon.local>
Sun, 2 May 2010 22:41:35 +0000
(
00:41
+0200)
committer
zer0
<zer0@carbon.local>
Sun, 2 May 2010 22:41:35 +0000
(
00:41
+0200)
projects/microb2010/ballboard/sensor.c
patch
|
blob
|
history
diff --git
a/projects/microb2010/ballboard/sensor.c
b/projects/microb2010/ballboard/sensor.c
index
fe7f92a
..
92b1c47
100644
(file)
--- a/
projects/microb2010/ballboard/sensor.c
+++ b/
projects/microb2010/ballboard/sensor.c
@@
-235,7
+235,8
@@
static void do_boolean_sensors(void *dummy)
IRQ_UNLOCK(flags);
}
IRQ_UNLOCK(flags);
}
-static volatile uint8_t lcob_seen = I2C_COB_NONE, rcob_seen = I2C_COB_NONE;
+static volatile uint8_t lcob_seen = I2C_COB_NONE;
+static volatile uint8_t rcob_seen = I2C_COB_NONE;
uint8_t cob_detect_left(void)
{
uint8_t cob_detect_left(void)
{
@@
-298,6
+299,12
@@
static void do_cob_detection(void)
else
lcob_seen = I2C_COB_BLACK;
IRQ_UNLOCK(flags);
else
lcob_seen = I2C_COB_BLACK;
IRQ_UNLOCK(flags);
+ if (l_cpt_on > l_cpt_off)
+ DEBUG(E_USER_SENSOR, "left white %d %d",
+ l_cpt_on, l_cpt_off);
+ else
+ DEBUG(E_USER_SENSOR, "left black %d %d",
+ l_cpt_on, l_cpt_off);
}
}
}
}
@@
-328,6
+335,13
@@
static void do_cob_detection(void)
else
rcob_seen = I2C_COB_BLACK;
IRQ_UNLOCK(flags);
else
rcob_seen = I2C_COB_BLACK;
IRQ_UNLOCK(flags);
+
+ if (r_cpt_on > r_cpt_off)
+ DEBUG(E_USER_SENSOR, "right white %d %d",
+ r_cpt_on, r_cpt_off);
+ else
+ DEBUG(E_USER_SENSOR, "right black %d %d",
+ r_cpt_on, r_cpt_off);
}
}
}
}