ButterFlight / butterflight

GNU General Public License v3.0
106 stars 26 forks source link

Butterflight 3.5.2-RC3 ( Odin + IMUF 107 ) #169

Closed orneryd closed 5 years ago

orneryd commented 6 years ago

Adds buttered pids for all targets (measurement d-gain calculation) set buttered_pids=ON it is OFF by default, and applied per pid profile also can be turned on in the OSD.

OSD updates, Save & Exit is on the pid page now for convenience

fixes a bug with the scheduler that prevented realtime updates from being processed in actual realtime. introduces a new "TRIGGER" priority which guarantees a better execution time when the event happens. prior to this, RX updates wouldn't come through in realtime. Gyro loops of 32K would drift anywhere from 18k-40K which would cause MTO and other issues.

includes all other fixes previously tagged for the release.

imuf specific changes:

orneryd commented 6 years ago

@adrianmiriuta so how do we get the gps/mag/baro applied to the quaternion from imuf?

orneryd commented 6 years ago

@adrianmiriuta we may need to just execute all of these in order for every case


    applySensorCorrection(&vError);
    imuMahonyAHRSupdate(deltaT * 1e-6f, &vGyroAverage, &vError);
    imuUpdateEulerAngles();```
adrianmiriuta commented 6 years ago

@orneryd we have to introduce a new function for the error integration to the IMUF quaternion (alternate to imuMahonyAHRSupdate).

but I would omit it for now because mag and baro are broken (I tested both ... and they are badly broken.) and probably dangerous at the moment (betaflight too)

see #6028 #4637

I think GPS is broken also ... but I didn't test it out.

For the moment I would leave out these corrections.

orneryd commented 6 years ago

@adrianmiriuta done. please review

adrianmiriuta commented 6 years ago

@orneryd The IMU part looks Ok, but it needs to be tested. The other changes are related to topics that I am not very familiar with ! ...

kidBrazil commented 6 years ago

@orneryd Seems like this branch is very close but we still have failure on one of the target groups.

https://travis-ci.org/ButterFlight/butterflight/jobs/393480556

adrianmiriuta commented 6 years ago

@kidBrazil @orneryd this is a travis Error, take a look to my fixes PR #183 #184 (the merge compiles Ok). The "Imuf 107 odin #169" compiles Ok (it is a travis glitch).

kidBrazil commented 6 years ago

@adrianmiriuta I ran the build again seems like it is all passing now. So are we good to merge this now? Or are you guys still working on changes?

@orneryd I am assuming this branch includes all of the RC-352 changes that we had going before?

adrianmiriuta commented 6 years ago

@kidBrazil no more changes from my side. I would apply the fixes (PR #183 #184 )and package a RC for large scale testing .

adrianmiriuta commented 6 years ago

@rs2k @kidBrazil

"add iterm changes by joelucid" this commit introduces a heawy CW yaw drift about 1,5°/sec in acro and stabilized modes !

tested on

diff

version

ButterFlight / OMNIBUSF4FW (OBFW) 3.5.2 Jul 2 2018 / 17:54:58 (604b518) MSP API: 1.40

name

name warp-230

resources

resource MOTOR 1 A03 resource MOTOR 2 B00 resource MOTOR 3 B05 resource MOTOR 4 B01

mixer

feature

feature -OSD feature TELEMETRY feature AIRMODE feature ESC_SENSOR feature DYNAMIC_FILTER

beeper

beeper -ON_USB

map

map RETA1234

serial

led

color

mode_color

aux

aux 0 0 1 1950 2075 0 aux 1 1 0 1525 1650 0 aux 2 2 0 1700 1825 0 aux 3 6 2 1950 2075 0 aux 4 7 3 1950 2075 0 aux 5 13 1 1425 1550 0 aux 6 26 1 1950 2075 0

adjrange

rxrange

vtx

rxfail

master

set align_gyro = CW180 set gyro_stage2_filter_type = NONE set gyro_overflow_detect = OFF set align_acc = CW180 set acc_calibration = -39,23,-50 set min_check = 1000 set max_check = 2000 set rc_interp = MANUAL set rc_interp_ch = RPY set rc_interp_int = 9 set serialrx_provider = FPORT set serialrx_halfduplex = ON set motor_pwm_protocol = DSHOT600 set vbat_warning_cell_voltage = 34 set current_meter = ESC set battery_meter = ESC set small_angle = 180 set deadband = 7 set yaw_deadband = 11 set pid_process_denom = 1 set frsky_unit = METRIC set debug_mode = IMU

profile

profile 0

set dterm_lowpass_type = PT1 set dterm_notch_hz = 0 set buttered_pids = ON set p_pitch = 51 set i_pitch = 31 set d_pitch = 31 set p_roll = 51 set i_roll = 31 set d_roll = 31 set p_yaw = 81 set i_yaw = 51 set d_yaw = 7 set d_level = 50 set horizon_tilt_effect = 50 set horizon_tilt_expert_mode = ON

rateprofile

rateprofile 0

set thr_mid = 14 set thr_expo = 67 set roll_rc_rate = 137 set pitch_rc_rate = 137 set yaw_rc_rate = 137 set roll_srate = 73 set pitch_srate = 73 set yaw_srate = 73 set tpa_rate = 70