-
Notifications
You must be signed in to change notification settings - Fork 53
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
How to determine sensor_mode of foc #33
Comments
Can you share your code for COMM_GET_MCCONF and then how to change the value of above parameter |
In the repository that I use github.com/MXMP/PyVESC-FW3.33 there is a COMM_GET_MCCONF message in getters.py so the librairy parse it. define the message class (already define in the repository I share) :
Send the message :
Read the answer :
|
My goal is to create a Python script with the same functionality as the VESCTOOL setupwizardfoc. I am using the Pyvesc library to encode and decode messages for the VESC. I send the COMM_DETECT_APPLY_ALL_FOC message, the motor runs correctly, and I receive a response corresponding to the COMM_GET_MCCONF message. So far, I am following the same logic that I observed in the VESCTOOL source code.
What I do not understand is the logic VESCTOOL uses to analyze the mcconf of the VESC and deduce the foc_sensor_mode. In the COMM_GET_MCCONF message that I receive, there are many parameters, as you can see in the text below. However, the only parameter whose value changes depending on the Sensor mode in the FOC tab of VESCTOOL is the following:
Message sent by the VESC in response to COMM_DETECT_APPLY_ALL_FOC:
The text was updated successfully, but these errors were encountered: