int8_t acroTainerMode= 0;
if (abs(rcCommand[ROLL]) + abs(rcCommand[PITCH]) >= 200) acroTainer=1;
//**** PITCH & ROLL & YAW PID ****
for(axis=0;axis<3;axis++) {
if (f.ACC_MODE && axis<2 && !acroTainerMode) { //LEVEL MODE
// 50 degrees max inclination
wilco1967 wrote:You could also do something like that in your transmitter, rather then in the MultiWii.
if your Tx has some decent firmware, that allows custom switches, it should not be so difficult.
signal15 wrote:Ok, holy crap. I tried the code above. I set my RC Rate to 1.0 and my Pitch/Roll rate to 0.7. I got it up about 50 feet and tried some rolls, letting go of the stick right before it was level again. Works like a charm. Then I pulled the stick to the back right corner, and did two backwards pitch/roll flips. It was falling out of the sky like a wounded duck, I thought for sure I had made a big mistake. I let go of the stick, and within 5 feet it was level again.
Something like this needs to be rolled into the next release, it is awesome.
PatrikE wrote:What a adrenalineKick!...![]()
![]()
My first flip ever!![]()
I tested the code and it works fine.
A little warning....
The transfer betweem the modes is very sharp.
When you pass the threshold with the sticks it will become Wild!
If a lower threshold value than 200 it can be more soft.
I will test it better tomorrow when it's light.
And it it still feels god i will merge it..
As #define ACROTRAINER 200
What a kick!!!
/Patrik
if (abs(rcCommand[ROLL]) >=200 || abs(rcCommand[PITCH]) >=200) acroTrainerMode=1;
Alexinparis wrote:Sorry Patrik,
But I ask you to unmerge it.
We can't add new things during the consolidation step to 2.1
wilco1967 wrote:Alexinparis wrote:Sorry Patrik,
To just fly around it's a bitch, but for doing flips it's amazing.... in a moment of desorientation, you don't need to find your level switch as before. just let go of the sticks, and voillaall sorted.
PatrikE wrote:Acrotrainer mode is now added to shared.
With #define ACROTRAINER 200.
It's possible to fly around in level mode.
Once the sticks is outside the 200 area it's in acroMode and can be flipped over.
Release the stick and it will return to stable.
Change the ACROTRAINER value to suite your flight style and setup.
A lower value will enter acromode earlier.
Baro,Mag,Level and GPS will be disabled when the acrotrainer mode take over.
PatrikE wrote:Acrotrainer mode is now added to shared.
Baro,Mag,Level and GPS will be disabled when the acrotrainer mode take over.
PatrikE wrote:...
It oscilated some before it setteled. ...
if(acroTainer ) {
974 GPS_angle[ROLL] = 0;
975 GPS_angle[PITCH] = 0;
976 }
if ( (!f.GPS_HOME_MODE && !f.GPS_HOLD_MODE) || !f.GPS_FIX_HOME || acroTainer )
PatrikE wrote:@Alexiinparis.
The Level flag is untouched.
It just skip the Level part of the code so gps is not effected.
Maby better to change the flags?
if(acroTainer ) {
GPS_angle[ROLL] = 0;
GPS_angle[PITCH] = 0;
}
if (f.ACC_MODE && axis<2 && !acroTainer) { //LEVEL MODE
Alexinparis wrote:I've just commit the HORIZON mode
(viewtopic.php?f=8&t=901&p=5642)
It basically allows what acrotrainer allows, but in a proportional way.
ie ability to do 3 flips per second and release the sticks to regain horizontal attitude in a smooth transition.
crashlander wrote:Does also disables and later resets GPS POS.H. and ALT. like I suggested before and thus enables to fly with permanent POS.H. on but it only becomes active when there is no stick input (DJI Naza style)?
//#define NAZA_MODE 20 // Define the deadspan.
#if defined(NAZA_MODE)
if(f.ANGLE_MODE || f.HORIZON_MODE){
if (abs(rcCommand[ROLL]) + abs(rcCommand[PITCH]) >= NAZA_MODE) {
//f.ANGLE_MODE=0;
//f.HORIZON_MODE=0;
//f.MAG_MODE=0;
f.BARO_MODE=0;
f.GPS_HOME_MODE=0;
f.GPS_HOLD_MODE=0;
}
}
#endif
Alexinparis wrote:I've just commit the HORIZON mode
(viewtopic.php?f=8&t=901&p=5642)
It basically allows what acrotrainer allows, but in a proportional way.
ie ability to do 3 flips per second and release the sticks to regain horizontal attitude in a smooth transition.
#define ACROTRAINER_MODE 10
/************************ AP FlightMode **********************************/
/* Temporarily Disables GPS_HOLD_MODE to be make it possible to adjust the Hold-position when moving the sticks.*/
//#define AP_MODE 10 // Create a deadspan for GPS.
PatrikE wrote:
I have tested the HORIZON mode.
I like the mode for flying around.
Then it works fine.
But i don't like the behaivor when i do a flip in one axis.
Once it's tilted over 90 degrees it starts compensate for the other axis.
Result...
It will return in level but 180 degrees rotated.
Can be cofusing when you suddenly face it nose in after recovery.
Maby it can be combined with ahe acrotrainer to shut of the other axis to?
crashlander wrote:@PatrikE
After "uber cool" mahowik's implementation of ALT. HOLD. I believe it is a shame to turn it off (ever)when AP_MODE kicks in so it is probably better to remove disabling f.BARO_MODE with AP_MODE in default code (or at least make it configurable in define.h).
Regards Andrej
#if defined(AP_MODE)
if(f.ANGLE_MODE || f.HORIZON_MODE){
if (abs(rcCommand[ROLL])>= AP_MODE || abs(rcCommand[PITCH]) >= AP_MODE) {
f.BARO_MODE=0;
f.GPS_HOME_MODE=0;
f.GPS_HOLD_MODE=0;
}
}
#endi
PatrikE wrote:Search for AP_MODE in multiwii.ino
- Code: Select all
#if defined(AP_MODE)
if(f.ANGLE_MODE || f.HORIZON_MODE){
if (abs(rcCommand[ROLL])>= AP_MODE || abs(rcCommand[PITCH]) >= AP_MODE) {
f.BARO_MODE=0;
f.GPS_HOME_MODE=0;
f.GPS_HOLD_MODE=0;
}
}
#endi
Comment or remove f.BARO_MODE=0;.
Should maby be removed in _shared.
Users browsing this forum: No registered users and 1 guest