[LAUNCH] Fix a bug with throttling up in launch mode before throttle is raised#6319
[LAUNCH] Fix a bug with throttling up in launch mode before throttle is raised#6319digitalentity merged 2 commits intomasterfrom
Conversation
70277eb to
a3e7e3c
Compare
|
@digitalentity yes. Thanks, not my daily coding style, so I will try to follow the inav style in the future. Regarding the fix, it's exactly what I've done here. b78ab30 and later I had a proposal in this discussion #6312 to force with min_command. But as you wish if you want to spin the motors at low throttle in launch mode. Now the users will update the inav and will end up with a throttle idle in autolaunch with low throttle. We must make them aware of that to avoid propeller injuries, or perhaps change the default for the |
|
Aha, gotcha. In the 2.5.2 implementation we didn't set the throttle value at all at zero throttle - therefore actual stick value was used: https://github.com/iNavFlight/inav/blob/release_2.5.2/src/main/navigation/navigation_fw_launch.c#L140-L160 So 2.6 will actually change the behavior in this case. Indeed, it makes sense then to force min_throttle. PTAL at fd73511 |
Added Rel Note flag for change of behaviour. |
|
@stronnag fd73511 will actually revert to the old behavior:
|
Exactly. What's odd, I've tested last night and the motor it spins even with I usually arm with autolaunch while the wing is on the ground, perhaps others doing the same. I don't think fd73511 will fix the 2.6 behaviour, maybe just if you |
|
Tested for both |
|
OK, I tried to follow all this, but now it's a bit of a mess in my head. I have motor stop is ON, on my wing. Is this (iNav v2.5) behaviour still the same after this PR? Relevant settings I use: |
|
@0crap yes, the behavior would be this (just verified):
All this discussion was to get the behavior back to what users are used to in 2.5 and earlier. |
|
As I tested yesterday,using MOTOR_STOP ON will still spin the motor at throttle idle. The hex is made with your bug fix |
|
Autolaunch always on, Motor_stop on, Low Throttle, Arm -> motor is at idle Here's the diff: https://pastebin.com/zDtTR8cD |
|
@digitalentity Awesome, it works great as it is in 2.5 |
I expect on Low Throttle and Arm, the motor is NOT spinning, only the buzzer is beeping. |
|
Exactly. The motor should not spin with low throttle and armed, but it seems it does, even with MOTOR_STOP set. |
|
If that is really the case I'm sure it will be fixed. |
|
Just as reminder: if |
|
Interesting, I'm not aware of that setting, so it is at it's default value. |
|
@0crap I had a proposal to fix this but it was closed by @digitalentity #6313 (it may be other solutions, but this works). It can cause injuries or damages for people with a fresh 2.6 and also for many of us, we can't arm a wing on the ground |
|
Whatever the devs decide, please make the Autolaunch DEFAULT behavior like in 2.5 |
02e1fb8 does not belong to this branch. You used some other firmware build where this fix is NOT applied yet. |
|
@0crap, it appears @dragnea did his tests on a firmware which doesn't include fixes from this pull request. I've tested this several times - see #6319 (comment) and #6319 (comment) (yes, I've actually tested your relevant settings). |
|
My test (used settings from #6319 (comment)) tweaked for OMNIBUSF4 board I'm using to test this. Settings diff for folks who're interested in comparing - https://pastebin.com/NbMxEyFh |
@digitalentity this is another branch which is already merged and closed. No more work to do here. There was another branch #6313 where I've fixed the issue from #6312. The build I've made and used in my comment #6319 (comment) is with your changes from the actual pull request. Appearently I have throttle idle with it. Please, let me to do another test and capture what happens |
Actually it includes this pull request |
Your firmware was built from 02e1fb8 which is two commits behind this PR. Please re-build and re-test. |
|
ah I did quick test and I copy-pasted the autolaunch file source :D from here https://github.com/iNavFlight/inav/blob/de_launch_fixes/src/main/navigation/navigation_fw_launch.c just to test |
|
@digitalentity as nav-overrides_motor_stop is not in your diff it seems to be default ALL_ON. So your setup is as mine and it works as expected. Looking good. |
|
@b14ckyy yes, my test has |
|
Just FYI - the same firmware for F405SE was tested on my wing (on the bench as it's raining at the moment) |
That was fast. Bench testing now with different settings as soon as I have GPS fix. It's raining here too and it is pitch black night :D Will flight test RC-2 on the weeken dif the weather allows it. |
|
Be aware that RC2 doesn't include this fix. Better to use custom builds from this branch. |
yeah I mean RC2 with the fix :D But motor stops works as expected when stick is low. |
|
@digitalentity Please take a look at this video: https://www.youtube.com/watch?v=ZzWLTdqXtJU |
|
@dragnea did you check the actual motor behavior? To me this looks like an OSD bug. As for the jump - this is WAI. Motor just won't spin below |
|
That throttle behavior is fine. The PWM Output is between min check 1050-1850 by default. The outputs tab scales this from 0-100%. This is why your Idle throttle of 15% is shown as 12% in the output due to the scaling. That's totally fine. Maybe can be optimized in the Configurator but that's not a issue. |
|
I don't have the wing at my desk this week. I've flashed a quad fc. So the osd and configurator misled me. When I implemented the autolaunch, past months, at least the osd thr was the same with the wing motor(physical)... now different behaviour in every side and I know it's scaled, but I've thrusted them so well. Next week I'll have the chance to see my hangar and I will test it live. I'm still suspicious about some things... |
|
I just tested this on the bench, with launch mode permanently enabled, and it now works again as in 2.5. #6318 also works. |
Awesome! |
|
I'm horrible at baking hex files, so when this PR is merged I'll grab one from here and test myself as well. |
Funnily enough, that repo is built on |
To my understanding that can't be until this PR is merged into master, to trigger a new build cycle. |
I can build my personal hex set on whatever I wish, choosing when I wish to update it. That's why there's a git log there, so you can see what you're getting. |
Ah, you're running that site, now I see! |
|
Seems that all is WAI and tested a few times now. Merging. |
|
Thanks everybody! |
|
And tested on a MATEKF405 target with my "default" settings below. |
|
Thanks for fixing this guys! Will this be RC3? |
It's merged and has the Milestone 2.6 |






Fixes #6312, also some code style changes.
@dragnea, PTAL, this is what I ended up yesterday. Tested, working as intended.