Hi,
somebody knows how to disable the altitude hold automatically when radio signal is lost? The failsafe routine put the motors at a user defined value but it only works when altitude hold (baro) is disabled!
I'm working with the 231 Multiwii version on a Multiwii board ( defined as Crius v1 ).
Thanks
Failsafe features
Re: Failsafe features
If your RX has failsafe memory then just select what you want to happen, such as RTH or Land & push failsafe button on RX. Mine is a Lemon 8 channel & failsafe works on all channels as soon as it detects signal loss.
-
- Posts: 5
- Joined: Sun Jan 18, 2015 6:56 pm
- Location: Milano - Italy
Re: Failsafe features
Hi,
my TX / RX are Turnigy 9X with 8 channels receiver. I expected the Multiwii code to do the right job in any flight mode conditions.
my TX / RX are Turnigy 9X with 8 channels receiver. I expected the Multiwii code to do the right job in any flight mode conditions.
-
- Posts: 5
- Joined: Sun Jan 18, 2015 6:56 pm
- Location: Milano - Italy
Re: Failsafe features
Hi again,
this is the Faisafe routine written by MIS in Multiwii.cpp raws 862 to 879 ( Thanks! it's working properly )
I'm actually running the Multiwii version 231 (r1739)
I would like to know if it is OK to modify the following piece of code to obtain a disable BARO in case of radio signal lost.
Original code:
New possible code:
Thanks for help...
fgmultiwii ( Fiorenzo )
this is the Faisafe routine written by MIS in Multiwii.cpp raws 862 to 879 ( Thanks! it's working properly )
I'm actually running the Multiwii version 231 (r1739)
I would like to know if it is OK to modify the following piece of code to obtain a disable BARO in case of radio signal lost.
Original code:
Code: Select all
// Failsafe routine - added by MIS
#if defined(FAILSAFE)
if ( failsafeCnt > (5*FAILSAFE_DELAY) && f.ARMED) { // Stabilize, and set Throttle to specified level
for(i=0; i<3; i++) rcData[i] = MIDRC; // after specified guard time after RC signal is lost (in 0.1sec)
rcData[THROTTLE] = conf.failsafe_throttle;
if (failsafeCnt > 5*(FAILSAFE_DELAY+FAILSAFE_OFF_DELAY)) { // Turn OFF motors after specified Time (in 0.1sec)
go_disarm(); // This will prevent the copter to automatically rearm if failsafe shuts it down and prevents
f.OK_TO_ARM = 0; // to restart accidentely by just reconnect to the tx - you will have to switch off first to rearm
}
failsafeEvents++;
}
if ( failsafeCnt > (5*FAILSAFE_DELAY) && !f.ARMED) { //Turn of "Ok To arm to prevent the motors from spinning after repowering the RX with low throttle and aux to arm
go_disarm(); // This will prevent the copter to automatically rearm if failsafe shuts it down and prevents
f.OK_TO_ARM = 0; // to restart accidentely by just reconnect to the tx - you will have to switch off first to rearm
}
failsafeCnt++;
#endif
// end of failsafe routine - next change is made with RcOptions setting
New possible code:
Code: Select all
// Failsafe routine - added by MIS
#if defined(FAILSAFE)
if ( failsafeCnt > (5*FAILSAFE_DELAY) && f.ARMED) { // Stabilize, and set Throttle to specified level
for(i=0; i<3; i++) rcData[i] = MIDRC; // after specified guard time after RC signal is lost (in 0.1sec)
f.BARO_MODE = 0; // this should disable BARO - Is it correct ?
rcData[THROTTLE] = conf.failsafe_throttle;
if (failsafeCnt > 5*(FAILSAFE_DELAY+FAILSAFE_OFF_DELAY)) { // Turn OFF motors after specified Time (in 0.1sec)
go_disarm(); // This will prevent the copter to automatically rearm if failsafe shuts it down and prevents
f.OK_TO_ARM = 0; // to restart accidentely by just reconnect to the tx - you will have to switch off first to rearm
}
failsafeEvents++;
}
if ( failsafeCnt > (5*FAILSAFE_DELAY) && !f.ARMED) { //Turn of "Ok To arm to prevent the motors from spinning after repowering the RX with low throttle and aux to arm
go_disarm(); // This will prevent the copter to automatically rearm if failsafe shuts it down and prevents
f.OK_TO_ARM = 0; // to restart accidentely by just reconnect to the tx - you will have to switch off first to rearm
}
failsafeCnt++;
#endif
// end of failsafe routine - next change is made with RcOptions setting
Thanks for help...
fgmultiwii ( Fiorenzo )