fix compile errors for SimpleFOC 2.3.1#142
fix compile errors for SimpleFOC 2.3.1#142runger1101001 wants to merge 1 commit intoscottbez1:masterfrom
Conversation
|
Thanks so much for sending! I want to do some testing of the platform update specifically -- previously I ran into odd scheduling/task delays on the newer platform for the regular ESP32 which caused the motor task to run unreasonably infrequently and hadn't had a chance to diagnose the root cause, so that's why that config has been pinned to an old platform (and therefore old FOC version for lib compatibility) 🫤 |
|
This works great on the S3 build ( |
|
Hi @scottbez1 and @runger1101001. The espressif32 platform update is causing crashes on the
|
|
So the new version of Espressif IDE and Arduino for ESP32 is not compatible with SimpleFOC 2.3.3. Antun has re-written the drivers for MCPWM, LEDC PWM and current sensing to be compatible with the new framework version. We have just merged the fixes to our dev branch, and the next release 2.3.4 will be compatible with the new version of IDF. Until that release you could test against the dev branch. Note that this is a distinct topic to the one originally posted in this issue. |
If you're interested, this patch fixes the compile problems with SimpleFOC 2.3.1.
Of course, I don't have a smartknob myself so I can't test it out :-(
The errors are caused by an API change:
motor.initFOC()no longer takes the zero angle and direction as parameters. The semantics of that were very complicated and error-prone.Now the
zero_electrical_angleandsensor_directioncan be set on the motor in advance of callinginitFOC(), like all the other parameters.If you don't set them, (or set them to NOT_SET, UNKOWN) then the initFOC() will run the calibration. If you provide them in advance, it will skip the calibration.