Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allow newer fast firmwares #1356

Merged
merged 1 commit into from
May 1, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions mpf/platforms/fast/fast_serial_communicator.py
Original file line number Diff line number Diff line change
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