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

9319 commits

Author SHA1 Message Date
s0up
9d021220e9 Merge branch 'master' of github.com:betaflight/betaflight into failsafe-fix 2018-06-22 20:41:38 -07:00
jflyper
23e18069ff Fix bad range for 3d_deadband_throttle 2018-06-23 09:13:41 +09:00
Bruce Luckcuck
1982c94780 RC smoothing retraining update - adds full support for CRSF
Adds in flight monitoring of the rx frame rate and adapts the filters if the frame rate changes. Primarily to add support for Crossfire with its ability to switch from 150hz to 50hz (and back) under some circumstances. Will work with any protocol - not CRSF specific.   So if future receivers add the ability to switch frame rates dynamically the logic should support them.

If the current rx frame rate is more than +-20% from the previously detected rate, then the process will retrain for the next 50 samples as long as the rate continues to be outside the 20% tolerance. Once 50 samples are collected the new frame rate is updated and the filter cutoffs are adjusted. Only filters set with their cutoffs = 0 (auto) will be adjusted. There is a 2 second guard time after a successful update before retraining can start again to prevent rapid switching back and forth.

The logic is optimized to not perform any training if the filters are set to manual cutoffs. So there is an opportunity for advanced users to choose specific cutoffs and reduce the PID loop load slightly. However this is not recommended for Crossfire or other protocols that might change their rx frame rate.

Updated the output of the `rc_smoothing_info` cli command to match the revised logic.
2018-06-22 20:10:06 -04:00
s0up
33b752a55c oops, derp 2018-06-22 17:08:48 -07:00
s0up
8627c53c19 failsafe fix potentially 2018-06-22 17:07:45 -07:00
Diego Basch
d8b440948a Merge remote-tracking branch 'upstream/master' 2018-06-22 16:57:42 -07:00
Diego Basch
1f738f5aa4 rescueYaw should be signed 2018-06-22 16:56:38 -07:00
Faduf
765274699f Bugfix board alignment YupiF7 2018-06-22 22:19:40 +02:00
Michael Keller
fb5d0e6dc6
Merge pull request #6173 from jflyper/bfdev-allow-pwm-and-softserial-to-coexist
Don't let PWM reset SOFTSERIAL
2018-06-20 20:19:57 +12:00
jflyper
8f65a79789 Remove RX_PARALLEL_PWM originated feature validation based on pins 2018-06-20 11:04:02 +09:00
Michael Keller
2d8c97e82d
Merge pull request #6161 from dbasch/altitude-offset-fix
[GPS Rescue] - Wait for altitude offset to be applied before updating idleTask data
2018-06-20 13:39:00 +12:00
s0up
ce1a3edc03 put altitude offset getter within same ifdef as calculate estimated altitude 2018-06-19 09:06:29 -07:00
Michael Keller
713e72321b
Merge pull request #6166 from etracer65/gps_rescue_heading_fix
Fix gps rescue heading edge case
2018-06-20 01:02:56 +12:00
Michael Keller
c6a5ab9b96
Merge pull request #6096 from AirBreak69/GPS_handle_negative_altitude_and_safer_maths_macros
GPS: handle negative and high altitudes; safer macros in maths.h
2018-06-20 01:01:02 +12:00
Bruce Luckcuck
e83d5a6fc7 Fix gps rescue heading edge case
The yaw heading calculation didn't handle edge cases like 180 and -180 well.  Also cleaned up coding style.
2018-06-19 08:01:44 -04:00
s0up
911c8e406c wait for altitude offset to be applied before updating idleTask data 2018-06-18 14:43:35 -07:00
AirBreak69
91ac74ca9c
Scale MSP altitude back to 1m per lsb as it was before RTH 2018-06-18 23:16:52 +02:00
jflyper
c2a37262a0 F4 dma buffer should not reside in CCM 2018-06-18 02:21:13 +09:00
mikeller
f412e17e89 More USB include woes. 2018-06-17 17:54:18 +12:00
mikeller
448885bfc5 Fixed USB CDC includes. 2018-06-17 16:38:16 +12:00
mikeller
9492899aeb Made it fit on SIRINFPV. 2018-06-17 13:42:30 +12:00
mikeller
40f0c87906 Increased task frequency for the main task. 2018-06-17 13:40:15 +12:00
mikeller
ad9a06289f Added workaround for target independence test. 2018-06-17 13:40:15 +12:00
mikeller
1bd502e9ac Removed function declaration. 2018-06-17 13:40:15 +12:00
mikeller
d2c2bc3155 Reinstated USB connection debug. 2018-06-17 13:39:39 +12:00
mikeller
8107ad254c Fixed special case for SPRACINGF3OSD, fixed tests. 2018-06-17 13:39:39 +12:00
mikeller
afb6068400 Removed tasks from PID loop that don't belong there. 2018-06-17 13:39:39 +12:00
Michael Keller
a7fae6b8f0
Merge pull request #6099 from mikeller/fixed_usb_hid_channel_mapping
Fixed USB HID channel mapping in Windows.
2018-06-17 13:38:03 +12:00
Michael Keller
1fdef20bfc
Merge pull request #6121 from AlienWiiBF/QMC5883L_fix
Fix wrong QMC5883L mag detection
2018-06-17 13:36:02 +12:00
Michael Keller
0dd43c92dc
Merge pull request #6132 from mikeller/fix_pid_loop_slowness
Remove GPS rescue update from PID loop.
2018-06-17 13:35:39 +12:00
Michael Keller
9c55617f05
Merge pull request #6130 from mikeller/fix_dshot_commands_2
Stop Dshot commands from running when ESCs not disarmed.
2018-06-17 12:05:20 +12:00
Michael Keller
319b85777b
Merge pull request #6113 from etracer65/turtle_mode_disarm_cleanup
Only reset motor directon on disarming when crash flip mode was active
2018-06-17 11:41:30 +12:00
Michael Keller
7215505934
Merge pull request #6127 from mikeller/jh_fix_rtc_leap_offset
[From iNav] change year base for RTC time_t to correct leap processing
2018-06-17 11:27:16 +12:00
mikeller
f8c3669ba5 Allow tests to define custom include directories (for libs). 2018-06-17 10:51:13 +12:00
Michael Keller
8a597c3228
Merge pull request #6131 from DieHertz/fix-f7-ledstrip
Marked LED DMA buffer FAST_RAM
2018-06-17 09:19:33 +12:00
mikeller
f067324844 Fixed extra repeat. 2018-06-17 03:07:10 +12:00
Michael Keller
609e304643
Merge pull request #6122 from dbasch/performance-fix
[GPS Rescue] - Fix the calculation of acceleration magnitude average to run at gps u…
2018-06-17 02:36:48 +12:00
mikeller
f129f7913c Added injection for GPS rescue commands. 2018-06-17 02:35:53 +12:00
Andrey Mironov
e70840a17a Marked LED DMA buffer FAST_RAM
Changes not staged for commit:
2018-06-16 17:32:12 +03:00
mikeller
ce4a95f33d Merge branch 'gps_rescue_update_fix' of https://github.com/codecae/betaflight 2018-06-17 02:04:24 +12:00
mikeller
7f107e2d9b Added updating of scheduled command time when motors become idle. 2018-06-17 01:45:10 +12:00
mikeller
d49948f1fd Stop Dshot commands from running when ESCs not disarmed. 2018-06-17 00:37:57 +12:00
AirBreak69
8709ba441d
Tidy 2018-06-16 11:05:20 +02:00
mikeller
11098fba85 Made new includes conditional to F7. 2018-06-16 15:33:13 +12:00
Michael Keller
0a949c35b3
Merge pull request #6108 from mikeller/fix_dshot_commands
Fixed Dshot command check on non-F7.
2018-06-16 15:25:58 +12:00
stronnag
f298a4ad45 change year base for RTC time_t to correct leap processing
Merge pull request #3307 from iNavFlight/jh_fix_rtc_leap_offset
2018-06-16 15:02:44 +12:00
mikeller
b402d85a77 Holy moly, these drivers are a mess. 2018-06-16 14:53:25 +12:00
mikeller
24bbb524f6 Fixed build for F7. 2018-06-16 14:45:09 +12:00
Michael Keller
4466c6f5e3
Merge pull request #6123 from etracer65/beacon_arming_guard_time
Reduce beacon arming guard time to 1.2 seconds
2018-06-16 13:40:02 +12:00
Michael Keller
370897eda3
Merge pull request #6124 from etracer65/osd_stats_reset_dup
Clean up duplicate OSD stat reset
2018-06-16 13:37:46 +12:00