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-01-19 02:03:39 +0300
committerDavid Crocker <dcrocker@eschertech.com>2020-01-19 02:03:39 +0300
commitc812ce5e14cf476526d955edbce2effa9d922902 (patch)
treeda67dc55e46efdd38a0647318977a342da730345 /src/GCodes/GCodes4.cpp
parente0bbf71357b07c22e6d43be3cca5c7422163be32 (diff)
Major refactoring, bug fixes in function evaluation
Changed all bitmaps to use the bitmap class from RRFLibraries Fixed bugs in functoin evaluation
Diffstat (limited to 'src/GCodes/GCodes4.cpp')
-rw-r--r--src/GCodes/GCodes4.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/GCodes/GCodes4.cpp b/src/GCodes/GCodes4.cpp
index 33761417..23a31b52 100644
--- a/src/GCodes/GCodes4.cpp
+++ b/src/GCodes/GCodes4.cpp
@@ -37,7 +37,7 @@ void GCodes::RunStateMachine(GCodeBuffer& gb, const StringRef& reply)
// Check whether we made any G1 S3 moves and need to set the axis limits
for (size_t axis = 0; axis < numTotalAxes; ++axis)
{
- if (IsBitSet<AxesBitmap>(axesToSenseLength, axis))
+ if (axesToSenseLength.IsBitSet(axis))
{
const EndStopPosition stopType = platform.GetEndstops().GetEndStopPosition(axis);
if (stopType == EndStopPosition::highEndStop)
@@ -172,7 +172,7 @@ void GCodes::RunStateMachine(GCodeBuffer& gb, const StringRef& reply)
break;
case GCodeState::homing1:
- if (toBeHomed == 0)
+ if (toBeHomed.IsEmpty())
{
gb.SetState(GCodeState::normal);
}
@@ -180,7 +180,7 @@ void GCodes::RunStateMachine(GCodeBuffer& gb, const StringRef& reply)
{
String<StringLength20> nextHomingFileName;
AxesBitmap mustHomeFirst = reprap.GetMove().GetKinematics().GetHomingFileName(toBeHomed, axesHomed, numVisibleAxes, nextHomingFileName.GetRef());
- if (mustHomeFirst != 0)
+ if (mustHomeFirst.IsNonEmpty())
{
// Error, can't home this axes
reply.copy("Must home these axes:");
@@ -188,7 +188,7 @@ void GCodes::RunStateMachine(GCodeBuffer& gb, const StringRef& reply)
reply.cat(" before homing these:");
AppendAxes(reply, toBeHomed);
error = true;
- toBeHomed = 0;
+ toBeHomed.Clear();
gb.SetState(GCodeState::normal);
}
else
@@ -208,7 +208,7 @@ void GCodes::RunStateMachine(GCodeBuffer& gb, const StringRef& reply)
if (LockMovementAndWaitForStandstill(gb)) // movement should already be locked, but we need to wait for the previous homing move to complete
{
// Test whether the previous homing move homed any axes
- if ((toBeHomed & axesHomed) == 0)
+ if (!toBeHomed.Intersects(axesHomed))
{
reply.copy("Homing failed");
error = true;
@@ -217,7 +217,7 @@ void GCodes::RunStateMachine(GCodeBuffer& gb, const StringRef& reply)
else
{
toBeHomed &= ~axesHomed;
- gb.SetState((toBeHomed == 0) ? GCodeState::normal : GCodeState::homing1);
+ gb.SetState((toBeHomed.IsEmpty()) ? GCodeState::normal : GCodeState::homing1);
}
}
break;