1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-23 00:05:33 +03:00
Commit graph

223 commits

Author SHA1 Message Date
Blaine
2e552841f1 Enables Vario on targets that support barometers
OSD and telemetry output of vario data is enabled on F4 and up targets
that have
USE_BARO defined.  Settings and telem elements are removed from all
other targets.

F3 targets are not supported to free memory.
2018-09-02 23:20:07 -07:00
Michael Keller
a8b92ea920
Merge pull request #6662 from awolf78/master
GPS over MSP related fixes
2018-09-03 10:12:24 +12:00
Alex Wolf
7115ab4047 GPS over MSP related fixes 2018-08-31 22:31:56 -04:00
Bruce Luckcuck
f1488220f3 Rename level mode parameters to match their function
4.0 seems like a good time to rename these confusing legacy parameters to something that matches their function.

p_level -> angle_level_strength
i_level -> horizon_level_strength
d_level -> horizon_transition
2018-08-31 16:04:26 -04:00
timman2er
bc596e1f8b fixup Mikeller and levinap 2018-08-29 02:38:41 +02:00
timman2er
7b196b2ed7 ledvinap review (without editing battery.c if statements) 2018-08-27 18:30:03 +02:00
timman2er
3fea35079f add way to manually override battery cell count 2018-08-27 17:01:58 +02:00
timman2er
fc49f738c9 flip arrow turtle mode 2018-08-27 11:16:03 +02:00
mikeller
0bce8549ee Renamed 'fc/fc_' files to remove the double 'fc'. 2018-08-26 14:07:06 +12:00
Michael Keller
a02e1dd384
Merge pull request #6610 from jflyper/bfdev-osd-warn-fail-safe
Add osd warning for fail safe state.
2018-08-23 22:36:48 +12:00
Michael Keller
c12981f732
Merge pull request #6617 from etracer65/gyro_lpf_updates
Disable DLPF EXPERIMENTAL mode for MPU60x0; remove experimental support from F3
2018-08-23 22:25:48 +12:00
Bruce Luckcuck
0e8e5b3c16 Disable DLPF EXPERIMENTAL mode for MPU60x0; remove experimental support from F3
Officially Invensense lists the experimentl mode as "unsupported" on the MPU60x0 series. Previously it was added to allow testing.  It's been determined that it's not a viable gyro filtering operational mode.

Also change "experimental" DLPF support available for F4 or higher. Few F3 boards have gyros that can use this mode anyway.  Saves 200 bytes.
2018-08-22 09:50:10 -04:00
jflyper
82268b7a4e Add osd warning for fail safe state. 2018-08-22 20:22:40 +09:00
Michael Keller
53151817e1
Merge pull request #6430 from mikeller/remove_duplicate_build_bug_on
Removed 'BUILD_BUG_ON'.
2018-08-22 18:49:45 +12:00
mikeller
b4db764b46 VTX improvements from iNav. 2018-08-20 23:26:57 +12:00
Michael Keller
43e6ea31da
Merge pull request #6517 from ctzsnooze/DynFiltV5
Dynamic Filter Update
2018-08-20 23:23:50 +12:00
ctzsnooze
759007214b remove PT1
warning:
In file included from ./src/main/sensors/gyro.c:1022:0:
./src/main/sensors/gyro_filter_impl.h: In function 'filterGyro':
./src/main/sensors/gyro_filter_impl.h:18:15: warning: variable 'gyroDataForAnalysis' set but not used
2018-08-20 12:15:05 +10:00
mikeller
70ac9423c7 Unified BUILD_BUG_ON and STATIC_ASSERT into STATIC_ASSERT. 2018-08-20 10:50:06 +12:00
ctzsnooze
14c90bf10b user configurable sample rate, true peak detection
1. User can set sampling rate to suit expected range of frequencies:
- HIGH suits 4" or smaller and 6S 5"
- MEDIUM suits classic 5" 4S
- LOW is for 6" or greater
Limits automatically scaled:
HIGH : 133/166 to 1000Hz, MEDIUM : 89/111 to 666Hz, LOW : 67/83 to 500Hz
2. Bandpass entirely eliminated, not needed.
3. True peak detection method, favouring first peak to exceed 80% of maximum bin height; ignore or threshold values not required.
2018-08-20 00:33:11 +10:00
Andrey Mironov
3f001295f7 Simplified FFT location 2018-08-20 00:33:11 +10:00
ctzsnooze
1e960c95eb Dynamic Filter Update
Improves on earlier 3.5RC1 dynamic filter with:
- better FFT tracking performance overall, even with a narrower default notch width
- can reach 850Hz for high kV 2.5-3" and 6S quads
- works better with 32k gyros
- can be applied pre- (location 1) and post- (location 2) static filters. Pre-static filter location works best, but post-static may work well in 32k modes or with PT1 option
- option to use a PT1 filter rather than the classical notch filter, perhaps useful for quads with a lot of noise above their peak.
- ability to totally bypass the pre-FFT bandpass filter, by setting Q=0, maximising the range of responsiveness
- "ignore" value, absolute FFT bin amplitude below which the bin will be excluded from consideration. May be tweaked to optimise peak detection; primarily for advanced tuners. If too high, only the very peaks will be included, if too low, noise may clutter peak detection.
- "threshold" value for peak detection, which, when divided by 10, is the multiple by which one bin must exceed the previous one for peak detection to commence. If too low, FFT detection becomes more random, if too high, no peaks are detected.
2018-08-20 00:33:10 +10:00
Kiripolszky Károly
c0e2ca3546 initial implementation of log status OSD element 2018-08-19 10:21:19 +02:00
AirBreak69
0e52e21524 GPS altitude: cleanup all occurancies to assume source is in cm per lsb resolution
Harmonized (and partly corrected) all occurancies of gpsSol.llh.alt and getEstimatedAltitude() to handle altiude sourced in cm resolution.
This was introduced by GSP_RESCUE/RTH.
Introduced a naming convention that include the unit into the variable/function names:
gpsSol.llh.alt -> gpsSol.llh.alt_cm
getEstimatedAltitude() -> getEstimatedAltitude_cm()
2018-08-19 00:11:30 +12:00
Michael Keller
18cc9ef15a
Merge pull request #6404 from s0up/rescue_config_change
[GPS Rescue] - Allow minimum distance to home to be configurable.
2018-08-17 00:22:52 +12:00
Michael Keller
41ce2c6327
Merge pull request #6391 from leocb/osd-max-g-force-stat
Added Max G-force OSD stat
2018-08-17 00:22:11 +12:00
Markus Jevring
131d46c850 Enable using the 'heading' field in MAVlink to display mAh used 2018-08-06 20:26:41 +02:00
s0up
3ade65a438 correct casing per mikeller review 2018-07-22 12:23:33 -07:00
s0up
0f2dc6328e Merge branch 'master' of github.com:betaflight/betaflight into rescue_config_change 2018-07-22 12:21:36 -07:00
mikeller
2746173ab6 Updated defaults. 2018-07-23 00:43:30 +12:00
mikeller
46d3f0dd83 Added parameters for dynamic notch filter. 2018-07-23 00:43:30 +12: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
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
s0up
0fd24e23a4 set maximum min dth value as 1km vs 32km, no reason to be so high 2018-07-20 09:03:51 -07:00
s0up
0e9108f5ad fix rogue space 2018-07-19 23:31:00 -07:00
s0up
d7909df3ba add min rescue distance configuration parameter 2018-07-19 23:29:48 -07:00
mikeller
1286e400d8 Disabled extra (ESC) sensors in SmartPort by default. 2018-07-18 23:31:16 +12:00
leocb
05e42db90b Added Max G-force OSD stat 2018-07-17 11:44:01 -03:00
Michael Keller
e2cf7fc238
Merge pull request #6233 from leocb/add-gforce-osd
Added G-Force to the OSD
2018-07-17 18:28:58 +12:00
Michael Keller
5371350150
Merge pull request #6129 from McGiverGim/iterm_relax_decreasing_I
Add Iterm Relax INC modes
2018-07-09 22:43:33 +12:00
Michael Keller
dfb19981db
Merge pull request #6213 from azolyoung/fixed_open_connection_bug_and_timeout_processing
fixed open connection twice times and timeout logic
2018-06-30 14:45:56 +12:00
azol
8b98528590 fixed open connection twice times and timeout logic 2018-06-28 21:00:54 +08:00
leocb
e2eca1b762 Added G-Force to the OSD 2018-06-27 13:56:26 -03:00
jflyper
23e18069ff Fix bad range for 3d_deadband_throttle 2018-06-23 09:13:41 +09:00
Miguel Angel Mulero Martinez
d63eecffaa Add Iterm Relax INC modes 2018-06-15 15:08:09 +02:00
Thorsten Laux
fefedbd686 attempts to improve relax
attempts to improve relax fix

attempts to improve relax fix

bug fixes

spaces

changed settings and added isAirmodeActive()

fix rebase error
2018-06-08 21:01:46 +12:00
mikeller
a373204d7a Added validation checks for interpolation settings, made throttle boost conditional. 2018-06-05 18:38:57 +12:00
mikeller
9738a1cdd2 Added more options for RC interpolation channel selection. 2018-06-04 22:41:54 +12:00
Bruce Luckcuck
7e18d7c1b9 Make filter type selectable and add BIQUAD
Adds options to select the filter type for both input and derivative.
rc_smoothing_input_type = PT1 | BIQUAD (default is BIQUAD)
rc_smoothing_derivative_type = OFF | PT1 | BIQUAD (default is OFF)
2018-06-03 21:52:15 -04:00
Bruce Luckcuck
826609e703 Experimental filter-based rc channel smoothing
Adds an additional rc channel smoothing algorithm that can be used in place of the default rc interpolation. Utilizing a filter-based approach the smoothing has lower latency and is immune to loop time jitter that can introduce artifacts.  Additionally a smoothing filter is added to the setpoint derivative used to produce D-term setpoint weight resulting in a smoother effect on D.

The default setting is to use the previous interpolation logic and there are no changes unless the optional method is selected.

Configuration:

rc_smoothing_type: (INTERPOLATION | FILTER) - defaults to INTERPOLATION

rc_smoothing_input_hz: (0-255) - sets the rc channel input filter cutoff in Hz. Default value of 0 will enable auto calculation based on received RX frame rate.

rc_smoothing_derivative_hz: (0-255) - sets the setpoint weight derivative filter cutoff in Hz. Default value of 0 will enable auto calculation based on received RX frame rate.

rc_smoothing_debug_axis: (ROLL | PITCH | YAW | THROTTLE) - determines which axis is logged in the debug fields

Debug logging:

set debug_mode = RC_SMOOTHING

debug(0) = raw un-smoothed rc channel data
debug(1) = raw un-smoothed setpoint derivative
debug(2) = filtered setpoint derivative before applied to setpoint weight
debug(3) = auto-calculated filter cutoff frequency base after sampling the rx frame rate

Notes:

Currently only enabled for F4/F7 due to flash size limitations

Uses the rc_inter_ch parameter to determine which channels are smoothed (same as default interpolation logic)

The auto filter cutoff calculation will set a cutoff frequency of 30Hz for typical SBUS frames (9ms).  11ms Spektrum will calculate to approximately 25Hz. The user can manually enter the filter cutoffs to be used instead of the auto calculation.  The current default calculation was chosen as a good starting point but may be adjusted in the future.

Setting a lower cutoff frequency will result in more smoothing, but also more delay.

There currently isn't any support for receivers that change their rx frame rate dynamically.  So for CRSF users wishing to use this alternate smoothing method should change their settings to lock the rx frame rate for now. Support for auto-adjusting to new frame rates in flight will likely be added.
2018-06-03 21:52:01 -04:00