Commit Graph

12027 Commits

Author SHA1 Message Date
Michael Keller 2cbe8b0e9d
Merge pull request #6415 from mikeller/added_per_mcu_builds
Added per-MCU-type build targets.
2018-07-22 14:02:05 +12:00
mikeller 6da89d5f04 Fixed compilation error when displayport over MSP is not defined. 2018-07-22 13:48:43 +12:00
Michael Keller 4382203abf
Merge pull request #6416 from mikeller/remove_kissfcv2f7_from_build
Removed KISSFCV2F7 from build because of ITCM_RAM overflow.
2018-07-22 13:14:48 +12:00
Michael Keller de7a18f1c2
Merge pull request #6409 from mikeller/remove_unused_pid_settings
Removed unused PID settings.
2018-07-22 12:43:19 +12:00
mikeller 08294d21d8 Removed features from F3 targets to make dynamic filter fit. 2018-07-22 12:24:49 +12:00
Michael Keller 2293462324
Added more verbosity. 2018-07-22 12:08:31 +12:00
mikeller 3663fcb285 Removed KISSFCV2F7 from build because of ITCM_RAM overflow. 2018-07-22 11:49:43 +12:00
mikeller ec06575203 Removed unused PID settings. 2018-07-22 11:41:22 +12:00
Michael Keller 5e2fefe036
Merge pull request #6355 from etracer65/pid_feedforward
PID controller feedforward
2018-07-22 11:34:28 +12:00
mikeller 5c16c50826 Added per-MCU-type build targets. 2018-07-22 11:24:07 +12:00
Michael Keller 4d53c3a5d7
Merge pull request #6414 from mikeller/remove_f3_features
Removed features from F3 to make new features fit.
2018-07-22 10:54:52 +12:00
mikeller 19b0f9712f Also removed some from FURYF3. 2018-07-22 10:07:48 +12:00
mikeller 5c2195d5ed Removed features from F3 to make new features fit. 2018-07-22 09:23:42 +12:00
ctzsnooze f1a67f9c19 Put pre-filter debugs into correct location 2018-07-22 01:09:13 +10:00
ctzsnooze 0296ffd13e move raw gyro debug for DEBUG_FFT and DEBUG_FFT_FREQ to correct place 2018-07-22 00:43:55 +10:00
Bruce Luckcuck a1d3a0dba8 Add in-flight adjustments support for feedforward terms
Renamed/repurposed the "D Setpoint" adjustment to be "Pitch & Roll F Adjustment" and have it simultaneously adjust pitch and roll.

Renamed the "D Setpoint Transition" adjustment to be "Feedforward Transition" - no functionality changes.

Added adjustments for the individual Pitch, Roll and Yaw axes.
2018-07-21 10:26:25 -04:00
Bruce Luckcuck 17e76e48f6 PID controller feedforward
Restructures the PID controller to decouple feedforward from D.

Cleaned up the structure of the PID controller; moved some feature-based enhancements out of the main structure.

Feedforward becomes a separate component of the PID controller and there is now:
f_pitch
f_roll
f_yaw

The default values of 60 for pitch and roll matches the default setpoint weight used in BF3.4.  Yaw previously had no setpoint weight capability so the default here needs to be discussed.  Currently it's also set to 60 and flight testing seems positive.  Feedforward on yaw adds a lot of value so I don't think we want to default to 0.  Instead we need decide on the default.

All occurences of setpoint weight have been replaced by feedforward. "setpoint_relax_ratio" has been renamed to "feedforward_transition".

The pidSum now consists of P + I + D + F.

D has been added back for yaw (disabled by default with d_yaw = 0). We've found little need for D for normal quads but it may have value for other configurations - particularly tricopters.

Updated CMS menus to support adjusting the feedforward for each axis.

Changed the default for "rc_interp_ch" to be "RPYT".  Need yaw to be smoothed to support feedforward.

Open issues:

Needs BFC support
- Need to add support for the axis "F" gains.
- Remove "setpoint weight" slider.
- Rename "D Setpoint transition" to "Feedforward transition"

Needs BBE support
- Header "setpoint_relaxation_ratio" has been renamed "feedforward_transition"
- Header "dterm_setpoint_weight" has been replaced with an array named "feed_forward_weight".
  example: H feed_forward_weight:65,60,60    (R,P,Y)
- PID component "AXISF" has been added for all axes. Should be handled like P, I and D values.
- PidSum calculation needs to include F.

Needs LUA script support
- Support the renamed "setpoint_relax_ratio".
- Support for feedforward weight on all 3 axes.

Open code issues:
- rc_adjustments.c - support for adjusting feedforward weight for all axes. Currently only supporting roll - needs coordination with BFC.
2018-07-21 10:26:23 -04:00
Michael Keller 625b23915e
Merge pull request #6220 from ctzsnooze/AG_New
Improved anti-gravity
2018-07-22 02:06:31 +12:00
ctzsnooze ad9197ca6a Dynamic Notch Filter Update
Improves performance of the dynamic notch filter, increasing peak accuracy over a wider band of frequencies, and generally using a narrower, higher notch.
Details:
- FFT now operates on gyro data *after* gyro notches and lowpasses
- FFT bandpass Q changed from 0.707 to 0.05, to 'open up' the FFT to a greater range of incoming frequencies
- FFT centre output now ranges from about 130 to 666Hz.
- ignore the lowest couple of FFT bins going into centre frequency calculation
- analyse FFT bins from low to high, keep ignoring bins until a bin is found that exceeds its previous bin by a factor of 2; then start examining bins from the bin before that (stops the FFT from being biased low, or going to the lowest value if there is no notch at all).
- if no bin exceeds previous by more than 2 times, ie no obvious peak, smoothly go to maximum allowed notch frequency to avoid delay (might be better to bypass filter altogether?)
- dominant bin emphasised by cubing bin height before calculating mean
- maximum cutoff frequency is half the highest allowable centre frequency
- default notch width is +/-25% of centre, narrower than before most of the time
- code tidied up
- thanks to rav, Flint, UAV Tech, icr4sh, diehertz and everyone else who helped with this.
2018-07-21 22:55:41 +10:00
ctzsnooze 36d71d07e7 Dynamic Notch Filter Update
Improves performance of the dynamic notch filter, increasing peak accuracy over a wider band of frequencies, and generally using a narrower, higher notch.
Details:
- FFT now operates on gyro data *after* gyro notches and lowpasses
- FFT bandpass Q changed from 0.707 to 0.05, to 'open up' the FFT to a greater range of incoming frequencies
- FFT centre output now ranges from about 130 to 666Hz.
- ignore the lowest couple of FFT bins going into centre frequency calculation
- analyse FFT bins from low to high, keep ignoring bins until a bin is found that exceeds its previous bin by a factor of 2; then start examining bins from the bin before that (stops the FFT from being biased low, or going to the lowest value if there is no notch at all).
- if no bin exceeds previous by more than 2 times, ie no obvious peak, smoothly go to maximum allowed notch frequency to avoid delay (might be better to bypass filter altogether?)
- dominant bin emphasised by cubing bin height before calculating mean
- maximum cutoff frequency is half the highest allowable centre frequency
- default notch width is +/-25% of centre, narrower than before most of the time
- code tidied up
- thanks to rav, Flint, UAV Tech, icr4sh, diehertz and everyone else who helped with this.
2018-07-21 22:53:07 +10:00
mikeller 4439852984 Fixed test. 2018-07-22 00:24:48 +12:00
Michael Keller 039c74c896
Merge pull request #6398 from mikeller/remove_unused_modes
Remove unused modes.
2018-07-21 23:52:36 +12:00
ctzsnooze 94c7109a4c Changes, thanks mikeller and jirif 2018-07-21 23:49:41 +12:00
ctzsnooze 4c917efa50 Smooth anti gravity 2018-07-21 23:49:41 +12:00
Michael Keller 60a59334a5
Merge pull request #6407 from mikeller/fix_betaflightf3_overflow
Fixed flash overflow on BETAFLIGHTF3.
2018-07-21 19:51:19 +12:00
mikeller bb2b1f58aa Added release freeze announcement for 3.5 to pull request template,
removed F1 end of life message.
2018-07-21 18:46:00 +12:00
mikeller 4354330854 Fixed flash overflow on BETAFLIGHTF3. 2018-07-21 18:16:14 +12:00
Michael Keller f2468fb894
Merge pull request #6392 from s0up/rescue-disarm-fix
Fix rescue early disarm when sanity checks are on
2018-07-19 20:19:39 +12:00
Michael Keller 3a3c835959
Merge pull request #6397 from mikeller/disable_smartport_extra_sensors
Disabled extra (ESC) sensors in SmartPort by default.
2018-07-19 13:51:50 +12:00
Michael Keller 385107fc8b
Merge pull request #6395 from mikeller/update_crsf_format
Updated CRSF frame format to use the sync byte instead of the frame address.
2018-07-19 13:18:12 +12:00
mikeller 017bdca593 Remove unused modes. 2018-07-19 00:12:11 +12:00
Michael Keller 7d56929ffa
Merge pull request #6318 from fujin/remove-bme-for-baro-gpshold-gpshome
Remove MSP BOX BME entries for baro, gps home, gps hold
2018-07-19 00:11:05 +12:00
mikeller 35b93f2c18 Fixed tests. 2018-07-19 00:09:55 +12:00
mikeller 1286e400d8 Disabled extra (ESC) sensors in SmartPort by default. 2018-07-18 23:31:16 +12:00
mikeller 653182c2ef Updated CRSF frame format to use the sync byte instead of the frame address. 2018-07-18 21:44:47 +12:00
Michael Keller 6784ed9335
Merge pull request #6394 from bforbort/ag3x_dshot_beacon
Add DShot Beacon Support to AG3X Target
2018-07-18 21:10:37 +12:00
s0up b69e97fb23 fix the logic to be a little bit more user friendly 2018-07-17 15:14:21 -07:00
s0up 99f223c2fd enable sanity checks by default 2018-07-17 14:21:04 -07:00
Michael Keller 460b72f81f
Merge pull request #6364 from mikeller/add_usb_hid_msp
Added MSP for USB HID configuration.
2018-07-18 08:46:42 +12:00
s0up 4b5972629e fix disarm logic 2018-07-17 11:55:42 -07:00
mikeller 862c14af19 Fixed botched rebase. 2018-07-18 02:30:33 +12:00
Michael Keller ee0113ffff
Merge pull request #6361 from mikeller/adding_profile_msp
Adding MSP for new profile settings introduced in 3.4.
2018-07-18 02:19:25 +12:00
mikeller 80a29b9ad5 Removed unneeded parameters. 2018-07-18 01:14:03 +12:00
mikeller 2735a626e0 Changes from review. 2018-07-18 01:10:47 +12:00
mikeller b4b88a5972 Adding MSP for new profile settings introduced in 3.4. 2018-07-18 01:10:47 +12:00
mikeller 76a51e989e Added MSP for USB HID configuration. 2018-07-18 01:06:01 +12:00
Michael Keller 46fec897ed
Merge pull request #6378 from robertlacroix/sticky-paralyze
Generalize sticky mode code
2018-07-18 00:48:54 +12:00
Michael Keller 3fc6906fa3
Merge pull request #6363 from mikeller/add_rc_smoothing_msp
Added RC smoothing parameters to MSP.
2018-07-18 00:35:30 +12:00
Robert Lacroix a81576b2ae Generalize sticky mode code
Instead of hard coding paralyze this makes the code extensible to possible
future sticky modes

_Legal disclaimer: I am making my contributions/submissions to this project solely in my personal capacity and am not conveying any rights to any intellectual property of any third parties._
2018-07-17 12:15:50 +02:00
Blaine 2a1269aeb8 Initial upload 2018-07-17 01:25:37 -07:00