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