diff options
Diffstat (limited to 'src/Tools')
-rw-r--r-- | src/Tools/Tool.cpp | 12 | ||||
-rw-r--r-- | src/Tools/Tool.h | 9 |
2 files changed, 14 insertions, 7 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 diff --git a/src/Tools/Tool.h b/src/Tools/Tool.h index 9af30d4a..4b0d2909 100644 --- a/src/Tools/Tool.h +++ b/src/Tools/Tool.h @@ -49,7 +49,8 @@ public: const float *GetOffsets() const; void SetOffsets(const float offs[MaxAxes]); - void SetOffset(size_t axis, float offs) pre(axis < MaxAxes); + void SetOffset(size_t axis, float offs, bool byProbing) pre(axis < MaxAxes); + AxesBitmap GetAxisOffsetsProbed() const { return axisOffsetsProbed; } size_t DriveCount() const; int Drive(size_t driveNumber) const; bool ToolCanDrive(bool extrude); @@ -99,6 +100,7 @@ private: float standbyTemperatures[Heaters]; size_t heaterCount; float offset[MaxAxes]; + AxesBitmap axisOffsetsProbed; AxesBitmap xMapping, yMapping; FansBitmap fanMapping; Filament *filament; @@ -149,9 +151,4 @@ inline const float *Tool::GetOffsets() const return offset; } -inline void Tool::SetOffset(size_t axis, float offs) -{ - offset[axis] = offs; -} - #endif /* TOOL_H_ */ |