Hardware Reference
In-Depth Information
if (diffTime.seconds < 5):
if ((sensor==OUTER_BEAM) and (eventType==UNBROKEN)):
debug (str(eventTime)+” BIRD has left”)
outwardTimes.append(date2num(eventTime))
state = “IDLE”
if ((sensor==INNER_BEAM) and (eventType==BROKEN)):
debug (“inside has broken again -- ;
waiting for it to clear again”)
state = “WAITING_OUTWARD_NOISE_CLEAR”
else:
debug (“timeout on waiting outward O Clear”)
state= “IDLE”
elif (state == “WAITING_OUTWARD_NOISE_CLEAR”):
if (diffTime.seconds < 5):
if ((sensor==INNER_BEAM) and (eventType==UNBROKEN)):
debug (“inside cleared again, waiting for;
outside to clear”)
state = “WAITING_OUTWARD_O_CLEAR”
else:
debug (“timeout on waiting outward noise Clear”)
state= “IDLE”
#set of states for bird coming in
elif (state == “INWARD_BOUND”):
if (diffTime.seconds < 5):
if ((sensor==OUTER_BEAM) and (eventType==UNBROKEN)):
debug (“outside bob out”)
state = “IDLE”
elif ((sensor==INNER_BEAM) and (eventType==BROKEN)):
debug (“inward”)
state = “WAITING_INWARD_O_CLEAR”
elif (state == “WAITING_INWARD_O_CLEAR”):
if (diffTime.seconds < 5):
if ((sensor==OUTER_BEAM) and (eventType==UNBROKEN)):
debug (“outside cleared, waiting for inside;
to clear”)
continued
Search WWH ::




Custom Search