Skip to content

Commit c62c412

Browse files
committed
Remove unused setting PID_ADD_EXTRUSION_RATE
Even if the setting was turned on, it doesn't do anything useful.
1 parent b353274 commit c62c412

5 files changed

+1
-31
lines changed

Firmware/ConfigurationStore.cpp

-3
Original file line numberDiff line numberDiff line change
@@ -336,9 +336,6 @@ void Config_ResetDefault()
336336

337337
#ifdef PIDTEMP
338338
updatePID();
339-
#ifdef PID_ADD_EXTRUSION_RATE
340-
Kc = DEFAULT_Kc; //this is not stored by Config_StoreSettings
341-
#endif//PID_ADD_EXTRUSION_RATE
342339
#endif//PIDTEMP
343340

344341
calculate_extruder_multipliers();

Firmware/Configuration_adv.h

-10
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,6 @@
1010
#endif
1111
#define BED_CHECK_INTERVAL 5000 //ms between checks in bang-bang control
1212

13-
#ifdef PIDTEMP
14-
// this adds an experimental additional term to the heating power, proportional to the extrusion speed.
15-
// if Kc is chosen well, the additional required power due to increased melting should be compensated.
16-
// #define PID_ADD_EXTRUSION_RATE
17-
#ifdef PID_ADD_EXTRUSION_RATE
18-
#define DEFAULT_Kc (1) //heating power=Kc*(e_speed)
19-
#endif
20-
#endif
21-
22-
2313
//automatic temperature: The hot end target temperature is calculated by all the buffered lines of gcode.
2414
//The maximum buffered steps/sec of the extruder motor are called "se".
2515
//You enter the autotemp mode by a M109 S<mintemp> B<maxtemp> F<factor>

Firmware/Marlin_main.cpp

+1-11
Original file line numberDiff line numberDiff line change
@@ -7766,24 +7766,19 @@ SERIAL_PROTOCOLPGM("\n\n");
77667766
See also <a href="https://reprap.org/wiki/PID_Tuning">PID Tuning.</a>
77677767
#### Usage
77687768
7769-
M301 [ P | I | D | C ]
7769+
M301 [ P | I | D ]
77707770
77717771
#### Parameters
77727772
- `P` - proportional (Kp)
77737773
- `I` - integral (Ki)
77747774
- `D` - derivative (Kd)
7775-
- `C` - heating power=Kc*(e_speed0)
77767775
*/
77777776
case 301:
77787777
{
77797778
if(code_seen('P')) cs.Kp = code_value();
77807779
if(code_seen('I')) cs.Ki = scalePID_i(code_value());
77817780
if(code_seen('D')) cs.Kd = scalePID_d(code_value());
77827781

7783-
#ifdef PID_ADD_EXTRUSION_RATE
7784-
if(code_seen('C')) Kc = code_value();
7785-
#endif
7786-
77877782
updatePID();
77887783
SERIAL_PROTOCOLRPGM(MSG_OK);
77897784
SERIAL_PROTOCOLPGM(" p:");
@@ -7792,11 +7787,6 @@ SERIAL_PROTOCOLPGM("\n\n");
77927787
SERIAL_PROTOCOL(unscalePID_i(cs.Ki));
77937788
SERIAL_PROTOCOLPGM(" d:");
77947789
SERIAL_PROTOCOL(unscalePID_d(cs.Kd));
7795-
#ifdef PID_ADD_EXTRUSION_RATE
7796-
SERIAL_PROTOCOLPGM(" c:");
7797-
//Kc does not have scaling applied above, or in resetting defaults
7798-
SERIAL_PROTOCOL(Kc);
7799-
#endif
78007790
SERIAL_PROTOCOLLN();
78017791
}
78027792
break;

Firmware/temperature.cpp

-3
Original file line numberDiff line numberDiff line change
@@ -88,9 +88,6 @@ float current_temperature_bed = 0.0;
8888
float _Kp, _Ki, _Kd;
8989
int pid_cycle, pid_number_of_cycles;
9090
bool pid_tuning_finished = false;
91-
#ifdef PID_ADD_EXTRUSION_RATE
92-
float Kc=DEFAULT_Kc;
93-
#endif
9491
#endif //PIDTEMP
9592

9693
#ifdef FAN_SOFT_PWM

Firmware/temperature.h

-4
Original file line numberDiff line numberDiff line change
@@ -91,15 +91,11 @@ extern bool bedPWMDisabled;
9191
#ifdef PIDTEMP
9292
extern int pid_cycle, pid_number_of_cycles;
9393
extern float _Kp,_Ki,_Kd;
94-
#ifdef PID_ADD_EXTRUSION_RATE
95-
extern float Kc;
96-
#endif
9794
extern bool pid_tuning_finished;
9895
float scalePID_i(float i);
9996
float scalePID_d(float d);
10097
float unscalePID_i(float i);
10198
float unscalePID_d(float d);
102-
10399
#endif
104100

105101

0 commit comments

Comments
 (0)