Dud temperature count now has to reach 6 (about a second) before a heater trips out (Ian's request). Also heater reset M code (M562) added. Use that with great caution.
This commit is contained in:
parent
7215696e8b
commit
cfdb9dcd89
5 changed files with 28 additions and 3 deletions
|
@ -24,8 +24,8 @@ Licence: GPL
|
||||||
#define CONFIGURATION_H
|
#define CONFIGURATION_H
|
||||||
|
|
||||||
#define NAME "RepRapFirmware"
|
#define NAME "RepRapFirmware"
|
||||||
#define VERSION "0.35"
|
#define VERSION "0.36"
|
||||||
#define DATE "2013-12-06"
|
#define DATE "2013-12-11"
|
||||||
#define LAST_AUTHOR "reprappro.com"
|
#define LAST_AUTHOR "reprappro.com"
|
||||||
|
|
||||||
// Other firmware that we might switch to be compatible with.
|
// Other firmware that we might switch to be compatible with.
|
||||||
|
@ -56,7 +56,7 @@ enum Compatibility
|
||||||
|
|
||||||
#define BAD_LOW_TEMPERATURE -30.0
|
#define BAD_LOW_TEMPERATURE -30.0
|
||||||
#define BAD_HIGH_TEMPERATURE 300.0
|
#define BAD_HIGH_TEMPERATURE 300.0
|
||||||
#define MAX_BAD_TEMPERATURE_COUNT 3
|
#define MAX_BAD_TEMPERATURE_COUNT 6
|
||||||
|
|
||||||
#define STANDBY_INTERRUPT_RATE 2.0e-4 // Seconds
|
#define STANDBY_INTERRUPT_RATE 2.0e-4 // Seconds
|
||||||
|
|
||||||
|
|
|
@ -1558,6 +1558,14 @@ bool GCodes::ActOnGcode(GCodeBuffer *gb)
|
||||||
reprap.GetMove()->SetIdentityTransform();
|
reprap.GetMove()->SetIdentityTransform();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case 562: // Reset temperature fault - use with great caution
|
||||||
|
if(gb->Seen('P'))
|
||||||
|
{
|
||||||
|
iValue = gb->GetIValue();
|
||||||
|
reprap.GetHeat()->ResetFault(iValue);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
case 876: // TEMPORARY - this will go away...
|
case 876: // TEMPORARY - this will go away...
|
||||||
if(gb->Seen('P'))
|
if(gb->Seen('P'))
|
||||||
{
|
{
|
||||||
|
|
3
Heat.cpp
3
Heat.cpp
|
@ -114,7 +114,10 @@ void PID::Init()
|
||||||
void PID::Spin()
|
void PID::Spin()
|
||||||
{
|
{
|
||||||
if(temperatureFault)
|
if(temperatureFault)
|
||||||
|
{
|
||||||
|
platform->SetHeater(heater, 0.0); // Make sure...
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
temperature = platform->GetTemperature(heater);
|
temperature = platform->GetTemperature(heater);
|
||||||
|
|
||||||
|
|
14
Heat.h
14
Heat.h
|
@ -35,6 +35,7 @@ class PID
|
||||||
void Activate();
|
void Activate();
|
||||||
void Standby();
|
void Standby();
|
||||||
bool Active();
|
bool Active();
|
||||||
|
void ResetFault();
|
||||||
float GetTemperature();
|
float GetTemperature();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@ -68,6 +69,7 @@ class Heat
|
||||||
void Activate(int8_t heater);
|
void Activate(int8_t heater);
|
||||||
void Standby(int8_t heater);
|
void Standby(int8_t heater);
|
||||||
float GetTemperature(int8_t heater);
|
float GetTemperature(int8_t heater);
|
||||||
|
void ResetFault(int8_t heater);
|
||||||
bool AllHeatersAtSetTemperatures();
|
bool AllHeatersAtSetTemperatures();
|
||||||
void Diagnostics();
|
void Diagnostics();
|
||||||
|
|
||||||
|
@ -124,6 +126,12 @@ inline void PID::Standby()
|
||||||
active = false;
|
active = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
inline void PID::ResetFault()
|
||||||
|
{
|
||||||
|
temperatureFault = false;
|
||||||
|
badTemperatureCount = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
inline void Heat::SetActiveTemperature(int8_t heater, const float& t)
|
inline void Heat::SetActiveTemperature(int8_t heater, const float& t)
|
||||||
{
|
{
|
||||||
|
@ -160,5 +168,11 @@ inline void Heat::Standby(int8_t heater)
|
||||||
pids[heater]->Standby();
|
pids[heater]->Standby();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
inline void Heat::ResetFault(int8_t heater)
|
||||||
|
{
|
||||||
|
pids[heater]->ResetFault();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
Binary file not shown.
Reference in a new issue