Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main'
Browse files Browse the repository at this point in the history
  • Loading branch information
NokkOnEffect committed Dec 11, 2024
2 parents 7e14c9b + 86d1f55 commit f1df296
Show file tree
Hide file tree
Showing 85 changed files with 978 additions and 796 deletions.
4 changes: 2 additions & 2 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
ko_fi: koconnor
custom: https://www.klipper3d.org/Sponsors.html#klipper-developers
ko_fi: kalicocrew
custom: https://docs.kalico.gg/Sponsors.html#the-crew
33 changes: 32 additions & 1 deletion docs/Config_Reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,30 @@ A collection of Kalico-specific system options
#log_webhook_method_register_messages: False
```

## ⚠️ Configuration references

In your configuration, you can reference other values to share
configuration between multiple sections. References take the form of
`${option}` to copy a value in the current section, or
`${section.option}` to look up a value elsewhere in your configuration.

Optionally, a `[constants]` section may be used specifically to store
these values. Unlike the rest of your configuration, unused constants
will show a warning instead of causing an error.

```
[constants]
run_current_ab: 1.0
i_am_not_used: True # Will show "Constant 'i_am_not_used' is unused"
[tmc5160 stepper_x]
run_current: ${constants.run_current_ab}
[tmc5160 stepper_y]
run_current: ${tmc5160 stepper_x.run_current}
# Nested references work, but are not advised
```

## Common kinematic settings

### [printer]
Expand Down Expand Up @@ -1423,6 +1447,13 @@ extended [G-Code command](G-Codes.md#z_tilt) becomes available.

#### [z_tilt_ng]

z_tilt's next generation, adding the Z_TILT_CALIBRATE and Z_TILT_AUTODETECT
extended [G-Code commands](G-Codes.md#z_tilt_ng). Z_TILT_CALIBRATE performs multiple
probing runs to calculate z_offsets, enabling accurate tilt adjustment with fewer
probe points. Z_TILT_AUTODETECT automatically determines pivot positions for each
Z stepper through iterative probing. When this section is present, these extended
commands become available, enhancing bed leveling accuracy and calibration efficiency.

```
[z_tilt_ng]
#z_positions:
Expand Down Expand Up @@ -5714,7 +5745,7 @@ Trad Rack multimaterial system support. See the following documents from the
TradRack repo for additional information:
- [Tuning.md](https://github.com/Annex-Engineering/TradRack/blob/main/docs/Tuning.md):
document referenced by some of the config options below.
- [Trad Rack config reference document](https://github.com/Annex-Engineering/TradRack/blob/main/docs/klipper/Config_Reference.md): contains info on additional config
- [Trad Rack config reference document](https://github.com/Annex-Engineering/TradRack/blob/main/docs/kalico/Config_Reference.md): contains info on additional config
sections that are expected to be used alongside [trad_rack].

```
Expand Down
1 change: 1 addition & 0 deletions docs/Danger_Features.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
- `--rotate-log-at-restart` can be added to your Kalico start script or service to force log rotation every restart.
- [`[virtual_sdcard] with_subdirs`](./Config_Reference.md#virtual_sdcard) enables scanning of subdirectories for .gcode files, for the menu and M20/M23 commands
- [`[firmware_retraction] z_hop_height`](./Config_Reference.md#firmware_retraction) adds an automatic z hop when using firmware retraction
- [`[constants]` and `${constants.value}`](./Config_Reference.md#configuration-references) allow re-using values in your configuration

## Enhanced behavior

Expand Down
24 changes: 17 additions & 7 deletions docs/G-Codes.md
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ from executing.
### [delta_calibrate]

The following commands are available when the
[delta_calibrate] config section is enabled (also see the
[delta_calibrate] config section is enabled (also see the
[delta calibrate guide](Delta_Calibrate.md)).

#### DELTA_CALIBRATE
Expand Down Expand Up @@ -1618,7 +1618,7 @@ specified and it is higher than the extruder's current temperature,
then the extruder will be heated to at least `MIN_TEMP` before
unloading/loading; the current extruder temperature target may be used
instead if it is higher than `MIN_TEMP`, and if not then
[tr_last_heater_target](https://github.com/Annex-Engineering/TradRack/blob/main/docs/klipper/Save_Variables.md)
[tr_last_heater_target](https://github.com/Annex-Engineering/TradRack/blob/main/docs/kalico/Save_Variables.md)
may be used. If `EXACT_TEMP` is specified, the extruder will be heated
to `EXACT_TEMP` before unloading/loading, regardless of any other
temperature setting. If any of the optional length parameters are
Expand All @@ -1643,7 +1643,7 @@ the extruder's current temperature, then the extruder will be heated
to at least `MIN_TEMP` before unloading; the current extruder
temperature target may be used instead if it is higher than
`MIN_TEMP`, and if not then
[tr_last_heater_target](https://github.com/Annex-Engineering/TradRack/blob/main/docs/klipper/Save_Variables.md)
[tr_last_heater_target](https://github.com/Annex-Engineering/TradRack/blob/main/docs/kalico/Save_Variables.md)
may be used. If `EXACT_TEMP` is specified, the extruder will be heated
to `EXACT_TEMP` before unloading/loading, regardless of any other
temperature setting.
Expand Down Expand Up @@ -1738,15 +1738,15 @@ hotend_load_length will be set to the value passed in. If the ADJUST
parameter is used, the adjustment will be added to the current value
of hotend_load_length.

### TR_DISCARD_BOWDEN_LENGTHS
#### TR_DISCARD_BOWDEN_LENGTHS
`TR_DISCARD_BOWDEN_LENGTHS [MODE=[ALL|LOAD|UNLOAD]]`: Discards saved
values for "bowden_load_length" and/or "bowden_unload_length" (see
[bowden lengths](https://github.com/Annex-Engineering/TradRack/blob/main/docs/Tuning.md#bowden-lengths)
for details on how these settings are used). These settings will each
be reset to the value of `bowden_length` from the
[trad_rack config section](Config_Reference.md#trad_rack), and empty
dictionaries will be saved for
[tr_calib_bowden_load_length and tr_calib_bowden_unload_length](https://github.com/Annex-Engineering/TradRack/blob/main/docs/klipper/Save_Variables.md).
[tr_calib_bowden_load_length and tr_calib_bowden_unload_length](https://github.com/Annex-Engineering/TradRack/blob/main/docs/kalico/Save_Variables.md).
"bowden_load_length" and tr_calib_bowden_load_length will be
affected if MODE=LOAD is specified, "bowden_unload_length" and
tr_calib_bowden_unload_length will be affected if MODE=UNLOAD is
Expand Down Expand Up @@ -1876,6 +1876,18 @@ and detach a mag-probe for these commands!
The following commands are available when the
[z_tilt config section](Config_Reference.md#z_tilt) is enabled.

#### Z_TILT_ADJUST
`Z_TILT_ADJUST [HORIZONTAL_MOVE_Z=<value>] [<probe_parameter>=<value>]`: This
command will probe the points specified in the config and then make independent
adjustments to each Z stepper to compensate for tilt. See the PROBE command for
details on the optional probe parameters. The optional `HORIZONTAL_MOVE_Z`
value overrides the `horizontal_move_z` option specified in the config file.

### [z_tilt_ng]

The following commands are available when the
[z_tilt_ng config section](Config_Reference.md#z_tilt_ng) is enabled.

#### Z_TILT_ADJUST
`Z_TILT_ADJUST [HORIZONTAL_MOVE_Z=<value>] [<probe_parameter>=<value>]
[INCREASING_THRESHOLD=<value>]`: This
Expand All @@ -1900,5 +1912,3 @@ configured in the z_tilt_ng section:
small misalgnments of the steppers. The amount of misalignment can be
configured with the DELTA paramter. It iterates until the calculated
positions cannot be improved any further. This is can be lengthy procedure.
IMPORTANT: For the Z_TILT_CALIBRATE and Z_TILT_AUTODETECT commands to work
the numpy package has to be installed via ~/klippy-env/bin/pip install -v numpy.
52 changes: 31 additions & 21 deletions docs/Sponsors.md
Original file line number Diff line number Diff line change
@@ -1,28 +1,38 @@
# Sponsors

Kalico is Free Software. We depend on the generous support from
sponsors. Please consider sponsoring Kalico or supporting our
sponsors.
Kalico is a community-driven, open-source project that is free to use (as in "free beer").
While we don't have official sponsors yet, we are deeply grateful for the generous support
from our community. Every contribution helps us continue improving Kalico for everyone.

## Kalico Developers
If you'd like to support Kalico, donations to our Ko-Fi are more than welcome:
👉 [https://ko-fi.com/kalicocrew](https://ko-fi.com/kalicocrew)

### Rogerio Goncalves (@rogerlz)
## The People behind Kalico

Rogerio initiated the Kalico project, forking the awesome Klipper firmware originally as "Danger-Klipper" to add some bleeding edge spice to it.
### The Crew

Contact: [[email protected]](mailto:[email protected])
| Name | Alias | GitHub |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------- | ------------------------------------------ |
| **Bea Nance**<br>Bea initiated the Kalico project together with Maël, forking the awesome Klipper firmware originally as "Danger-Klipper" to add some bleeding edge spice to it. <br> _"So I saw people wanted some community-driven features in klipper, so i was like "ehh, i'll just fork it and give it a go"_ | bwnance | [@bwnance](https://github.com/bwnance) |
| **Maël Kerbiriou**<br>Maël together with Bea brought Kalico to life. | piezoid | [@Piezoid](https://github.com/Piezoid) |
| **Rogerio Goncalves**<br>Roger chimed in early into the development of Kalico, and has since been a crucial contributor to the project. | rogerlz | [@rogerlz](https://github.com/rogerlz) |
| **Frank Tackitt**<br>Frank started his klipper hacking with exclude_object and just forgot to stop there | frank.af | [@kageurufu](https://github.com/kageurufu) |

### Lasse Dalegaard (@dalegaard)
### Contributors

| Name | Alias | GitHub |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ---------- | ---------------------------------------------------- |
| **Vinzenz Hassert**<br>_"Uhh dunno... I mean I did pid profiles, filament sensors and curve control mainly. And I am best at giving Roger grey hairs cause I do huge pull requests!"_ | LastZeanon | [@LastZeanon](https://github.com/LastZeanon) |
| **Yancey Arrington**<br>Yancey wrote the docs for all the bleeding edge features and model predictive control, otherwise you wouldn't know about all the fancy stuff Kalico brings to the table! He also helps other community members a lot with their questions. What a great guy! | Ray_Boy | [@YanceyA](https://github.com/YanceyA) |
| **Ryan Ghosh**<br>All Ryan cares about are the TradRack and Belay modules of Kalico. How selfish! (no, in fact, that is very generous. Thanks Ryan!) | RyanG | [@rsghosh](https://github.com/rsghosh) |
| **Lasse Dalegaard**<br>Our secret consultant for roasting everything. He also contributed a lot more than he is willing to admit. Silly Lasse. | dalegaard | [@dalegaard](https://github.com/dalegaard) |
| **Philipp Molitor**<br>Phil started hacking around with the docs because he does web stuff and 3D printers, and liked the Kalico Crew so much he just... stuck around.<br>_"Hehehe... I wrote this page!"_ | philm0 | [@PhilippMolitor](https://github.com/PhilippMolitor) |

## Other Kalico Contributors

Contact: [[email protected]](mailto:[email protected])

### Bea Nance (@bwnance)



Contact: [[email protected]](mailto:[email protected])
Kalico is a community effort, and we have a lot more people helping us!
For a full list of people, have a look at the members of
the [GitHub Organization](https://github.com/orgs/KalicoCrew/people) and our [Contributors](https://github.com/KalicoCrew/kalico/graphs/contributors).

## Original Klipper Developers

Expand All @@ -37,16 +47,16 @@ at: [https://ko-fi.com/koconnor](https://ko-fi.com/koconnor) or
### Eric Callahan

Eric is the author of bed_mesh, spi_flash, and several other Klipper
modules. Eric has a donations page at:
modules. Eric has a donations page at:
[https://ko-fi.com/arksine](https://ko-fi.com/arksine)

## Related Kalico Projects

Kalico is frequently used with other Free Software. Consider using or
supporting these projects.

* [Moonraker](https://github.com/Arksine/moonraker)
* [Mainsail](https://github.com/mainsail-crew/mainsail)
* [Fluidd](https://github.com/fluidd-core/fluidd)
* [OctoPrint](https://octoprint.org/)
* [KlipperScreen](https://github.com/jordanruthe/KlipperScreen)
- [Moonraker](https://github.com/Arksine/moonraker)
- [Mainsail](https://github.com/mainsail-crew/mainsail)
- [Fluidd](https://github.com/fluidd-core/fluidd)
- [OctoPrint](https://octoprint.org/)
- [KlipperScreen](https://github.com/jordanruthe/KlipperScreen)
2 changes: 1 addition & 1 deletion docs/Status_Reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -571,7 +571,7 @@ on a cartesian, hybrid_corexy or hybrid_corexz robot
## tools_calibrate

The following information is available in the
[tools_calibrate](Config_Reference.md#️-tools_calibrate) object:
[tools_calibrate](Config_Reference.md#tools_calibrate) object:
- `sensor_location`: Once calibrated, the location of the sensor
- `last_result`: The last tool calibration result
- `calibration_probe_inactive`: Status of the calibration probe as of
Expand Down
4 changes: 2 additions & 2 deletions docs/Z_Calibration.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ But, there are some requirements to use it:
Temperature or humindity changes are not a big deal since the switch is not
affected much by them and all values are probed in a small time period and only
the releations to each other are used. The nozzle height in step 2 can be
determined some time later and even many celsius higher in the printer's
determined some time later and even many Celsius higher in the printer's
chamber, compared to the homing in step 1. That is why the nozzle is probed
again and can vary a little to the first homing position.

Expand Down Expand Up @@ -286,4 +286,4 @@ at 250, you can preheat the nozzle to 180, and run this script before finishing
temperature. This may have varying effects depending on temperatures used.

Also consider picking up your probe prior to your nozzle wipe, to allow this script to probe the
nozzle immediately after cleaning it.
nozzle immediately after cleaning it.
3 changes: 3 additions & 0 deletions klippy/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
APP_NAME = "Kalico"

from .printer import * # noqa: E402, F403
3 changes: 3 additions & 0 deletions klippy/__main__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from .printer import main

main()
20 changes: 20 additions & 0 deletions klippy/compat.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import sys


def hotpatch_modules():
"""
This is a compatibility shim for legacy external modules
to fix
Redirect legacy `import x` to `import klippy.x`
"""

for module_name, module in list(sys.modules.items()):
if not module_name.startswith("klippy."):
continue

hotpatched_name = module_name.removeprefix("klippy.")
if hotpatched_name in sys.modules:
continue

sys.modules[hotpatched_name] = module
Loading

0 comments on commit f1df296

Please sign in to comment.