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

13278 commits

Author SHA1 Message Date
Bruce Luckcuck
140471adc6 Speed up gyro device detection; fix MPU6000 initialization
The detection logic in the MPU6000 and ICM20689 drivers had unnecessary "retry" logic that would try to read the `WHOAMI` register 5 times for MPU6000 and 20(!) times for ICM20689 - with a 150ms delay for each iteration. So the problem is that all the enabled drivers need to be probed in order so on a board that had a LSM6DSO for example (or any sensor further down the list) it would introduce about 4 seconds of initialization delay (dual gyro board would take 8 seconds!). Revised logic completes in about 0.4 seconds in the worst case.

After removing the unnecessary retry/repeat logic for the MPU6000 an initialization problem became visible. The driver was not following the datasheet guidelines and clearing the signal path after resetting the device. This lead to detection issues on warm reboots that were accidentally masked by the excessive delays with the retry logic.

The improvement in boot speed depends on the device's position in the list. So any device with a MPU6000 won't see any difference. All other devices will boot about 1 second faster (like ICM20602, ICM20689). Devices after the ICM20689 (like BMI160/270, LSM6DSO) will boot about 4 seconds faster.
2020-08-15 18:24:10 -04:00
Michael Keller
7b255c866e
Merge pull request #9946 from limonspb/motor_mapping
Motor output reordering feature for CLI and MSP (Firmware part)
2020-08-16 09:47:51 +12:00
Bruce Luckcuck
cd4d756790 Fix underflow in channel based RSSI calculations for out of range values
If the RSSI channel PWM values were outside the expected 1000-2000 range, the `scaleRange()` function does not work properly. In particular if the value was below the minimum the result would be negative. Then this would cause an underflow when applied as a `uint16` to `setRssiDirect()`. This fix constrains the input range from 1000 to 2000.
2020-08-14 18:59:47 -04:00
Michael Keller
968e72fae8
Merge pull request #10082 from SJChannel/tfp_sprintf-format-mismatch
Fix a format/argument mismatch in a call to tfp_sprintf()
2020-08-13 21:09:50 +12:00
Michael Keller
ea48e80b8e
Merge pull request #10092 from etracer65/cli_range_check_error_formatting
Fix CLI range check error message formatting
2020-08-13 20:46:38 +12:00
Bruce Luckcuck
ed35b1d773 Fix CLI range check error message formatting 2020-08-11 18:27:11 -04:00
mikeller
77eb4f2172 Fixed bug in FrSky X SPI code affecting RX range. 2020-08-12 00:32:17 +12:00
Nicola De Pasquale
d0fe84528a using same curve of dyn dterm lpf 2020-08-08 15:36:28 +02:00
Nicola De Pasquale
988024ee4e updated dynThrottle curve 2020-08-07 15:28:36 +02:00
John Polstra
72f6934202 Fix a format/argument mismatch in a call to tfp_sprintf(). The call
contained an extra argument for which there was no corresponding format
specification.
2020-08-06 10:51:34 -07:00
mikeller
dad63b6d14 Improvements from @ledvinap. 2020-08-06 05:59:23 +12:00
mikeller
d8e3aa7e2d Fixed lockup when entering CMS. 2020-08-06 05:59:23 +12:00
Michael Keller
b1af9befe5
Merge pull request #10071 from mikeller/add_board_info_to_cms
Added board information to CMS 'firmware' menu.
2020-08-06 05:57:02 +12:00
Asizon
8231c024de Added vbat_sag_compensation to Blackbox header 2020-08-05 12:08:51 +02:00
haslinghuis
acf87e972f Fixed crsf-cms (removed optimization for now) 2020-08-03 19:43:30 +02:00
mikeller
7116044c6c Added board information to CMS 'firmware' menu. 2020-08-03 02:05:24 +12:00
dev-fred
ed19e91131
// Added in API version 1.44
comment over the change done
2020-07-30 11:43:59 +02:00
dev-fred
2623560185
add comment: // Added in API version 1.44 2020-07-30 11:18:31 +02:00
dev-fred
a09210dcd4
Update msp.c
Add hdop in MSP_RAW_GPS 
https://github.com/betaflight/betaflight/issues/10063
2020-07-29 22:44:27 +02:00
Michael Keller
a752d3d218
Merge pull request #10057 from etracer65/gps_rescue_fixed_wing_disable
Disable GPS RESCUE if mixer is fixed-wing type
2020-07-30 00:33:44 +12:00
Michael Keller
883529883a
Merge pull request #10023 from mikeller/add_debug_build_to_cicd
Added STM32F4DISCOVERY_DEBUG target and added it to pre-push.
2020-07-30 00:26:34 +12:00
limonspb
464919c416 Motor output reordering for CLI and MSP
Fixed some code formatting

+fixReorderingArray() for EEPROM load/save and renamings

fix brace new line

moving MOTOR_OUTPUT_REORDERING to MSP2 betaflight specific

validateAndfixConfig now resets reordering motor array to default in case it is invalid
2020-07-27 20:10:37 -05:00
Bruce Luckcuck
2317b5fe8d Disable GPS RESCUE if mixer is fixed-wing type
GPS Rescue flight control logic only knows how to fly multirotors and engaging GPS Rescue on a fixed-wing craft would result in an immediate loss of control and crash. For example, when GPS Rescue is engaged it attempts to yaw to the home direction heading and this won't work on fixed wing (particularly the flying wing mixer with no rudder). Next it tries to attain the target altitude exclusively with throttle control - not how altitude is controlled with a fix-wing aircraft.

Also the GPS Rescue no-fix arming prevention logic shouldn't be applied.
2020-07-27 18:49:34 -04:00
Birk Tjelmeland
aa5066e443 Add MSP override mode
The MSP override mode allows for use of MSP togehter with
another RX feature like SBUS. When enabling the MSP override
mode all channels from the `msp_override_channels` bitmask
will be overwritten by data comming from MSP instead of the
main RX.
2020-07-27 13:01:38 +02:00
Michael Keller
94cd650472
Merge pull request #9981 from mikeller/fix_max7456_delay_problems
Fixed the MAX7456 loop time problems introduced by #9948.
2020-07-26 15:31:16 +12:00
Michael Keller
9ae9b32aad
Merge pull request #9937 from mikeller/refactor_dshot_enabled_checks
Refactored Dshot enabled checks.
2020-07-26 15:30:40 +12:00
Michael Keller
0e28a646fd
Merge pull request #9863 from mikeller/cleanup_crsf_tests
Cleaned up separation of CRSF test code.
2020-07-26 15:30:10 +12:00
Michael Keller
0e4a54fc81
Merge pull request #9638 from pgreenland/vtx_irc_tramp_improvements 2020-07-26 12:57:32 +12:00
mikeller
c128f33a85 Added STM32F4DISCOVERY_DEBUG target and added it to pre-push. 2020-07-22 02:18:25 +12:00
Michael Keller
899cae197c
Merge pull request #9998 from mikeller/fix_stack_check
Fixed stack size monitoring.
2020-07-22 02:12:58 +12:00
Michael Keller
3315b416b6
Merge pull request #10000 from mikeller/added_bus_device_registration
Added registration for bus devices.
2020-07-22 02:12:18 +12:00
Michael Keller
4e922f9ea4
Merge pull request #10011 from mikeller/add_configurable_stats_flight_time
Added configurable minimum arming time for a flight to be counted in flight statistics.
2020-07-22 02:11:59 +12:00
Phil Greenland
367cc3a513 Fix issue entering pitmode.
Make as many variables as possible private.
Re-work settings application into state machine.
Remove legacy interfaces.
Update OSD interface following implementation rework.
Review updates.
2020-07-20 21:57:03 +01:00
Michael Keller
6a92bf39b4
Merge pull request #9982 from mikeller/fix_bmp280_detection
Fixed detection of BMP280 / BME280.
2020-07-20 08:34:17 +12:00
Michael Keller
4e2cef05d5
Merge pull request #10022 from mikeller/fix_debug_builds
Fixed DEBUG builds.
2020-07-19 19:39:12 +12:00
Mimoja
43a7f93723
Fix build for statistics-disabled DSHOT telemetry
The USE_DSHOT_TELEMETRY_STATS define was is gating a closing bracket '}',
so that the scopes are breaking in case telemetry stats are not enabled.

This commit fixes this behaviour by moving the closing bracket out of the
ifdef.


Signed-off-by: Mimoja <git@mimoja.de>
2020-07-19 00:18:28 +02:00
mikeller
b42d1db0e8 Fixed DEBUG builds. 2020-07-17 01:57:08 +12:00
mikeller
ab3511c420 Added configurable minimum arming time for a flight to be counted in flight statistics. 2020-07-12 15:35:55 +12:00
Michael Keller
f8f01c9fa3
Merge pull request #10006 from etracer65/crash_flip_first_arming 2020-07-12 14:12:31 +12:00
Michael Keller
8916630ad6
Merge pull request #10005 from etracer65/crashflip_ignore_gps_arming_disabled
Ignore GPS arming disabled when arming in crash flip mode
2020-07-12 14:10:18 +12:00
Michael Keller
99f9a34462
Merge pull request #9999 from mikeller/fix_rpm_filter
Fixed missing RPM filter update.
2020-07-11 23:46:49 +12:00
Bruce Luckcuck
bf232e57d9 Prevent crash flip from setting WAS_EVER_ARMED arming flag
Previously if the first "arming" was in crash-flip mode then the various features that rely on "first arming" logic would be defeated. While arming in crash-flip mode is technically "arming", it shouldn't disable features that rely on the first "real" arming. For example, vtx low-power disarm, GPS fix arming disabled, `BATT < FULL` warning, etc.
2020-07-10 09:20:47 -04:00
Bruce Luckcuck
a545e80894 Ignore GPS arming disabled when arming in crash flip mode
While craft is upside down the GPS receiver may not be able to maintain a fix. As a result the `ARMING_DISABLED_GPS` reason could prevent arming in crash-flip mode preventing the user from flipping back over.
2020-07-10 09:01:22 -04:00
Michael Keller
7bb2c26c43
Merge pull request #9990 from ctzsnooze/refactor-Thrust-Linear-update 2020-07-09 15:34:36 +12:00
mikeller
386be8d742 Added registration for bus devices. 2020-07-08 21:34:31 +12:00
mikeller
99c3cc9b0b Fixed missing RPM filter update. 2020-07-08 21:23:18 +12:00
mikeller
81abf873da Fixed stack size monitoring. 2020-07-08 20:08:39 +12:00
ctzsnooze
1fbf0ba816 Further refactoring
Thanks, Mike!
2020-07-07 22:59:58 +10:00
Michael Keller
5d591e3162
Merge pull request #9985 from mikeller/fix_osd_feature_disabling
Fixed disabling of OSD feature when OSD is disabled.
2020-07-08 00:57:26 +12:00
ctzsnooze
9a65b766a2 refactor Thrust Linear to initialise throttleCompensateAmount in pid_init.c
Maybe this could avoid recaculating throttleCompensateAmount every PID loop?
2020-07-07 15:11:17 +10:00