@@ -4278,38 +4278,40 @@ def material_reload_pin_changed(self, halpin):
42784278 def material_temp_pin_changed (self , halpin ):
42794279 if halpin :
42804280 t_name = 'Temporary {}' .format (halpin )
4281- t_item = 0
4281+ k_width , p_height , p_delay , pj_height , pj_delay , c_height , \
4282+ c_speed , c_amps , c_volts , pause , g_press , c_mode , t_item = \
4283+ 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0
42824284 with open (self .tmpMaterialFileGCode , 'r' ) as f_in :
42834285 for line in f_in :
4284- if line .startswith ('name ' ):
4286+ if line .startswith ('NAME ' ):
42854287 t_name = line .split ('=' )[1 ].strip ()
4286- if line .startswith ('kerf_width ' ):
4288+ if line .startswith ('KERF_WIDTH ' ):
42874289 k_width = float (line .split ('=' )[1 ].strip ())
4288- elif line .startswith ('pierce_height ' ):
4290+ elif line .startswith ('PIERCE_HEIGHT ' ):
42894291 p_height = float (line .split ('=' )[1 ].strip ())
4290- elif line .startswith ('pierce_delay ' ):
4292+ elif line .startswith ('PIERCE_DELAY ' ):
42914293 p_delay = float (line .split ('=' )[1 ].strip ())
4292- elif line .startswith ('puddle_jump_height ' ):
4294+ elif line .startswith ('PUDDLE_JUMP_HEIGHT ' ):
42934295 pj_height = float (line .split ('=' )[1 ].strip ())
4294- elif line .startswith ('puddle_jump_delay ' ):
4296+ elif line .startswith ('PUDDLE_JUMP_DELAY ' ):
42954297 pj_delay = float (line .split ('=' )[1 ].strip ())
4296- elif line .startswith ('cut_height ' ):
4298+ elif line .startswith ('CUT_HEIGHT ' ):
42974299 c_height = float (line .split ('=' )[1 ].strip ())
4298- elif line .startswith ('cut_speed ' ):
4300+ elif line .startswith ('CUT_SPEED ' ):
42994301 c_speed = float (line .split ('=' )[1 ].strip ())
4300- elif line .startswith ('cut_amps ' ):
4302+ elif line .startswith ('CUT_AMPS ' ):
43014303 c_amps = float (line .split ('=' )[1 ].strip ())
4302- elif line .startswith ('cut_volts ' ):
4304+ elif line .startswith ('CUT_VOLTS ' ):
43034305 c_volts = float (line .split ('=' )[1 ].strip ())
4304- elif line .startswith ('pause_at_end ' ):
4306+ elif line .startswith ('PAUSE_AT_END ' ):
43054307 pause = float (line .split ('=' )[1 ].strip ())
4306- elif line .startswith ('gas_pressure ' ):
4308+ elif line .startswith ('GAS_PRESSURE ' ):
43074309 g_press = float (line .split ('=' )[1 ].strip ())
4308- elif line .startswith ('cut_mode ' ):
4310+ elif line .startswith ('CUT_MODE ' ):
43094311 c_mode = float (line .split ('=' )[1 ].strip ())
43104312 self .write_materials (halpin , t_name , k_width , p_height , \
43114313 p_delay , pj_height , pj_delay , c_height , c_speed , \
4312- c_amps , c_volts , pause , g_press , c_mode , 0 )
4314+ c_amps , c_volts , pause , g_press , c_mode , t_item )
43134315 self .display_materials ()
43144316 self .change_material (0 )
43154317 self .w .materials_box .setCurrentIndex (0 )
0 commit comments