mcu: Contact and identify all the mcus prior to configuring them

Break up the connect phase into two phases - mcu_identify and connect.
The first phase will contact all the micro-controllers and obtain the
"identify" data dictionaries for them.  Once all the micro-controllers
have been contacted, then they can be configured.  This fixes an issue
with FIRMWARE_RESTART not working correctly on multi-mcu setups that
use restart_method=command.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor 2019-11-04 23:00:00 -05:00
parent 0b90337d59
commit 5eb5841eaf
2 changed files with 24 additions and 20 deletions

View file

@ -132,6 +132,7 @@ class Printer:
def _connect(self, eventtime):
try:
self._read_config()
self.send_event("klippy:mcu_identify")
for cb in self.event_handlers.get("klippy:connect", []):
if self.state_message is not message_startup:
return