-
-
Notifications
You must be signed in to change notification settings - Fork 148
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
Throttle level not represented correctly in some 3D modes #108
Comments
This issue / pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs within a week. |
@etracer65 I never used a 3D quad so I don't understand exactly the problem, but if you attach a blackbox log maybe I can look into it. |
@McGiverGim I'm not a 3D pilot either but noticed the behavior in the logs while working on a 3D related issue. A little background first (I'm leaving out the 3D deadzones for simplicity). When ESC's are in 3D mode they apply positive thrust from 50-100% throttle input and negative (reversed) thrust for 50-0% throttle input. In 3D mode the center throttle position (mid_rc defaulting to 1500) is considered zero throttle. So at mid_rc the ESC's get the 50% signal and are idling at lowest motor speed. As the pilot moves the throttle above mid_rc the ESC's see a throttle signal > 50% and spin positively. When pilot input is below mid_rc the ESC's see less than 50% and reverse direction. The blackbox representation of this normal 3D mode is fine and there are no problems. But there are a couple of modifiers to 3D mode that aren't represented correctly. First is the 3D disable switch mode. The idea is that when mode is off, the quad behaves like normal 3D - center throttle is zero, above is positive, below is reversed thrust. When the switch is enabled, then the reversed state is disabled and the pilot's throttle stick command range goes to 1000 to 2000 (using full through), but the motor outputs are scaled from 50-100% using only the positive thrust. So the quad behaves like a normal non-3D quad (albeit with reduced throttle precision). This situation is incorrectly represented in the blackbox log. In this log the throttle input really ranged from 1000-2000, not 1500-2000. The motor outputs are correctly represented ad 50-100% (positive 3D mode thrust). The next case is "3D on a switch". In this case again the 3D feature is enabled and the ESC's are in 3D mode. The parameter When the 3D on a switch is enabled, then the pilot is controlling the inverted motor thrust. Pilot input again ranges from 1000-2000, but motors range from 50-0%. Blackbox shows the pilot input going from 1500-1000 when in reality the stick actually moved from 1000-2000. Motor outputs are still represented correctly. This is probably the worst one as the throttle stick is represented in reverse of reality. I'm not sure this is even completely a BBE problem and possibly the firmware needs to represent the data written to the log more correctly. And/or BBE might need more information about the 3D settings states to more correctly represent the data. |
Too much info for my brain!!!! :-P I will try to test all of them and see if it is a Blackbox or a Firmware issue. The value (1000-2000) is been written by the Firmware, so we can't do too much with it here, and represents the sticks position. The correct is that they always be in the 1000-2000 range, if not I'm pretty sure that the Firmware has wrote it bad (I will check with your files). But the translation into 0%-100% is being done in the Blackbox. So if this translations from us to % is wrong, and the info about the 3D Mode is at the log too, I can try to fix that. |
@McGiverGim: Sorry to blow your brain even more. @etracer65: Yes, in principle, but this is not complete:
This is wrong. At 1500 in 3D mode the ESC output is off (the same as 1000 in non-3D). The jump from idling at 1500 + 3D-deadband / idling forward to 3D-deadband / idling reverse is entirely done in the firmware, when the stick crosses the 1500 line (there's no way to ever go to 'props are stopped' in there). Also, take note that when using 3D with Dshot, the negative half is of the ESC input range is reversed: reverse idle is at Dshot range minimum, and reverse full speed is at Dshot range half - 1. All of this can go a long way to explain the utter mess that is |
I've started to look into this. Some things:
If the change is done in the firmware, I'm not too sure if we must do the inverse translation here. I have the "3D" flight mode flag, but I don't know what of all the modes of your message is. |
Now that the firmware writes in the Blackbox the real sepoint throttle, I think this problem can be fixed in the firmware part. I'm not too sure, but I suppose that now the firmware can write the exact value and we don't need to transform/interpret it. |
Basically it looks like if
feature 3D
is set then the viewer displays the throttle +- the mid_rc point. The problem is that there are switched modes that change back to normal 1000-2000us throttle ranges.For BF3.3:
If
3d_switched_mode = OFF
then the 3D disable mode turns off 3D mode (returns to normal throttle range) when the mode is active.If
3d_switched_mode = ON
the throttle range is always 1000-2000us and the switch 3D mode reverses the motor direction.The text was updated successfully, but these errors were encountered: