-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Klipper on commit: cba119d Moonraker on commit: eff0901 Mainsail version: v2.5.1
- Loading branch information
Showing
5 changed files
with
17 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,16 @@ | ||
|
||
|
||
# [gcode_macro Rotation_Distance] | ||
# gcode: | ||
# # Rotation = ((valeur slicer x Rotation actuelle) / Valeur Reelle) | ||
# # Calcul de la rotation de distance | ||
# {% set Valeur_Slicer = params.VALEUR_SLICER|default(150)|int %} | ||
# {% set Rotation_Actuelle = params.ROTATION_ACTUELLE|default(40)|int %} | ||
# {% set Valeur_Reelle = params.VALEUR_REELLE|default(100)|int %} | ||
# # Affichage des valeurs des variables pour débogage | ||
# - M117 "Valeur_Slicer= { Valeur_Slicer } | Rotation_Actuelle= { Rotation_Actuelle } | Valeur_Reelle= { Valeur_Reelle }" | ||
# {% set Rotation_Distance = (Valeur_Slicer * Rotation_Actuelle) / Valeur_Reelle %} | ||
|
||
# { action_respond_info("Nouvelle_Rotation_Distance: Valeur_Slicer=%d, Rotation_Actuelle=%d, Valeur_Reelle=%d" % (Valeur_Slicer, Rotation_Actuelle, Valeur_Reelle)) } | ||
# # Affichage du résultat pour débogage | ||
# - M117 "Rotation_Distance= { Nouvelle_Rotation_Distance }" | ||
# # Envoi de la commande G-code avec le résultat évalué | ||
# - Nouvelle_Rotation_Distance= { '%.2f' % Rotation_Distance } | ||
|
||
|
||
[gcode_macro Rotation_Distance] | ||
[gcode_macro Rotation_Distance_X] | ||
gcode: | ||
# Rotation = ((valeur slicer x Rotation actuelle) / Valeur Reelle) | ||
# Calcul de la rotation de distance | ||
{% set Valeur_Slicer = params.VALEUR_SLICER|default(150)|float %} | ||
{% set Valeur_Slicer = params.VALEUR_SLICER|default(120)|float %} | ||
{% set Rotation_Actuelle = params.ROTATION_ACTUELLE|default(40)|float %} | ||
{% set Valeur_Reelle = params.VALEUR_REELLE|default(100)|float %} | ||
# Affichage des valeurs des variables pour débogage | ||
- M117 "Valeur_Slicer= { Valeur_Slicer } | Rotation_Actuelle= { Rotation_Actuelle } | Valeur_Reelle= { Valeur_Reelle }" | ||
{% set Rotation_Distance = (Valeur_Slicer * Rotation_Actuelle) / Valeur_Reelle %} | ||
|
||
{ action_respond_info("Nouvelle_Rotation_Distance: Valeur_Slicer=%.2f, Rotation_Actuelle=%.2f, Valeur_Reelle=%.2f" % (Valeur_Slicer, Rotation_Actuelle, Valeur_Reelle)) } | ||
{% set Rotation_Distance = (Valeur_Reelle * Rotation_Actuelle) / Valeur_Slicer %} | ||
# {% set Rotation_Distance = (Valeur_Slicer * Rotation_Actuelle) / Valeur_Reelle %} | ||
# Affichage du résultat pour débogage | ||
- M117 "Rotation_Distance= { Nouvelle_Rotation_Distance }" | ||
# Envoi de la commande G-code avec le résultat évalué | ||
- Nouvelle_Rotation_Distance= { '%.2f' % Rotation_Distance } | ||
- M117 "Rotation_Distance= { Rotation_Distance }" | ||
- Nouvelle_Rotation_Distance= { '%.2f' % Rotation_Distance } | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters