diff options
author | David Crocker <dcrocker@eschertech.com> | 2019-07-26 16:28:10 +0300 |
---|---|---|
committer | David Crocker <dcrocker@eschertech.com> | 2019-07-26 16:28:10 +0300 |
commit | e8b3883006c7757a33f67160b64c87bbb28a5bcd (patch) | |
tree | ae112caeae63c75896fdce5ef636f6a34c43b005 /src/Endstops/EndstopDefs.h | |
parent | df3e8f2c766fe2cf8ea0b671cf044cb4d837c3d0 (diff) |
Major refactoring of heater management and driver IDs
Renamed class PID to LocalHeater and moved some functions to new base class Heater
Added class RemoteHeater
Heaters are no longer created by default
Replaced driver numbers by class DriverId with both board# and local driver# on Duet 3
Refectored stepper driver management to handle DriverId
Diffstat (limited to 'src/Endstops/EndstopDefs.h')
-rw-r--r-- | src/Endstops/EndstopDefs.h | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/Endstops/EndstopDefs.h b/src/Endstops/EndstopDefs.h index be409303..2f0f6cec 100644 --- a/src/Endstops/EndstopDefs.h +++ b/src/Endstops/EndstopDefs.h @@ -23,21 +23,24 @@ enum class EndstopHitAction : uint8_t stopAll = 4 // stop movement completely }; -// Struct that fits in a single register, to return info about what endstop has been triggered and what to do about it +// Struct to return info about what endstop has been triggered and what to do about it struct EndstopHitDetails { - EndstopHitDetails() : action((uint32_t)EndstopHitAction::none), internalUse(0), driver(0), axis(0), setAxisLow(false), setAxisHigh(false) { } + EndstopHitDetails() : action((uint32_t)EndstopHitAction::none), internalUse(0), axis(0), setAxisLow(false), setAxisHigh(false) + { + driver.Clear(); + } void SetAction(EndstopHitAction a) { action = (uint32_t)a; } EndstopHitAction GetAction() const { return (EndstopHitAction)action; } - uint32_t action : 4, // an EndstopHitAction + uint16_t action : 4, // an EndstopHitAction internalUse : 4, // used to pass data between CheckTriggered() and Acknowledge() - driver : 8, // which driver to stop if the action is stopDriver, or if it is a stall detection endstop - axis : 8, // which axis to stop if the action is stopAxis, and which axis to set the position of if setAxisPos is true + axis : 4, // which axis to stop if the action is stopAxis, and which axis to set the position of if setAxisPos is true setAxisLow : 1, // whether or not to set the axis position to its min setAxisHigh : 1, // whether or not to set the axis position to its max isZProbe : 1; // whether this is a Z probe + DriverId driver; }; // The values of the following enumeration must tally with the X,Y,... parameters for the M574 command |