Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/motors/HybridStepperMotor/HybridStepperMotor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,13 @@ void HybridStepperMotor::linkDriver(BLDCDriver *_driver)
}

// init hardware pins
void HybridStepperMotor::init()
int HybridStepperMotor::init()
{
if (!driver || !driver->initialized)
{
motor_status = FOCMotorStatus::motor_init_failed;
SIMPLEFOC_DEBUG("MOT: Init not possible, driver not initialized");
return;
return 0;
}
motor_status = FOCMotorStatus::motor_initializing;
SIMPLEFOC_DEBUG("MOT: Init");
Expand Down Expand Up @@ -70,6 +70,7 @@ void HybridStepperMotor::init()
_delay(500);

motor_status = FOCMotorStatus::motor_uncalibrated;
return 1;
}

// disable motor driver
Expand Down
2 changes: 1 addition & 1 deletion src/motors/HybridStepperMotor/HybridStepperMotor.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class HybridStepperMotor : public FOCMotor
BLDCDriver *driver;

/** Motor hardware init function */
void init() override;
int init() override;
/** Motor disable function */
void disable() override;
/** Motor enable function */
Expand Down