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

disable heaters if a specified mcu is connected #425

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

Zeanon
Copy link
Contributor

@Zeanon Zeanon commented Nov 4, 2024

Fixes #424

Checklist

  • pr title makes sense
  • squashed to 1 commit
  • added a test case if possible
  • if new feature, added to the readme
  • ci is happy and green

@Zeanon Zeanon requested a review from a team as a code owner November 4, 2024 23:36
@Zeanon Zeanon changed the title Disable heater ADXL Disable heaters Nov 4, 2024
klippy/extras/heaters.py Outdated Show resolved Hide resolved
klippy/extras/adxl345.py Outdated Show resolved Hide resolved
README.md Outdated
@@ -126,6 +126,8 @@ See the [Danger Features document](https://dangerklipper.io/Danger_Features.html

- [danger_options: configurable homing constants](https://github.com/DangerKlippers/danger-klipper/pull/378)

- [adxl: disable heaters when connected](https://github.com/DangerKlippers/danger-klipper/pull/425)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the message needs improving

@@ -1091,7 +1091,9 @@ per_move_pressure_advance: False
# If true, uses pressure advance constant from trapq when processing moves
# This causes changes to pressure advance be taken into account immediately,
# for all moves in the current queue, rather than ~250ms later once the queue gets flushed

#disable_if_connected:
# List of mcus that should disable the heater if connected, usefull for nozzle adxls
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo in useful

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Whoops

@@ -61,6 +61,11 @@ def __init__(self, config, sensor):
self.printer.get_start_args().get("debugoutput") is not None
)
self.can_extrude = self.min_extrude_temp <= 0.0 or is_fileoutput
self.disable_if_connected = []
if hasattr(config, "getlist"):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why the hasattr()?

Copy link
Contributor Author

@Zeanon Zeanon Dec 10, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cause some dummy configs don't have that attribute and I ran into issues without it in the older version
Probably not needed anymore since we are now checking in heaters and not adxl

@rogerlz rogerlz changed the title ADXL Disable heaters disable heaters if a specified mcu is connected Dec 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature request: Disable heaters when specified MCUs are active
3 participants