Fixed an uninitialized memory bug: In AmorDetectorAxis, the variables

det_starting and det_startTime were not initialized before reading them
in the poll function, leading to erratic behaviour.
This commit is contained in:
2024-10-04 17:03:15 +02:00
parent 80205727c7
commit eb1bb58c36
2 changed files with 3 additions and 1 deletions

View File

@ -1186,6 +1186,8 @@ AmorDetectorAxis::AmorDetectorAxis(pmacController *pC, int axisNo, int function)
pC_->debugFlow(functionName);
_function = function;
det_starting = false;
det_startTime = time(NULL);
callParamCallbacks();

View File

@ -117,7 +117,7 @@ class LiftAxis : public pmacAxis {
The default constructor of LiftAxis just forwards to the pmacAxis
constructor, which has an optional argument "autoenable" with the default
value "true". However, we want that argument to be false, hence we provide
an explicit constructor
an explicit constructor.
*/
LiftAxis(pmacController *pController, int axisNo)
: pmacAxis((pmacController *)pController, axisNo, false) {};