def rhMonitorThread (memory_service):
t = threading.currentThread()
while getattr(t, "do_run", True):
sonarValues = memory_service.getListData(sonarValueList)
# print "Sonar: [Front, Back]", sonarValues
laserValues = memory_service.getListData(laserValueList)
# print "Laser center: ", laserValues[42],laserValues[44],laserValues[46] # X values of central beams
# TODO
if (laserValues[42]>2 and laserValues[44]>2 and laserValues[46]>2):
v = 'true'
else:
v = 'false'
set_condition(memory_service,'dooropen',v)
# print 'dooropen = ',v
time.sleep(1)
print "dooropen thread quit"
评论列表
文章目录