Skip to content

Commit d860d61

Browse files
authored
Merge pull request prusa3d#3459 from gudnimg/remove_pid_add_extrusion_rate
Remove unused setting `PID_ADD_EXTRUSION_RATE`
2 parents d4d8149 + c62c412 commit d860d61

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
@@ -7767,24 +7767,19 @@ SERIAL_PROTOCOLPGM("\n\n");
77677767
See also <a href="https://reprap.org/wiki/PID_Tuning">PID Tuning.</a>
77687768
#### Usage
77697769
7770-
M301 [ P | I | D | C ]
7770+
M301 [ P | I | D ]
77717771
77727772
#### Parameters
77737773
- `P` - proportional (Kp)
77747774
- `I` - integral (Ki)
77757775
- `D` - derivative (Kd)
7776-
- `C` - heating power=Kc*(e_speed0)
77777776
*/
77787777
case 301:
77797778
{
77807779
if(code_seen('P')) cs.Kp = code_value();
77817780
if(code_seen('I')) cs.Ki = scalePID_i(code_value());
77827781
if(code_seen('D')) cs.Kd = scalePID_d(code_value());
77837782

7784-
#ifdef PID_ADD_EXTRUSION_RATE
7785-
if(code_seen('C')) Kc = code_value();
7786-
#endif
7787-
77887783
updatePID();
77897784
SERIAL_PROTOCOLRPGM(MSG_OK);
77907785
SERIAL_PROTOCOLPGM(" p:");
@@ -7793,11 +7788,6 @@ SERIAL_PROTOCOLPGM("\n\n");
77937788
SERIAL_PROTOCOL(unscalePID_i(cs.Ki));
77947789
SERIAL_PROTOCOLPGM(" d:");
77957790
SERIAL_PROTOCOL(unscalePID_d(cs.Kd));
7796-
#ifdef PID_ADD_EXTRUSION_RATE
7797-
SERIAL_PROTOCOLPGM(" c:");
7798-
//Kc does not have scaling applied above, or in resetting defaults
7799-
SERIAL_PROTOCOL(Kc);
7800-
#endif
78017791
SERIAL_PROTOCOLLN();
78027792
}
78037793
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)