Fixed error with z-homing in previous release
Fixed a random hang after z-homing in the previous release. Also make Z probe temperature coefficient default to zero always, and Z probe calibration temperature default to current bed temperature always.
This commit is contained in:
parent
92c17dede2
commit
2b7b9fc505
6 changed files with 11 additions and 9 deletions
|
@ -24,7 +24,7 @@ Licence: GPL
|
||||||
#define CONFIGURATION_H
|
#define CONFIGURATION_H
|
||||||
|
|
||||||
#define NAME "RepRapFirmware"
|
#define NAME "RepRapFirmware"
|
||||||
#define VERSION "0.57o-dc42"
|
#define VERSION "0.57p-dc42"
|
||||||
#define DATE "2014-02-24"
|
#define DATE "2014-02-24"
|
||||||
#define LAST_AUTHOR "dc42"
|
#define LAST_AUTHOR "dc42"
|
||||||
|
|
||||||
|
|
|
@ -923,7 +923,7 @@ bool GCodes::SetPrintZProbe(GCodeBuffer* gb, char* reply)
|
||||||
{
|
{
|
||||||
params.calibTemperature = gb->GetFValue();
|
params.calibTemperature = gb->GetFValue();
|
||||||
}
|
}
|
||||||
else if (!PrintingAFile())
|
else
|
||||||
{
|
{
|
||||||
// Use the current bed temperature as the calibration temperature if no value was provided
|
// Use the current bed temperature as the calibration temperature if no value was provided
|
||||||
params.calibTemperature = platform->GetTemperature(0);
|
params.calibTemperature = platform->GetTemperature(0);
|
||||||
|
@ -932,6 +932,10 @@ bool GCodes::SetPrintZProbe(GCodeBuffer* gb, char* reply)
|
||||||
{
|
{
|
||||||
params.temperatureCoefficient = gb->GetFValue();
|
params.temperatureCoefficient = gb->GetFValue();
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
params.temperatureCoefficient = 0.0;
|
||||||
|
}
|
||||||
platform->SetZProbeParameters(params);
|
platform->SetZProbeParameters(params);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
2
Move.h
2
Move.h
|
@ -564,7 +564,7 @@ inline void Move::HitLowStop(int8_t drive, LookAhead* la, DDA* hitDDA)
|
||||||
{
|
{
|
||||||
// Executing G30, so set the current Z height to the value at which the end stop is triggered
|
// Executing G30, so set the current Z height to the value at which the end stop is triggered
|
||||||
// Transform it first so that the height is correct in user coordinates
|
// Transform it first so that the height is correct in user coordinates
|
||||||
float xyzPoint[3];
|
float xyzPoint[DRIVES + 1];
|
||||||
LiveCoordinates(xyzPoint);
|
LiveCoordinates(xyzPoint);
|
||||||
xyzPoint[Z_AXIS] = lastZHit = platform->ZProbeStopHeight();
|
xyzPoint[Z_AXIS] = lastZHit = platform->ZProbeStopHeight();
|
||||||
Transform(xyzPoint);
|
Transform(xyzPoint);
|
||||||
|
|
|
@ -86,8 +86,8 @@ void Platform::Init()
|
||||||
nvData.gateWay = GATE_WAY;
|
nvData.gateWay = GATE_WAY;
|
||||||
|
|
||||||
nvData.zProbeType = 0; // Default is to use the switch
|
nvData.zProbeType = 0; // Default is to use the switch
|
||||||
nvData.irZProbeParameters.Init(false);
|
nvData.irZProbeParameters.Init();
|
||||||
nvData.ultrasonicZProbeParameters.Init(true);
|
nvData.ultrasonicZProbeParameters.Init();
|
||||||
|
|
||||||
nvData.magic = FlashData::magicValue;
|
nvData.magic = FlashData::magicValue;
|
||||||
}
|
}
|
||||||
|
|
|
@ -420,14 +420,12 @@ struct ZProbeParameters
|
||||||
float calibTemperature; // the temperature at which we did the calibration
|
float calibTemperature; // the temperature at which we did the calibration
|
||||||
float temperatureCoefficient; // the variation of height with bed temperature
|
float temperatureCoefficient; // the variation of height with bed temperature
|
||||||
|
|
||||||
void Init(bool isUltrasonic)
|
void Init()
|
||||||
{
|
{
|
||||||
adcValue = Z_PROBE_AD_VALUE;
|
adcValue = Z_PROBE_AD_VALUE;
|
||||||
height = Z_PROBE_STOP_HEIGHT;
|
height = Z_PROBE_STOP_HEIGHT;
|
||||||
calibTemperature = 20.0;
|
calibTemperature = 20.0;
|
||||||
temperatureCoefficient = (isUltrasonic)
|
temperatureCoefficient = 0.0; // no default temperature correction
|
||||||
? 0.007575 // speed of sound correction assuming half wavelength between sensor and bed
|
|
||||||
: 0.0; // no default temperature correction for IR sensor
|
|
||||||
}
|
}
|
||||||
|
|
||||||
float GetStopHeight(float temperature) const
|
float GetStopHeight(float temperature) const
|
||||||
|
|
Binary file not shown.
Reference in a new issue