Skip to content

support motor intialization status tracking #143

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 18, 2021

Conversation

runger1101001
Copy link
Member

Simple tracking of the motor initialisation status.

This allows an external observer to know whether the motor is uninitialised, uncalibrated, currently calibrating, etc...

The following stati are tracked:

enum FOCMotorStatus : uint8_t {
  motor_uninitialized = 0x00,     //!< Motor is not yet initialized
  motor_initializing  = 0x01,     //!< Motor intiialization is in progress
  motor_uncalibrated  = 0x02,     //!< Motor is initialized, but not calibrated (open loop possible)
  motor_calibrating   = 0x03,     //!< Motor calibration in progress
  motor_ready         = 0x04,     //!< Motor is initialized and calibrated (closed loop possible)
  motor_error         = 0x08,     //!< Motor is in error state (recoverable, e.g. overcurrent protection active)
  motor_calib_failed  = 0x0E,     //!< Motor calibration failed (possibly recoverable)
  motor_init_failed   = 0x0F,     //!< Motor initialization failed (not recoverable)
};

Only the initialisation is affected, the status is not used by the rest of the code.

I have so far tested on STM32.

@runger1101001 runger1101001 added the enhancement New feature or request label Dec 6, 2021
@runger1101001
Copy link
Member Author

Ok, lets merge to dev since there were no objections :-)

@runger1101001 runger1101001 merged commit 5de2e75 into simplefoc:dev Dec 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant