Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Duet3D/RepRapFirmware.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Crocker <dcrocker@eschertech.com>2020-12-18 12:06:29 +0300
committerDavid Crocker <dcrocker@eschertech.com>2020-12-18 12:06:29 +0300
commit0562425411ecde77d87695512b77b3568d07fcd6 (patch)
treeabe343f8c46194709152a0fe1776933c7ed8caf6 /src/FilamentMonitors
parentf7f75b23537708ac293e7e22e5b38a24473d707b (diff)
Filament monitors can now be deleted usimng M591 D# P0
Also added WatchBuffer debug code to RepRap.cpp
Diffstat (limited to 'src/FilamentMonitors')
-rw-r--r--src/FilamentMonitors/FilamentMonitor.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/FilamentMonitors/FilamentMonitor.cpp b/src/FilamentMonitors/FilamentMonitor.cpp
index cc2b225d..429e96b7 100644
--- a/src/FilamentMonitors/FilamentMonitor.cpp
+++ b/src/FilamentMonitors/FilamentMonitor.cpp
@@ -145,6 +145,11 @@ bool FilamentMonitor::IsValid() const noexcept
reprap.SensorsUpdated();
}
+ if (newSensorType == 0)
+ {
+ return GCodeResult::ok; // M591 D# P0 just deletes any existing sensor
+ }
+
gb.MustSee('C'); // make sure the port name parameter is present
sensor = Create(extruder, newSensorType, gb, reply); // create the new sensor
if (sensor == nullptr)