Conflicts:

	Marlin/Configuration.h
This commit is contained in:
Mark Finn
2012-09-12 21:01:31 -05:00
parent 769796ed4c
commit 9698f4ea64
4 changed files with 176 additions and 53 deletions

View File

@ -113,6 +113,7 @@
// M221 S<factor in percent>- set extrude factor override percentage
// M240 - Trigger a camera to take a photograph
// M301 - Set PID parameters P I and D
// M304 - Set bed PID parameters P I and D
// M302 - Allow cold extrudes
// M303 - PID relay autotune S<temperature> sets the target temperature. (default target temperature = 150C)
// M400 - Finish all moves
@ -1002,6 +1003,10 @@ void process_commands()
#ifdef PIDTEMP
SERIAL_PROTOCOLPGM(" @:");
SERIAL_PROTOCOL(getHeaterPower(tmp_extruder));
#endif
#ifdef PIDTEMPBED
SERIAL_PROTOCOLPGM(" B@:");
SERIAL_PROTOCOL(getHeaterPower(-1));
#endif
SERIAL_PROTOCOLLN("");
return;
@ -1405,6 +1410,24 @@ void process_commands()
}
break;
#endif //PIDTEMP
#ifdef PIDTEMPBED
case 304: // M304
{
if(code_seen('P')) bedKp = code_value();
if(code_seen('I')) bedKi = code_value()*PID_dT;
if(code_seen('D')) bedKd = code_value()/PID_dT;
updatePID();
SERIAL_PROTOCOL(MSG_OK);
SERIAL_PROTOCOL(" p:");
SERIAL_PROTOCOL(Kp);
SERIAL_PROTOCOL(" i:");
SERIAL_PROTOCOL(Ki/PID_dT);
SERIAL_PROTOCOL(" d:");
SERIAL_PROTOCOL(Kd*PID_dT);
SERIAL_PROTOCOLLN("");
}
break;
#endif //PIDTEMP
case 240: // M240 Triggers a camera by emulating a Canon RC-1 : http://www.doc-diy.net/photo/rc-1_hacked/
{
#ifdef PHOTOGRAPH_PIN
@ -1437,8 +1460,14 @@ void process_commands()
case 303: // M303 PID autotune
{
float temp = 150.0;
int e=0;
int c=5;
if (code_seen('E')) e=code_value();
if (e<0)
temp=70;
if (code_seen('S')) temp=code_value();
PID_autotune(temp);
if (code_seen('C')) c=code_value();
PID_autotune(temp, e, c);
}
break;
case 400: // M400 finish all moves