@@ -4226,9 +4226,6 @@ void process_commands()
4226
4226
#endif
4227
4227
4228
4228
if (!buflen) return ; // empty command
4229
- #ifdef FILAMENT_RUNOUT_SUPPORT
4230
- SET_INPUT (FR_SENS);
4231
- #endif
4232
4229
4233
4230
#ifdef CMDBUFFER_DEBUG
4234
4231
SERIAL_ECHOPGM (" Processing a GCODE command: " );
@@ -4680,176 +4677,6 @@ eeprom_update_word((uint16_t*)EEPROM_NOZZLE_DIAMETER_uM,0xFFFF);
4680
4677
case 0 : // G0 -> G1
4681
4678
case 1 : // G1
4682
4679
if (Stopped == false ) {
4683
-
4684
- #ifdef FILAMENT_RUNOUT_SUPPORT
4685
-
4686
- if (READ (FR_SENS)){
4687
-
4688
- int feedmultiplyBckp=feedmultiply;
4689
- float target[4 ];
4690
- float lastpos[4 ];
4691
- target[X_AXIS]=current_position[X_AXIS];
4692
- target[Y_AXIS]=current_position[Y_AXIS];
4693
- target[Z_AXIS]=current_position[Z_AXIS];
4694
- target[E_AXIS]=current_position[E_AXIS];
4695
- lastpos[X_AXIS]=current_position[X_AXIS];
4696
- lastpos[Y_AXIS]=current_position[Y_AXIS];
4697
- lastpos[Z_AXIS]=current_position[Z_AXIS];
4698
- lastpos[E_AXIS]=current_position[E_AXIS];
4699
- // retract by E
4700
-
4701
- target[E_AXIS]+= FILAMENTCHANGE_FIRSTRETRACT ;
4702
-
4703
- plan_buffer_line (target[X_AXIS], target[Y_AXIS], target[Z_AXIS], target[E_AXIS], 400 , active_extruder);
4704
-
4705
-
4706
- target[Z_AXIS]+= FILAMENTCHANGE_ZADD ;
4707
-
4708
- plan_buffer_line (target[X_AXIS], target[Y_AXIS], target[Z_AXIS], target[E_AXIS], 300 , active_extruder);
4709
-
4710
- target[X_AXIS]= FILAMENTCHANGE_XPOS ;
4711
-
4712
- target[Y_AXIS]= FILAMENTCHANGE_YPOS ;
4713
-
4714
-
4715
- plan_buffer_line (target[X_AXIS], target[Y_AXIS], target[Z_AXIS], target[E_AXIS], 70 , active_extruder);
4716
-
4717
- target[E_AXIS]+= FILAMENTCHANGE_FINALRETRACT ;
4718
-
4719
-
4720
- plan_buffer_line (target[X_AXIS], target[Y_AXIS], target[Z_AXIS], target[E_AXIS], 20 , active_extruder);
4721
-
4722
- // finish moves
4723
- st_synchronize ();
4724
- // disable extruder steppers so filament can be removed
4725
- disable_e0 ();
4726
- disable_e1 ();
4727
- disable_e2 ();
4728
- _delay (100 );
4729
-
4730
- // LCD_ALERTMESSAGEPGM(_T(MSG_FILAMENTCHANGE));
4731
- uint8_t cnt=0 ;
4732
- int counterBeep = 0 ;
4733
- lcd_wait_interact ();
4734
- while (!lcd_clicked ()){
4735
- cnt++;
4736
- manage_heater ();
4737
- manage_inactivity (true );
4738
- // lcd_update(0);
4739
- if (cnt==0 )
4740
- {
4741
- #if BEEPER > 0
4742
-
4743
- if (counterBeep== 500 ){
4744
- counterBeep = 0 ;
4745
-
4746
- }
4747
-
4748
-
4749
- SET_OUTPUT (BEEPER);
4750
- if (counterBeep== 0 ){
4751
- if (eSoundMode!=e_SOUND_MODE_SILENT)
4752
- WRITE (BEEPER,HIGH);
4753
- }
4754
-
4755
- if (counterBeep== 20 ){
4756
- WRITE (BEEPER,LOW);
4757
- }
4758
-
4759
-
4760
-
4761
-
4762
- counterBeep++;
4763
- #else
4764
- #endif
4765
- }
4766
- }
4767
-
4768
- WRITE (BEEPER,LOW);
4769
-
4770
- target[E_AXIS]+= FILAMENTCHANGE_FIRSTFEED ;
4771
- plan_buffer_line (target[X_AXIS], target[Y_AXIS], target[Z_AXIS], target[E_AXIS], 20 , active_extruder);
4772
-
4773
-
4774
- target[E_AXIS]+= FILAMENTCHANGE_FINALFEED ;
4775
- plan_buffer_line (target[X_AXIS], target[Y_AXIS], target[Z_AXIS], target[E_AXIS], 2 , active_extruder);
4776
-
4777
-
4778
-
4779
-
4780
-
4781
- lcd_change_fil_state = 0 ;
4782
- lcd_loading_filament ();
4783
- while ((lcd_change_fil_state == 0 )||(lcd_change_fil_state != 1 )){
4784
-
4785
- lcd_change_fil_state = 0 ;
4786
- lcd_alright ();
4787
- switch (lcd_change_fil_state){
4788
-
4789
- case 2 :
4790
- target[E_AXIS]+= FILAMENTCHANGE_FIRSTFEED ;
4791
- plan_buffer_line (target[X_AXIS], target[Y_AXIS], target[Z_AXIS], target[E_AXIS], 20 , active_extruder);
4792
-
4793
-
4794
- target[E_AXIS]+= FILAMENTCHANGE_FINALFEED ;
4795
- plan_buffer_line (target[X_AXIS], target[Y_AXIS], target[Z_AXIS], target[E_AXIS], 2 , active_extruder);
4796
-
4797
-
4798
- lcd_loading_filament ();
4799
- break ;
4800
- case 3 :
4801
- target[E_AXIS]+= FILAMENTCHANGE_FINALFEED ;
4802
- plan_buffer_line (target[X_AXIS], target[Y_AXIS], target[Z_AXIS], target[E_AXIS], 2 , active_extruder);
4803
- lcd_loading_color ();
4804
- break ;
4805
-
4806
- default :
4807
- lcd_change_success ();
4808
- break ;
4809
- }
4810
-
4811
- }
4812
-
4813
-
4814
-
4815
- target[E_AXIS]+= 5 ;
4816
- plan_buffer_line (target[X_AXIS], target[Y_AXIS], target[Z_AXIS], target[E_AXIS], 2 , active_extruder);
4817
-
4818
- target[E_AXIS]+= FILAMENTCHANGE_FIRSTRETRACT;
4819
- plan_buffer_line (target[X_AXIS], target[Y_AXIS], target[Z_AXIS], target[E_AXIS], 400 , active_extruder);
4820
-
4821
-
4822
- // current_position[E_AXIS]=target[E_AXIS]; //the long retract of L is compensated by manual filament feeding
4823
- // plan_set_e_position(current_position[E_AXIS]);
4824
- plan_buffer_line (target[X_AXIS], target[Y_AXIS], target[Z_AXIS], target[E_AXIS], 70 , active_extruder); // should do nothing
4825
- plan_buffer_line (lastpos[X_AXIS], lastpos[Y_AXIS], target[Z_AXIS], target[E_AXIS], 70 , active_extruder); // move xy back
4826
- plan_buffer_line (lastpos[X_AXIS], lastpos[Y_AXIS], lastpos[Z_AXIS], target[E_AXIS], 200 , active_extruder); // move z back
4827
-
4828
-
4829
- target[E_AXIS]= target[E_AXIS] - FILAMENTCHANGE_FIRSTRETRACT;
4830
-
4831
-
4832
-
4833
- plan_buffer_line (lastpos[X_AXIS], lastpos[Y_AXIS], lastpos[Z_AXIS], target[E_AXIS], 5 , active_extruder); // final untretract
4834
-
4835
-
4836
- plan_set_e_position (lastpos[E_AXIS]);
4837
-
4838
- feedmultiply=feedmultiplyBckp;
4839
-
4840
-
4841
-
4842
- char cmd[9 ];
4843
-
4844
- sprintf_P (cmd, PSTR (" M220 S%i" ), feedmultiplyBckp);
4845
- enquecommand (cmd);
4846
-
4847
- }
4848
-
4849
-
4850
-
4851
- #endif
4852
-
4853
4680
get_coordinates (); // For X Y Z E F
4854
4681
4855
4682
// When recovering from a previous print move, restore the originally
0 commit comments