Skip to content

Commit

Permalink
Merge pull request #1356 from missionpinball/fast_newer_firmwares
Browse files Browse the repository at this point in the history
allow newer fast firmwares
  • Loading branch information
jabdoa2 committed May 1, 2019
2 parents 0f31aa0 + c2c8dee commit f50a6c3
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions mpf/platforms/fast/fast_serial_communicator.py
Expand Up @@ -186,15 +186,15 @@ def query_fast_io_boards(self):
If so, queries the IO boards to log them and make sure they're the proper firmware version.
"""
# reset CPU early
if StrictVersion(self.remote_firmware) >= StrictVersion("1.03"):
self.platform.debug_log('Resetting NET CPU.')
self.writer.write('BC:\r'.encode())
msg = ''
while not msg.startswith('BC:P\r'):
msg = (yield from self.readuntil(b'\r')).decode()
yield from asyncio.sleep(.1, loop=self.machine.clock.loop)
else:
self.platform.log.warning("Not resetting FAST NET because firmware is currently broken.")
self.platform.debug_log('Resetting NET CPU.')
self.writer.write('BC:\r'.encode())
msg = ''
while not msg.startswith('BC:P\r') and not msg.startswith('XX:F\r'):
msg = (yield from self.readuntil(b'\r')).decode()
if msg != 'BC:P\r':
self.platform.warning_log("Reset on the NET CPU failed (this might be normal on older firmwares)")

yield from asyncio.sleep(.1, loop=self.machine.clock.loop)

self.platform.debug_log('Reading all switches.')
self.writer.write('SA:\r'.encode())
Expand Down

0 comments on commit f50a6c3

Please sign in to comment.