File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -36,6 +36,7 @@ def __init__(self, config):
3636 # Current to use while printing, set to a lower current to reduce stepper heat when printing.
3737 # Defaults to global_print_current, if not specified current is not changed.
3838 self .tmc_print_current = config .getfloat ("print_current" , self .afc .global_print_current )
39+ self .tmc_load_current = None
3940 if self .tmc_print_current is not None :
4041 self ._get_tmc_values ( config )
4142
@@ -167,7 +168,7 @@ def _set_current(self, current):
167168
168169 :param current: Sets TMC current to specified value
169170 """
170- if self .tmc_print_current is not None :
171+ if self .tmc_print_current is not None and current is not None :
171172 self .gcode .run_script_from_command ("SET_TMC_CURRENT STEPPER='{}' CURRENT={}" .format (self .name , current ))
172173
173174 def set_load_current (self ):
You can’t perform that action at this time.
0 commit comments