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:
Diffstat (limited to 'src/Tools/Tool.cpp')
-rw-r--r--src/Tools/Tool.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/Tools/Tool.cpp b/src/Tools/Tool.cpp
index 4453e2c7..8f69ba33 100644
--- a/src/Tools/Tool.cpp
+++ b/src/Tools/Tool.cpp
@@ -100,6 +100,7 @@ Tool * Tool::freelist = nullptr;
t->yMapping = yMap;
t->fanMapping = fanMap;
t->heaterFault = false;
+ t->axisOffsetsProbed = 0;
t->displayColdExtrudeWarning = false;
for (size_t axis = 0; axis < MaxAxes; axis++)
@@ -463,10 +464,19 @@ bool Tool::WriteSettings(FileStore *f) const
void Tool::SetOffsets(const float offs[MaxAxes])
{
- for(size_t i = 0; i < MaxAxes; ++i)
+ for (size_t i = 0; i < MaxAxes; ++i)
{
offset[i] = offs[i];
}
}
+void Tool::SetOffset(size_t axis, float offs, bool byProbing)
+{
+ offset[axis] = offs;
+ if (byProbing)
+ {
+ SetBit(axisOffsetsProbed, axis);
+ }
+}
+
// End