diff options
Diffstat (limited to 'src/FilamentMonitors/LaserFilamentMonitor.cpp')
-rw-r--r-- | src/FilamentMonitors/LaserFilamentMonitor.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/FilamentMonitors/LaserFilamentMonitor.cpp b/src/FilamentMonitors/LaserFilamentMonitor.cpp index d20d8adf..aa68eb8d 100644 --- a/src/FilamentMonitors/LaserFilamentMonitor.cpp +++ b/src/FilamentMonitors/LaserFilamentMonitor.cpp @@ -125,6 +125,11 @@ GCodeResult LaserFilamentMonitor::Configure(GCodeBuffer& gb, const StringRef& re const GCodeResult rslt = CommonConfigure(gb, reply, InterruptMode::change, seen); if (rslt <= GCodeResult::warning) { + if (seen) + { + Init(); // Init() resets dataReceived and version, so only do it if the port has been configured + } + gb.TryGetFValue('L', calibrationFactor, seen); gb.TryGetFValue('E', minimumExtrusionCheckLength, seen); @@ -158,7 +163,6 @@ GCodeResult LaserFilamentMonitor::Configure(GCodeBuffer& gb, const StringRef& re if (seen) { - Init(); reprap.SensorsUpdated(); } else |