Comments (4)
You're right... no one has ever reported this before, I think because it is generally assumed that you either
- always pass the target value to the move function
- or never pass the target value via move, and instead just set
motor.target
To see the bug you're experiencing you must be passing the value sometimes, and sometimes not. As a workaround, I suggest just using motor.target = x;
to change the target, rather than using the move function.
In the next release, I think we'll probably place the target setting at the top of the function like you suggest to solve this edge case.
In a future version of the API, I would remove the parameter to move() completely, as the semantics are confusing, and either just setting the member field directly or using a setter function like motor.setTarget() would be clearer, I feel.
from arduino-foc.
Solved for BLDCMotor, StepperMotor and HybridStepperMotor (drivers repository). DCMotor was not affected.
Merged to dev branch.
from arduino-foc.
In a future version of the API, I would remove the parameter to move() completely, as the semantics are confusing
Agreed.
from arduino-foc.
Thanks for this. This one is an old and sneaky one!
The parameter for move
was the initial way to set the target value. We have pivoted from this paradigm some time ago with the motor.target
. The parameter to move
stayed no to break the API at first. And it stayed a bit too long :D
from arduino-foc.
Related Issues (20)
- [FEATURE] Performance of setting the PWM duty cycles HOT 8
- [FEATURE] Add library.json to set libArchive? HOT 2
- [BUG] BLDCDriver6PWM issue with STM Nucleo HOT 14
- [BUG] OpenOCD init failed while using specific pin HOT 6
- Update KV estimation example to match new code
- [FEATURE] Allowing to choose SPI pins HOT 1
- Can't change PWM frequency - 550hz [BUG] HOT 8
- [BUG] Monitor downsampling cannot be disabled HOT 2
- 20bit magnetic encoder support
- [BUG] ESP32 current sensing readings not synced with PWM - Not reproducible HOT 2
- [BUG] Error in doc: initFOC() cannot be used in open loop mode HOT 1
- driverAlign() ignores gain sign, always "MOT: Success: 3" HOT 3
- [BUG] PlatformIO adding SimpleFOC requires to specify SPI and WIRE lib_deps to prevent compile errors HOT 5
- Support for the new ESP32 LEDC library API HOT 3
- Is this FOC suppot high speed BLDC(5000rpm)?[FEATURE] HOT 2
- MagneticSensorI2C uses incorrect bit mask calculation HOT 4
- [FEATURE] Support for arduino-esp32 v3.0.1
- [FEATURE] Current sensing for stepper motors - FOC current control
- [BUG] Trap 150 potential miscalculation
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from arduino-foc.