Removed exit(-1) from init
When the initialization fails, the motor will now try again during each poll.
This commit is contained in:
@@ -1,6 +1,9 @@
|
||||
#ifndef turboPmacAXIS_H
|
||||
#define turboPmacAXIS_H
|
||||
#include "sinqAxis.h"
|
||||
#include <memory>
|
||||
|
||||
struct turboPmacAxisImpl;
|
||||
|
||||
// Forward declaration of the controller class to resolve the cyclic dependency
|
||||
// between the controller and the axis .h-file. See
|
||||
@@ -123,14 +126,24 @@ class turboPmacAxis : public sinqAxis {
|
||||
*/
|
||||
asynStatus handleError(int error, char *userMessage, int sizeUserMessage);
|
||||
|
||||
protected:
|
||||
/**
|
||||
* @brief Check if the axis needs to run its initialization function
|
||||
*
|
||||
* @return true
|
||||
* @return false
|
||||
*/
|
||||
bool needInit();
|
||||
|
||||
/**
|
||||
* @brief Instruct the axis to run its init() function during the next poll
|
||||
*
|
||||
* @param needInit
|
||||
*/
|
||||
void setNeedInit(bool needInit);
|
||||
|
||||
private:
|
||||
turboPmacController *pC_;
|
||||
|
||||
bool waitForHandshake_;
|
||||
time_t timeAtHandshake_;
|
||||
|
||||
// The axis status is used when enabling / disabling the motor
|
||||
int axisStatus_;
|
||||
std::unique_ptr<turboPmacAxisImpl> pTurboPmacA_;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user