theoretical fix for version3 format
This commit is contained in:
parent
c1e808c272
commit
d6f1408c2c
@ -261,30 +261,25 @@ class SecondaryMonitor(Thread):
|
|||||||
continue
|
continue
|
||||||
|
|
||||||
self.lastpacket_timestamp = time.time()
|
self.lastpacket_timestamp = time.time()
|
||||||
|
|
||||||
|
rmode = 0
|
||||||
if self._parser.is_v30:
|
if self._parser.is_v30:
|
||||||
if self._dict["RobotModeData"]["robotMode"] == 7 \
|
rmode = 7
|
||||||
and self._dict["RobotModeData"]["isRealRobotEnabled"] == True \
|
|
||||||
and self._dict["RobotModeData"]["isEmergencyStopped"] == False \
|
if self._dict["RobotModeData"]["robotMode"] == rmode \
|
||||||
and self._dict["RobotModeData"]["isSecurityStopped"] == False \
|
and self._dict["RobotModeData"]["isRealRobotEnabled"] == True \
|
||||||
and self._dict["RobotModeData"]["isRobotConnected"] == True \
|
and self._dict["RobotModeData"]["isEmergencyStopped"] == False \
|
||||||
and self._dict["RobotModeData"]["isPowerOnRobot"] == True:
|
and self._dict["RobotModeData"]["isSecurityStopped"] == False \
|
||||||
self.running = True
|
and self._dict["RobotModeData"]["isRobotConnected"] == True \
|
||||||
|
and self._dict["RobotModeData"]["isPowerOnRobot"] == True:
|
||||||
|
self.running = True
|
||||||
else:
|
else:
|
||||||
if self._dict["RobotModeData"]["robotMode"] == 0 \
|
if self.running:
|
||||||
and self._dict["RobotModeData"]["isRealRobotEnabled"] == True \
|
self.logger.error("Robot not running: " + str(self._dict["RobotModeData"]))
|
||||||
and self._dict["RobotModeData"]["isEmergencyStopped"] == False \
|
self.running = False
|
||||||
and self._dict["RobotModeData"]["isSecurityStopped"] == False \
|
with self._dataEvent:
|
||||||
and self._dict["RobotModeData"]["isRobotConnected"] == True \
|
#print("X: new data")
|
||||||
and self._dict["RobotModeData"]["isPowerOnRobot"] == True:
|
self._dataEvent.notifyAll()
|
||||||
self.running = True
|
|
||||||
else:
|
|
||||||
if self.running:
|
|
||||||
self.logger.error("Robot not running: " + str(self._dict["RobotModeData"]))
|
|
||||||
self.running = False
|
|
||||||
with self._dataEvent:
|
|
||||||
#print("X: new data")
|
|
||||||
self._dataEvent.notifyAll()
|
|
||||||
|
|
||||||
def _get_data(self):
|
def _get_data(self):
|
||||||
"""
|
"""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user