Detecting optional cliff sensors.

0 views
Skip to first unread message

grudolph

unread,
Jul 25, 2008, 1:00:47 PM7/25/08
to Systronix TrackBot
The javadoc for com.systronix.trackbot.Events class states the
following:

"This class also adjusts for whether cliff sensors are attached or
not. If it is determined that no cliff sensors are attached, then the
corresponding event bits are set to '1'. The problem is that there is
no way to tell the difference between cliff sensors not being present
and all the cliff sensors seeing a cliff. If a cliff is detected, the
corresponding bits will be set to '0', and this is what will happen
with cliff sensors being absent.

To determine whether cliff sensors are present, the first sensor node
reading is examined. If all the cliff sensor bits are set to '0', then
it is assumed that there are no cliff sensors attached. All future
sensor node readings are then modified to detect the floor. If, at
some point in the future, any cliff readings contain '1', then cliff
sensors must be attached, and all future readings are not modified."

I think it world be more reliable to set an additional flag in
software that indicates whether cliff sensors exist. This could be set
as a system property, like other settings. This would change the
'software interface a bit, but remove the ambiguity in readings.
Reply all
Reply to author
Forward
0 new messages