Skip to content
Open
Show file tree
Hide file tree
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
6 changes: 5 additions & 1 deletion docs/Config_Reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,11 @@ serial:
#is_non_critical: False
# Setting this to True will allow the mcu to be disconnected and
# reconnected at will without errors. Helpful for USB-accelerometer boards
# and USB/CAN-probes
# and USB-probes
#is_child_mcu: False
# Setting this to True will allow the mcu to loose communication during firmware restart.
# This is helpful when it is connected through a usb hub on another mcu which keeps power
# during firmware restart but not communication
```

### [mcu my_extra_mcu]
Expand Down
1 change: 1 addition & 0 deletions docs/Kalico_Additions.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
## Additional configuration options

- [`[mcu] is_non_critical`](./Config_Reference.md#mcu) enables marking of an mcu as optional - it can be freely disconnected and connected at will. (useful for MCU-based accelerometer boards, mcu-based probes that shut down in hot chambers, etc...)
- [`[mcu] is_child_mcu`](./Config_Reference.md#mcu) enables marking of an mcu as a child - this means the mcu may loose communication because the mcu it's connected to keeps power during firmware reset but not the usb communication. (useful for MCUs connected through Orbitool usb hub or other similar toolboard mcus with a usb hub, etc...)
- [`[danger_options]`](./Config_Reference.md#danger-options) - New configuration options to adjust Kalico values that were previously hidden
- Additional kinematics versions enabled per-axis acceleration, see [limited_cartesian](./Config_Reference.md#cartesian-kinematics-with-limits-for-x-and-y-axes) and [limited_corexy](./Config_Reference.md#corexy-kinematics-with-limits-for-x-and-y-axes)
- `--rotate-log-at-restart` can be added to your Kalico start script or service to force log rotation every restart.
Expand Down
7 changes: 6 additions & 1 deletion klippy/mcu.py
Original file line number Diff line number Diff line change
Expand Up @@ -768,6 +768,7 @@ def __init__(self, config, clocksync):
self._name = config.get_name()
if self._name.startswith("mcu "):
self._name = self._name[4:]
self._child_mcu = self._config.getboolean("child_mcu", False)
# Serial port
wp = "mcu '%s': " % (self._name)
self._serial = serialhdl.SerialReader(
Expand Down Expand Up @@ -1136,7 +1137,11 @@ def _connect(self):
start_reason = self._printer.get_start_args().get(
"start_reason"
)
if start_reason == "firmware_restart":

# if we are a child mcu that means we have a usb hub on another mcu that provides power
# during firmware_reset but the connection drops.
# We can skip erroring because either we have already ran the firmware reset or it will happen soon
if start_reason == "firmware_restart" and not self._child_mcu:
raise error(
"Failed automated reset of MCU '%s'" % (self._name,)
)
Expand Down
Loading