diff options
author | David Crocker <dcrocker@eschertech.com> | 2017-01-07 13:44:29 +0300 |
---|---|---|
committer | David Crocker <dcrocker@eschertech.com> | 2017-01-07 13:44:44 +0300 |
commit | 0ae1b2ecd8833d051e0774269e7d48d1701b79e3 (patch) | |
tree | 0392be28faa859e0446b52906e355dcb564fe813 /src | |
parent | 983271f403f9dad2f99a137b921912728bf417c8 (diff) |
Preparation for release 1.17b (no binaries included)
Fixed bug in M226 handling (thanks chrishamm)
Z probe modulation signal is now driven high only during probing move
for Z probe types 4 upwards
Updated DuetWebCobtrol to 1.14
Diffstat (limited to 'src')
-rw-r--r-- | src/DuetNG/DuetEthernet/Wiznet/Ethernet/WizSpi.cpp | 2 | ||||
-rw-r--r-- | src/DuetNG/DuetWiFi/Network.cpp | 3 | ||||
-rw-r--r-- | src/GCodes/GCodes.cpp | 9 | ||||
-rw-r--r-- | src/Movement/DeltaProbe.cpp | 2 | ||||
-rw-r--r-- | src/Platform.cpp | 14 | ||||
-rw-r--r-- | src/Platform.h | 1 | ||||
-rw-r--r-- | src/Version.h | 6 |
7 files changed, 29 insertions, 8 deletions
diff --git a/src/DuetNG/DuetEthernet/Wiznet/Ethernet/WizSpi.cpp b/src/DuetNG/DuetEthernet/Wiznet/Ethernet/WizSpi.cpp index b45e9901..e095c26b 100644 --- a/src/DuetNG/DuetEthernet/Wiznet/Ethernet/WizSpi.cpp +++ b/src/DuetNG/DuetEthernet/Wiznet/Ethernet/WizSpi.cpp @@ -25,7 +25,7 @@ #include "matrix.h" // Functions called by the W5500 module to transfer data to/from the W5500 via SPI -const uint32_t SpiClockFrequency = 40000000; +const uint32_t SpiClockFrequency = 60000000; const unsigned int SpiPeripheralChannelId = 0; // we use NPCS0 as the slave select signal #if USE_PDC diff --git a/src/DuetNG/DuetWiFi/Network.cpp b/src/DuetNG/DuetWiFi/Network.cpp index 7127433f..63720451 100644 --- a/src/DuetNG/DuetWiFi/Network.cpp +++ b/src/DuetNG/DuetWiFi/Network.cpp @@ -5,13 +5,14 @@ ****************************************************************************************************/ #include "Network.h" + #include "Platform.h" #include "RepRap.h" #include "TransactionBuffer.h" #include "TransactionBufferReader.h" #include "WifiFirmwareUploader.h" -// Define exactly one of the following as 1, thje other as zero +// Define exactly one of the following as 1, the other as zero // The PDC seems to be too slow to work reliably without getting transmit underruns, so we use the DMAC now. #define USE_PDC 0 // use peripheral DMA controller #define USE_DMAC 1 // use general DMA controller diff --git a/src/GCodes/GCodes.cpp b/src/GCodes/GCodes.cpp index 73e4c1e2..f615f642 100644 --- a/src/GCodes/GCodes.cpp +++ b/src/GCodes/GCodes.cpp @@ -495,6 +495,7 @@ void GCodes::Spin() } zProbeTriggered = false; + platform->SetProbing(true); moveBuffer.moveType = 0; moveBuffer.endStopsToCheck = ZProbeActive; moveBuffer.usePressureAdvance = false; @@ -510,6 +511,7 @@ void GCodes::Spin() case GCodeState::gridProbing3: // ready to lift the probe after probing the current grid probe point if (LockMovementAndWaitForStandstill(gb)) { + platform->SetProbing(false); if (!zProbeTriggered) { reply.copy("Z probe was not triggered during probing move"); @@ -614,7 +616,7 @@ void GCodes::Spin() // Start a new gcode, or continue to execute one that has already been started: void GCodes::StartNextGCode(GCodeBuffer& gb, StringRef& reply) { - if (isPaused && &gb == fileGCode) + if (IsPaused() && &gb == fileGCode) { // We are paused, so don't process any more gcodes from the file being printed. // There is a potential issue here if fileGCode holds any locks, so unlock everything. @@ -1407,6 +1409,10 @@ bool GCodes::DoCannedCycleMove(GCodeBuffer& gb, EndstopChecks ce) moveBuffer.usePressureAdvance = false; segmentsLeft = 1; cannedCycleMoveQueued = true; + if ((ce & ZProbeActive) != 0) + { + platform->SetProbing(true); + } } return false; } @@ -1770,6 +1776,7 @@ int GCodes::DoZProbe(GCodeBuffer& gb, float distance) if (DoCannedCycleMove(gb, ZProbeActive)) { + platform->SetProbing(false); return (zProbeTriggered) ? 2 : 1; } return -1; diff --git a/src/Movement/DeltaProbe.cpp b/src/Movement/DeltaProbe.cpp index b557fb52..165a51bc 100644 --- a/src/Movement/DeltaProbe.cpp +++ b/src/Movement/DeltaProbe.cpp @@ -5,7 +5,7 @@ * Author: David */ -#include "Deltaprobe.h" +#include "DeltaProbe.h" #include "DDA.h" #include "Platform.h" #include "RepRap.h" diff --git a/src/Platform.cpp b/src/Platform.cpp index 17d97f76..61984c60 100644 --- a/src/Platform.cpp +++ b/src/Platform.cpp @@ -554,24 +554,27 @@ void Platform::InitZProbe() AnalogInEnableChannel(zProbeAdcChannel, false); pinMode(zProbePin, INPUT_PULLUP); pinMode(endStopPins[E0_AXIS], INPUT_PULLUP); + pinMode(zProbeModulationPin, OUTPUT_LOW); // we now set the modulation output high during probing only when using probe types 4 and higher break; case 5: default: AnalogInEnableChannel(zProbeAdcChannel, false); pinMode(zProbePin, INPUT_PULLUP); - pinMode(zProbeModulationPin, OUTPUT_HIGH); // set high to take trash80's HE280 probe Teensy adapter out of reset + pinMode(zProbeModulationPin, OUTPUT_LOW); // we now set the modulation output high during probing only when using probe types 4 and higher break; case 6: AnalogInEnableChannel(zProbeAdcChannel, false); pinMode(zProbePin, INPUT_PULLUP); pinMode(endStopPins[E0_AXIS + 1], INPUT_PULLUP); + pinMode(zProbeModulationPin, OUTPUT_LOW); // we now set the modulation output high during probing only when using probe types 4 and higher break; case 7: AnalogInEnableChannel(zProbeAdcChannel, false); pinMode(zProbePin, INPUT_PULLUP); + pinMode(zProbeModulationPin, OUTPUT_LOW); // we now set the modulation output high during probing only when using probe types 4 and higher break; //TODO (DeltaProbe) } } @@ -676,6 +679,15 @@ void Platform::SetZProbeType(int pt) InitZProbe(); } +void Platform::SetProbing(bool isProbing) +{ + if (zProbeType > 3) + { + // For Z probe types other than 1/2/3 we set the modulation pin high at the start of a probing move and low at the end + digitalWrite(zProbeModulationPin, isProbing); + } +} + const ZProbeParameters& Platform::GetZProbeParameters(int32_t probeType) const { switch (probeType) diff --git a/src/Platform.h b/src/Platform.h index aec4f3d0..220af4b2 100644 --- a/src/Platform.h +++ b/src/Platform.h @@ -482,6 +482,7 @@ public: void SetZProbeParameters(int32_t probeType, const struct ZProbeParameters& params); bool MustHomeXYBeforeZ() const; bool WriteZProbeParameters(FileStore *f) const; + void SetProbing(bool isProbing); // Ancilliary PWM diff --git a/src/Version.h b/src/Version.h index 7d12aff2..376762a8 100644 --- a/src/Version.h +++ b/src/Version.h @@ -9,13 +9,13 @@ #define SRC_VERSION_H_ #ifndef VERSION -# define VERSION "1.17a" +# define VERSION "1.17b" #endif #ifndef DATE -# define DATE "2017-01-02" +# define DATE "2017-01-07" #endif -#define AUTHORS "reprappro, dc42, zpl, t3p3, dnewman" +#define AUTHORS "reprappro, dc42, chrishamm, t3p3, dnewman" #endif /* SRC_VERSION_H_ */ |