manu-fwi / openlcb-gateway

Gateway from openlcb to cmri (and more)
GNU General Public License v3.0
3 stars 1 forks source link

RR_duino_net_serial.py: NameError: name 'CMD_TURNOUT_FINE_TUNE' is not defined #6

Closed ggee closed 4 years ago

ggee commented 4 years ago

This occurs every time a node goes down.

trying to wake dead nodes up dict_items([])
trying to wake dead nodes up dict_items([])
node of address 2 is down
1597193409.635173 1597193409.8353212 2
fullID_from_address: 2002003
dict_items([(2002002, <__main__.RR_duino_node object at 0x76913ab0>), (2002003, <__main__.RR_duino_node object at 0x76913af0>)])
trying to wake dead nodes up dict_items([(2002003, <__main__.RR_duino_node object at 0x76913af0>)])
Timed out!
trying to wake dead nodes up dict_items([(2002003, <__main__.RR_duino_node object at 0x76913af0>)])
Timed out!
trying to wake dead nodes up dict_items([(2002003, <__main__.RR_duino_node object at 0x76913af0>)])
Timed out!
trying to wake dead nodes up dict_items([(2002003, <__main__.RR_duino_node object at 0x76913af0>)])
Timed out!
node of address 1 is down
1597193433.005121 1597193433.2052572 1
fullID_from_address: 2002002
dict_items([(2002002, <__main__.RR_duino_node object at 0x76913ab0>)])
trying to wake dead nodes up dict_items([(2002002, <__main__.RR_duino_node object at 0x76913ab0>), (2002003, <__main__.RR_duino_node object at 0x76913af0>)])
Timed out!
Traceback (most recent call last):
  File "RR_duino_net_serial.py", line 325, in <module>
    if RR_duino.RR_duino_message.is_complete_message(message_to_send):
  File "/home/pi/openlcb-gateway/openlcb_RR_duino_nodes.py", line 383, in is_complete_message
    return is_cmd_add_message(message)
  File "/home/pi/openlcb-gateway/openlcb_RR_duino_nodes.py", line 346, in is_cmd_add_message
    return msg.get_special_config()!=CMD_TURNOUT_FINE_TUNE
NameError: name 'CMD_TURNOUT_FINE_TUNE' is not defined
ggee commented 4 years ago

Fixed by #1

ggee commented 4 years ago

Changed reference from CMD_TURNOUT_FINE_TUNE to RR_duino_message.CMD_TURNOUT_FINE_TUNE.

manu-fwi commented 4 years ago

Thanks!