scottgchin / delta5_race_timer

Multi-node video transmitter race timer for drone racing
MIT License
159 stars 62 forks source link

list index out of range #84

Closed spuder closed 6 years ago

spuder commented 6 years ago

The delta5 timer was working yesterday, but today when I try and start it, the service exits with error list index out of range

journalctl -xe 
.....
Aug 20 02:34:01 delta5 python[724]: No node at address 8
Aug 20 02:34:01 delta5 python[724]: Node FOUND at address 10
Aug 20 02:34:01 delta5 python[724]: Node FOUND at address 12
Aug 20 02:34:01 delta5 python[724]: Node FOUND at address 14
Aug 20 02:34:01 delta5 python[724]: No node at address 16
Aug 20 02:34:01 delta5 python[724]: No node at address 18
Aug 20 02:34:01 delta5 python[724]: No node at address 20
Aug 20 02:34:01 delta5 python[724]: No node at address 22
Aug 20 02:34:01 delta5 python[724]: Traceback (most recent call last):
Aug 20 02:34:01 delta5 python[724]:   File "server.py", line 33, in <module>
Aug 20 02:34:01 delta5 python[724]:     INTERFACE = get_hardware_interface()
Aug 20 02:34:01 delta5 python[724]:   File "../delta5interface/Delta5Interface.py", line 343, in get_hardware_interface
Aug 20 02:34:01 delta5 python[724]:     return Delta5Interface()
Aug 20 02:34:01 delta5 python[724]:   File "../delta5interface/Delta5Interface.py", line 104, in __init__
Aug 20 02:34:01 delta5 python[724]:     self.set_calibration_threshold(node.index, self.calibration_threshold)
Aug 20 02:34:01 delta5 python[724]:   File "../delta5interface/Delta5Interface.py", line 270, in set_calibration_threshold
Aug 20 02:34:01 delta5 python[724]:     node = self.nodes[node_index]
Aug 20 02:34:01 delta5 python[724]: IndexError: list index out of range
Aug 20 02:34:01 delta5 systemd[1]: delta5.service: Main process exited, code=exited, status=1/FAILURE
Aug 20 02:34:01 delta5 systemd[1]: delta5.service: Unit entered failed state.
Aug 20 02:34:01 delta5 systemd[1]: delta5.service: Failed with result 'exit-code'.
Aug 20 02:34:07 delta5 kernel: Voltage normalised (0x00000000)

Not sure how to recover from this. How does self.nodes[node_index] go out of range?

scottgchin commented 6 years ago

It doesn't like that the first node is missing. Check the connections on that node, it's not talking to the pi over i2c