diff --git a/Configuration.h b/Configuration.h index 9e1d746..57b81df 100644 --- a/Configuration.h +++ b/Configuration.h @@ -24,7 +24,7 @@ Licence: GPL #define CONFIGURATION_H #define NAME "RepRapFirmware" -#define VERSION "0.57o-dc42" +#define VERSION "0.57p-dc42" #define DATE "2014-02-24" #define LAST_AUTHOR "dc42" diff --git a/GCodes.cpp b/GCodes.cpp index 5008bdc..5fbc2e8 100644 --- a/GCodes.cpp +++ b/GCodes.cpp @@ -923,7 +923,7 @@ bool GCodes::SetPrintZProbe(GCodeBuffer* gb, char* reply) { params.calibTemperature = gb->GetFValue(); } - else if (!PrintingAFile()) + else { // Use the current bed temperature as the calibration temperature if no value was provided params.calibTemperature = platform->GetTemperature(0); @@ -932,6 +932,10 @@ bool GCodes::SetPrintZProbe(GCodeBuffer* gb, char* reply) { params.temperatureCoefficient = gb->GetFValue(); } + else + { + params.temperatureCoefficient = 0.0; + } platform->SetZProbeParameters(params); } else diff --git a/Move.h b/Move.h index 2b7c3e3..0be61eb 100644 --- a/Move.h +++ b/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 // Transform it first so that the height is correct in user coordinates - float xyzPoint[3]; + float xyzPoint[DRIVES + 1]; LiveCoordinates(xyzPoint); xyzPoint[Z_AXIS] = lastZHit = platform->ZProbeStopHeight(); Transform(xyzPoint); diff --git a/Platform.cpp b/Platform.cpp index 54c162d..5247e20 100644 --- a/Platform.cpp +++ b/Platform.cpp @@ -86,8 +86,8 @@ void Platform::Init() nvData.gateWay = GATE_WAY; nvData.zProbeType = 0; // Default is to use the switch - nvData.irZProbeParameters.Init(false); - nvData.ultrasonicZProbeParameters.Init(true); + nvData.irZProbeParameters.Init(); + nvData.ultrasonicZProbeParameters.Init(); nvData.magic = FlashData::magicValue; } diff --git a/Platform.h b/Platform.h index f40a7d6..7387897 100644 --- a/Platform.h +++ b/Platform.h @@ -420,14 +420,12 @@ struct ZProbeParameters float calibTemperature; // the temperature at which we did the calibration float temperatureCoefficient; // the variation of height with bed temperature - void Init(bool isUltrasonic) + void Init() { adcValue = Z_PROBE_AD_VALUE; height = Z_PROBE_STOP_HEIGHT; calibTemperature = 20.0; - temperatureCoefficient = (isUltrasonic) - ? 0.007575 // speed of sound correction assuming half wavelength between sensor and bed - : 0.0; // no default temperature correction for IR sensor + temperatureCoefficient = 0.0; // no default temperature correction } float GetStopHeight(float temperature) const diff --git a/Release/RepRapFirmware-057o-dc52.bin b/Release/RepRapFirmware-057p-dc42.bin similarity index 73% rename from Release/RepRapFirmware-057o-dc52.bin rename to Release/RepRapFirmware-057p-dc42.bin index 0a2f811..3e91d2b 100644 Binary files a/Release/RepRapFirmware-057o-dc52.bin and b/Release/RepRapFirmware-057p-dc42.bin differ