Hi,
I mentioned this more than once in the past and now I have some new infos.
As you might knwo, I ahd some problems with the failsafe feature since v1.8.
The effect is as follows:
If I turn of my TX (loosing contact) the failsafe starts and starts to land. After the waiting time the motors shutting down. Since 1.8 the motors are try<ing to rearm in cycles, one can see that in the GUI, the throttle is alternating between zero and some value.
This only happens if you loose conenction if throttle < minthrottle and you use the armi/disarm feature via Aux1/aux2.
I tried some fixes but I am not satisfied. The problem is, that the values for all channels are alternating between failsave values and real values, even the Aux1/aux2. So the copter is really trying to arm for milisecond.
I think this is a serious problem.
Nils
1.8: Serious Failsave Issue
- jevermeister
- Posts: 708
- Joined: Wed Jul 20, 2011 8:56 am
- Contact:
Re: 1.8: Serious Failsave Issue
jevermeister wrote:I think this is a serious problem.
only if failsafe kicks in
yes it is. who knows about failsafe and arm via aux1/aux2 implementation details?
Hamburger
- jevermeister
- Posts: 708
- Joined: Wed Jul 20, 2011 8:56 am
- Contact:
Re: 1.8: Serious Failsave Issue
Hi,
I think I found the reason.
rcoptions is a few lines later in the code, so if the failsave disarms the copter, the throttle is zero and rearms it.
Solution one
Failsafe_warn is a variable I introduced to show the actual failsafe level. This is used for the buzzer alarm frequency
or put the whole stick input thingy into a if failsafe not active statement.
I have to test it this evening wehen I am home from work and training. I keep you guys updated!
Nils
I think I found the reason.
Code: Select all
} else if (activate[BOXARM] > 0) {
if ((rcOptions & activate[BOXARM]) && okToArm) armed = 1; //only rearm if failsafe
else if (armed) armed = 0;
rcDelayCommand = 0;
}
.
.
.
.
rcOptions = (rcData[AUX1]<1300) + (1300<rcData[AUX1] && rcData[AUX1]<1700)*2 + (rcData[AUX1]>1700)*4
+(rcData[AUX2]<1300)*8 + (1300<rcData[AUX2] && rcData[AUX2]<1700)*16 + (rcData[AUX2]>1700)*32;
rcoptions is a few lines later in the code, so if the failsave disarms the copter, the throttle is zero and
Code: Select all
rcOptions & activate[BOXARM]) && okToArm)
Solution one
Code: Select all
} else if (activate[BOXARM] > 0) {
if ((rcOptions & activate[BOXARM]) && okToArm && failsafe_warn < 2) armed = 1; //only rearm if failsafe
Failsafe_warn is a variable I introduced to show the actual failsafe level. This is used for the buzzer alarm frequency
or put the whole stick input thingy into a if failsafe not active statement.
I have to test it this evening wehen I am home from work and training. I keep you guys updated!
Nils
- jevermeister
- Posts: 708
- Joined: Wed Jul 20, 2011 8:56 am
- Contact:
Re: 1.8: Serious Failsave Issue
I found the solution, i already coded and tested it, i tried to commit it into my branch, but server eror again
Nils
Nils
-
- Posts: 1630
- Joined: Wed Jan 19, 2011 9:07 pm
Re: 1.8: Serious Failsave Issue
thank you for this code digging.
I think it's also possible to avoid this effect with the existing variable:
I think it's also possible to avoid this effect with the existing variable:
Code: Select all
if ((rcOptions & activate[BOXARM]) && okToArm && (failsafeCnt <= 5*FAILSAVE_DELAY)) armed = 1;
Even More Serious Failsafe Issue
me too i'm facing a serious problem with Fail safe.
i've kinda 3 fails safe : within the multiwii code, within the quadrino FC and within the Rx/Tx.
i've made a test by shutting off my Tx and...absolutely nothing happened ;(props remain turning at the same speed until i switch back on the Tx.
don't know from where to start, please any help ?
i've kinda 3 fails safe : within the multiwii code, within the quadrino FC and within the Rx/Tx.
i've made a test by shutting off my Tx and...absolutely nothing happened ;(props remain turning at the same speed until i switch back on the Tx.
don't know from where to start, please any help ?
- jevermeister
- Posts: 708
- Joined: Wed Jul 20, 2011 8:56 am
- Contact:
Re: 1.8: Serious Failsave Issue
Alexinparis wrote:thank you for this code digging.
I think it's also possible to avoid this effect with the existing variable:Code: Select all
if ((rcOptions & activate[BOXARM]) && okToArm && (failsafeCnt <= 5*FAILSAVE_DELAY)) armed = 1;
Alex, your welcome.
I think this solution is more elegant :
Code: Select all
if (failsafeCnt > 5*(FAILSAVE_DELAY+FAILSAVE_OFF_DELAY)) { // Turn OFF motors after specified Time (in 0.1sec)
armed = 0;
okToArm = 0; //This will prevent the copter to automatically rearm if failsafe shuts it down and prevents to restart accidentely by just reconnect to the tx - you will have to switch off first to rearm
}
This resets the switch. And also it prevents form starting the copter unwanted just by getting contact again after the failsafe turned it off, i think this is a safety feature we should use.
Nils