@@ -211,7 +211,7 @@ def connect(self, device):
211
211
if self .ignore_smoothie_sd :
212
212
for axis in 'xyz' :
213
213
self .set_steps_per_mm (
214
- axis , self .defaults ['config' ].get (
214
+ axis , self .saved_settings ['config' ].get (
215
215
self .CONFIG_STEPS_PER_MM [axis ]))
216
216
return self .calm_down ()
217
217
@@ -527,9 +527,9 @@ def calibrate_steps_per_mm(self, axis, expected_travel, actual_travel):
527
527
def set_head_speed (self , rate = None ):
528
528
if rate :
529
529
self .head_speed = rate
530
- self .defaults ['DEFAULT' ]['head_speed' ] = str (self .head_speed )
530
+ self .saved_settings ['DEFAULT' ]['head_speed' ] = str (self .head_speed )
531
531
with open (CONFIG_FILE_PATH , 'w' ) as configfile :
532
- self .defaults .write (configfile )
532
+ self .saved_settings .write (configfile )
533
533
kwargs = {"F" : self .head_speed }
534
534
res = self .send_command (self .SET_SPEED , ** kwargs )
535
535
return res == b'ok'
@@ -625,7 +625,7 @@ def set_steps_per_mm(self, axis, value):
625
625
'{0}: {1}' .format (self .SMOOTHIE_ERROR , res ))
626
626
627
627
def get_config_value (self , key ):
628
- res = self .defaults ['config' ].get (key )
628
+ res = self .saved_settings ['config' ].get (key )
629
629
if not self .ignore_smoothie_sd :
630
630
command = '{0} {1}' .format (self .CONFIG_GET , key )
631
631
res = self .send_command (command ).decode ().split (' ' )[- 1 ]
@@ -637,9 +637,9 @@ def set_config_value(self, key, value):
637
637
command = '{0} {1} {2}' .format (self .CONFIG_SET , key , value )
638
638
res = self .send_command (command )
639
639
success = res .decode ().split (' ' )[- 1 ] == str (value )
640
- self .defaults ['config' ][key ] = value
640
+ self .saved_settings ['config' ][key ] = value
641
641
with open (CONFIG_FILE_PATH , 'w' ) as configfile :
642
- self .defaults .write (configfile )
642
+ self .saved_settings .write (configfile )
643
643
return success
644
644
645
645
def get_endstop_switches (self ):
0 commit comments