-
Notifications
You must be signed in to change notification settings - Fork 11
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
2.2.2 does not allow you to edit stuff as it constantly updates and overwrites your input #23
Comments
What numbers do you try to set? Are they out of range? |
speed limit is 25, i click the down arrow, 24.... half a second later its 25 again. that's why i posted an excerpt from the log, it seems every 1-2 seconds a new package arrives. I am assuming the code does not lock updates when editing a value. So for some reason this new m400 motor sends updates every 1-2 even when you dont actively query it. Maybe it has to do with a newer firmware on the m400 controller? |
worked now using OpenBafangTool.2.0.1-rc, but still I am wondering if it's possible to fix this |
Yes, its bug in my program, I should fix it |
Sorry I am a total react noobie, does this help? In a React app, to prevent incoming data from overriding a value that a user is actively editing, you can implement a few strategies to control the update behavior conditionally. Here are a few methods that could work well in this case:
Here's a basic example:
This will allow the field to receive data from the CAN bus, but it will pause the updates while the user is interacting with it.
Here’s how it might look:
This code ensures that after the user stops editing, the field won’t be updated for a specified period (2 seconds in this example). |
Thank you, thats good idea. I'll implement it when I have time |
hi there,
trying 2.2.2 with a m400. Everything seems to work until you try editing values like circumference or speed limit: every second your input gets replaced by the current value, so it is impossible to change values ?!
The text was updated successfully, but these errors were encountered: