diff options
author | David Crocker <dcrocker@eschertech.com> | 2017-06-11 00:19:50 +0300 |
---|---|---|
committer | David Crocker <dcrocker@eschertech.com> | 2017-06-11 00:23:47 +0300 |
commit | 310b7c0e1ae92d65421276c3779efeddfb6977ff (patch) | |
tree | 56afba8162017646c4f1a47b8da0512482c7f336 /src/Tool.cpp | |
parent | d026b0e4d2a7d5fda771e843cfca12e0370440d7 (diff) |
Version 1.19beta6
Refactored temperatyure sensor code
Refactored fan control code
Support invisible axes (M584 P parameter)
Supprt user-defined virtual heaters
Support heater names
Support proportional thermostatic fan control
Fix G10 retraction command
Removed delta probe code
Diffstat (limited to 'src/Tool.cpp')
-rw-r--r-- | src/Tool.cpp | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/Tool.cpp b/src/Tool.cpp index dcf1b14e..a46260eb 100644 --- a/src/Tool.cpp +++ b/src/Tool.cpp @@ -58,7 +58,7 @@ Tool * Tool::freelist = nullptr; } for (size_t i = 0; i < hCount; ++i) { - if (h[i] < 0 || h[i] >= HEATERS) + if (h[i] < 0 || h[i] >= (int)Heaters) { reprap.GetPlatform().Message(GENERIC_MESSAGE, "Error: Tool creation: bad heater number"); return nullptr; @@ -88,7 +88,7 @@ Tool * Tool::freelist = nullptr; t->displayColdExtrudeWarning = false; t->virtualExtruderPosition = 0.0; - for (size_t axis = 0; axis < MAX_AXES; axis++) + for (size_t axis = 0; axis < MaxAxes; axis++) { t->offset[axis] = 0.0; } @@ -142,7 +142,7 @@ void Tool::Print(StringRef& reply) reply.cat("; xmap:"); sep = ' '; - for (size_t xi = 0; xi < MAX_AXES; ++xi) + for (size_t xi = 0; xi < MaxAxes; ++xi) { if ((xMapping & (1u << xi)) != 0) { @@ -169,12 +169,11 @@ float Tool::MaxFeedrate() const { if (driveCount <= 0) { - reprap.GetPlatform().Message(GENERIC_MESSAGE, - "Error: Attempt to get maximum feedrate for a tool with no drives.\n"); + reprap.GetPlatform().Message(GENERIC_MESSAGE, "Error: Attempt to get maximum feedrate for a tool with no drives.\n"); return 1.0; } float result = 0.0; - const size_t numAxes = reprap.GetGCodes().GetNumAxes(); + const size_t numAxes = reprap.GetGCodes().GetTotalAxes(); for (size_t d = 0; d < driveCount; d++) { const float mf = reprap.GetPlatform().MaxFeedrate(drives[d] + numAxes); @@ -194,7 +193,7 @@ float Tool::InstantDv() const return 1.0; } float result = FLT_MAX; - const size_t numAxes = reprap.GetGCodes().GetNumAxes(); + const size_t numAxes = reprap.GetGCodes().GetTotalAxes(); for (size_t d = 0; d < driveCount; d++) { const float idv = reprap.GetPlatform().ActualInstantDv(drives[d] + numAxes); |