Browse Source

Return void in prevent_dangerous_extrude

Scott Lahteine 10 years ago
parent
commit
8d814de558
1 changed files with 1 additions and 4 deletions
  1. 1
    4
      Marlin/Marlin_main.cpp

+ 1
- 4
Marlin/Marlin_main.cpp View File

5743
 
5743
 
5744
 #ifdef PREVENT_DANGEROUS_EXTRUDE
5744
 #ifdef PREVENT_DANGEROUS_EXTRUDE
5745
 
5745
 
5746
-  inline float prevent_dangerous_extrude(float &curr_e, float &dest_e) {
5746
+  inline void prevent_dangerous_extrude(float &curr_e, float &dest_e) {
5747
     float de = dest_e - curr_e;
5747
     float de = dest_e - curr_e;
5748
     if (de) {
5748
     if (de) {
5749
       if (degHotend(active_extruder) < extrude_min_temp) {
5749
       if (degHotend(active_extruder) < extrude_min_temp) {
5750
         curr_e = dest_e; // Behave as if the move really took place, but ignore E part
5750
         curr_e = dest_e; // Behave as if the move really took place, but ignore E part
5751
         SERIAL_ECHO_START;
5751
         SERIAL_ECHO_START;
5752
         SERIAL_ECHOLNPGM(MSG_ERR_COLD_EXTRUDE_STOP);
5752
         SERIAL_ECHOLNPGM(MSG_ERR_COLD_EXTRUDE_STOP);
5753
-        return 0;
5754
       }
5753
       }
5755
       #ifdef PREVENT_LENGTHY_EXTRUDE
5754
       #ifdef PREVENT_LENGTHY_EXTRUDE
5756
         if (labs(de) > EXTRUDE_MAXLENGTH) {
5755
         if (labs(de) > EXTRUDE_MAXLENGTH) {
5757
           curr_e = dest_e; // Behave as if the move really took place, but ignore E part
5756
           curr_e = dest_e; // Behave as if the move really took place, but ignore E part
5758
           SERIAL_ECHO_START;
5757
           SERIAL_ECHO_START;
5759
           SERIAL_ECHOLNPGM(MSG_ERR_LONG_EXTRUDE_STOP);
5758
           SERIAL_ECHOLNPGM(MSG_ERR_LONG_EXTRUDE_STOP);
5760
-          return 0;
5761
         }
5759
         }
5762
       #endif
5760
       #endif
5763
     }
5761
     }
5764
-    return de;
5765
   }
5762
   }
5766
 
5763
 
5767
 #endif // PREVENT_DANGEROUS_EXTRUDE
5764
 #endif // PREVENT_DANGEROUS_EXTRUDE

Loading…
Cancel
Save