Commit Graph

10970 Commits

Author SHA1 Message Date
etracer65 6b1336a940 Make OSD stats page follow the state of the OSD disable switch mode (#5463)
Previously the OSD stats would always display even if the OSD disable switch mode was active.

Additionally, since the OSD stats page must now be dynamically refreshed rather than only rendered once at disarm, "live" stats like RTC clock and the timer "ON TIME" continue to update and display current information.  All other stats related to the previous flight remain static as of the disarming.
2018-03-21 00:21:08 +13:00
Miroslav Drbal [ApoC] 3ce8223c96 Dynamic filter performance improvement for 16k and 32k gyro loop frequency (#5450)
* * FAST_RAM-ing variables used to compute FFT
* Eradicated global static variables in favour of define
* FFT_WINDOW_SIZE / 2 replaced with FFT_BIN_COUNT
* Limit call count of filters update to necessary minimum on 32k and 16k gyro sampling rate
* Dynamic filter recalculation freq. is at least FFT_SAMPLING_RATE + update time
* Moved global variables used in local scope only to local scope

* * Based on diehertzs review I removed all 0 initializations of global variables

* * Fixed calculation of update frequency for center frequency filter, thx rav-rav for pointing the problem

* * Silenced the warning signed vs unsigned comparison

* * Replaced magick values 3*4 and 12 with preprocessor macro as requested by DieHertz

* * Replaced hardcoded axis count with proper preprocessor macro
2018-03-21 00:17:34 +13:00
conkerkh c182748dbb SDIO rewrite in baremetal, fixes for WORMFC. (#5441)
* SDIO rewrite in baremetal, fixes for WORMFC.

* Fix identation, move LED TIM

* Fix identation
2018-03-21 00:08:34 +13:00
Konstantin Sharlaimov eb70859e4a MSPv2 implementation (#3977)
Some refactoring

Refactor CRC calculations; Unsigned type for size and offset
2018-03-20 14:20:07 +13:00
jflyper e3c258d65f Add inverted option (#4577) 2018-03-20 14:05:55 +13:00
Michael Keller 2ba0f74f5f
Fixed puntuation in documentation. Also, testing [ci skip] (#5474) 2018-03-20 13:17:15 +13:00
Michael Keller 499d619e27
Updated release notes to include information about the AKK / RDQ VTX fix branch. [ci skip] (#5472) 2018-03-20 12:43:57 +13:00
Míguel Ángel Mulero Martínez 44b19f3cdb Fix MSP values of the MAG (#5451)
The MAG only shows positive values in the configurator. This fixes it.
2018-03-16 08:09:13 +13:00
etracer65 0e051bebb2 Simplify CLI case-insensitive by using new strcasestr() (#5449)
Remove string lowercase function from cli.c and use the new strcasestr() added to string_light.c
2018-03-16 07:41:00 +13:00
jflyper 6056ee1740 Uniformly reduce UART buffer sizes to 128 bytes (#5432) 2018-03-15 20:26:13 +13:00
etracer65 abe5b61ff8 IMU attitude estimate accelerated convergence after disarming (#5425)
After disarming and allowing the gyros to settle with no motion, temporarily increase the dcmKpGain to rapidly converge on the correct attitude as indicated by the accelerometer (if present).

Addresses the case of the attitude estimate becoming significantly incorrect after a crash due to high gyro rates.  While the estimate will eventually converge, it does so quite slowly.  The pilot may re-arm before the estimate has corrected leading to instant flips in self-leveling modes.  By speeding up the convergence when disarmed we help reduce this risk.
2018-03-15 20:17:19 +13:00
Michael Keller 509d386f14
Merge pull request #3030 from cleanflight/fix-osd-vtx-power (#5423)
Fix OSD VTX power display.  Only one character for the power is needed.
2018-03-15 02:40:09 +13:00
Michael Keller b0e3da51ea
Merge pull request #3031 from cleanflight/fix-osd-slave-settings (#5424)
CF/BF - Fix OSD slave settings not being saved/reset.
2018-03-15 02:39:26 +13:00
adrianmiriuta c2898a4fd9 review of #4986 (#5422)
* review #4986 v1

* jfliper requested changes

* correction
2018-03-15 02:37:39 +13:00
githubDLG b286c061e6 New target CrazyBeeF3FR (#5420)
* Create target.c

* Add files via upload

* add new target

add new target, CrazyBeeF3FR

* Update target.h

* Update target.h

* Update target.c

* Update target.h

* Update target.c

* Update target.h

* move the 2 jpg to the docs/boards

* add jpg file to docs/boards/

* update picture links of .md file

* try relative reference the pic

* upadte defines form

-#define BEEPER                  PC15
+#define USE_BEEPER
+#define BEEPER_PIN              PC15

#define GYRO
#define USE_GYRO

#define ACC
#define USE_ACC
2018-03-15 02:32:14 +13:00
Michael Keller dd25358a63
Merge pull request #3028 from cleanflight/improve-osd-slave-comms (#5405)
Improve OSD slave timeout/disconnect/reconnect handling.
2018-03-15 02:30:46 +13:00
jflyper 85b922383b MSP_RAW_IMU to convert accADC from float to integer (#5417) 2018-03-15 02:24:39 +13:00
etracer65 f674b01bc8 Change ACC health check to use averaged rather than only the last (#5413)
The function imuIsAccelerometerHealthy() was only using the last ACC sample to determine if the sensor was returning "healthy" data.  This then controlled whether the IMU attitude calculation considered ACC data at all.  There were two problems with this:

1. A single sample from the ACC can be very noisy and exceed the check threshold resulting in a false negative on the health of the sensor.
2. The attitude calculations exclusively used the averaged ACC samples so there was an inconsistency in checking only the last sample to determine if the data was useful.

This change should lead to fewer occurences of the ACC sensor data being ignored in the attitude estimation which should in turn improve the overall estimate.
2018-03-15 02:19:13 +13:00
Petr Ledvina eee15e7ca4 Implement minimalistic strcasestr (#5411)
* Implement minimalistic strcasestr

* fixup! Implement minimalistic strcasestr

* Add _GNU_SOURCE

Enable gcc extensions

* fixup! fixup! Implement minimalistic strcasestr
2018-03-15 02:17:23 +13:00
ileou 31b3959221 Update Building in Ubuntu.md (#5408)
Adjust the ARM_SDK_DIR variable in TOOLS.MK file with the "gcc-arm-none-eabi-xxx" version.
2018-03-15 02:14:33 +13:00
azolyoung 0d3ca7fa6d add a wiki link in the release notes for the update of runcam in BF3.3 (#5403) 2018-03-15 02:08:09 +13:00
etracer65 27bc23c3bb Suppress OSD stats screen if runaway takeoff triggered the disarm (#5402)
and OSD_WARNINGS is visible in the OSD.

The stats screen was preventing the user from knowing that a disarm might be casued by runaway takeoff.  If the warnings element is visible it will have the message "RUNAWAY" but the disarm it triggers caused the stats display to replace the screen.

The change prevents the stats page from displaying if the ARMING_DISABLED_RUNAWAY_TAKEOFF flag is set and the OSD_WARNINGS element is visible.  Otherwise the stats screen is displayed as normal.
2018-03-15 02:04:16 +13:00
Petr Ledvina 141d6ec30a Higher-order gyro filter (#5257)
* Implement nth order Butterworth

Uses biquad sections

* Purge RC+FIR2

* Add butterworth LPS as gyro filter

Replaces RC+FIR

* Make FKF code conditional

* Add USE_FIR_FILTER_DENOISE

Denoise is almost useless anyway ...
2018-03-15 01:45:20 +13:00
etracer65 35f5e5025f Fix OSD "DISARMED" blanking the display when armed (#5384)
Changed the logic so that if currently armed and the previous arming state was disarmed, then blank out the message for just this single iteration. This should allow any elements behind to be properly displayed when armed.
2018-03-13 09:31:52 +13:00
Petr Ledvina 2abcaebd81 Reimplement strtol/strtoul/atoi (#5400)
newlibc version is pulling in (part of) locale support

Adapted from uClibc source code
Addded support for 0b.... prefix for binary numbers
2018-03-13 09:24:15 +13:00
Dominic Clifton 0a2e5a5878 CF/BF - Update DSP_Lib and STM32F7/Drivers/CMSIS to CMSIS 5.3.0. (#5431)
* CF/BF - Update DSP_Lib and STM32F7/Drivers/CMSIS to CMSIS 5.3.0.

CMSIS 5.3.0 - https://github.com/ARM-software/CMSIS_5/releases/tag/5.3.0

* cleanup lib.

* pfft

* relocate driver files from lib/main/CMSIS/CM* to lib/main/STM32xx
folders

* Move DSP folder inside CM5.

It came from the same source as the other files inside CM5

* Remove the CM5 folder and move the files in it one level up.
2018-03-12 09:34:43 +13:00
jflyper 416495e17a Convert BEEPER to USE_ scheme (#5433) 2018-03-11 09:28:08 +13:00
Dominic Clifton aa42a69d2f Revert "Rewritten F7 dshot to LL (draft)" (#5430)
This reverts commit fa3c7e0833.
2018-03-09 23:39:04 +03:00
J Blackman f00575ef76
Merge pull request #5407 from larryho5/betaflight_3_3_0_R3
- fixed TBS BST "Rates" was missing problem
2018-03-09 14:56:27 +11:00
etracer65 f97df6827e Change CLI "get" to be case-insensitive (#5382)
Matches the behavior of the "set" command.
2018-03-09 06:50:31 +13:00
Austin 4d3666b77b Fix for minthrottle when feature 3D and PWM enabled (#5102)
* Fix for minthrottle when feature 3d and pwm enabled

* add parameters for min and max 3d output

* bug fix

* remove new parameters from msp

* remove new parameters again

* fixed indentation
2018-03-09 06:44:17 +13:00
etracer65 18b857de65 Correct nested if else for USE_MAG and USE_GPS (#5414)
If USE_MAG was undefined but USE_GPS was defined, then the "else if" would incorrectly apply to a condition above making the USE_GPS section unlikely to execute.
2018-03-08 09:48:22 +13:00
larryho5 4fc43bfcc0 - fixed TBS BST "Rates" was missing problem 2018-03-07 17:26:59 +08:00
SteveCEvans 0430fcb67d Add ledstrip_grb_rgb setting (GRB or RGB) to handle WS2811 or WS2812 … (#5255)
* Add ledstrip_grb_rgb setting (GRB or RGB) to handle WS2811 or WS2812 LED drivers

* Rename setting lookup table to lookupLedStripPackingOrder

* Fix call to ws2811UpdateStrip

* Fix unit test

* Use ledStripFormatRGB_e enumeration for RGB packing format

* Fix unit test

* Whoops. Make ledStripFormatRGB_e match lookupLedStripFormatRGB

* Applied review feedback

* Add documentation of ledstrip_grb_rgb
2018-03-06 09:39:14 +13:00
Hector Hind 94f06e1e05 Fix FPVM_BETAFLIGHTF7 & OMNIBUSF7V2 Gyro/Acc Alignment. (#5375) 2018-03-06 08:30:02 +13:00
Andrey Mironov e49dfb1634 Added F7 overclock (#5372) 2018-03-06 08:28:29 +13:00
codecae d004cf5fb7 Improved VTX update scheduling to reduce update delays (#5340) 2018-03-06 08:27:50 +13:00
Andrey Mironov a24daa78d0 Fixed possibility of getting stuck in F7 bootloader mode (#5370) 2018-03-04 22:45:40 +13:00
Steffen Windoffer 2f8e59f8fc fix rate accel limit ranges (#5367) 2018-03-04 11:49:53 +13:00
Andrey Mironov 8319c6c6d1 Unified enabling of EXTI for gyro on F7 with other targets (#5364) 2018-03-04 11:49:36 +13:00
Michael Keller f73ada0687
Enabled Dshot burst by default for DALRCF405. (#5362) 2018-03-04 11:49:15 +13:00
etracer65 3b20e8279b Add accelerometer calibration values to the CLI - also change mag calib representation (#5354)
Allows the accelerometer calibration to be exported in a dump or diff and restored after upgrading.

The accelerometer calibration is specific to the frame and orientation in which the flight controller is installed.  The users should have a way to restore a correct setting during upgrades without having to recalibrate after every flash.  Replicates the way the magnetometer calibration is exported.

Added acc_calibration as an array type to the CLI.  For consistency changed magnetometer representation from magzero_X, magzero_Y, magzero_Z to be a single array mag_calibration.
2018-03-04 11:48:51 +13:00
Andrey Mironov 36c3fdb576 Simplified PID rate counter code (#5350) 2018-03-04 11:48:22 +13:00
Charles K Stevenson 33ee5efa17 Don't close blackbox log on disarm if mode is ALWAYS_ON (#5341) 2018-03-04 11:48:09 +13:00
Dan Nixon 66dac7a2e3 Positionable OSD crosshairs and AHI (#5326)
* Make Artificial horizon and crosshairs positionable

* Remove dependency on AHI for AHI sidebars

* Use the old fixed positions as defaults for some OSD elements

Namely:
- crosshairs
- artificial horizon
- artificial horizon sidebars
2018-03-04 11:46:39 +13:00
adrianmiriuta 3855d254b0 move from CALIBRATING_GYRO_CYCLES to CALIBRATING_GYRO_TIME ... absolu… (#5320)
* move from CALIBRATING_GYRO_CYCLES to CALIBRATING_GYRO_TIME ... absolute calibration time

* DieHertz requested changes

* cleanup indentation
2018-03-04 11:46:15 +13:00
Míguel Ángel Mulero Martínez 73eb5d396e Add compass QMC5883L driver (#5309) 2018-03-04 11:45:54 +13:00
Michael Keller 6560e96e98
Fixed inconsistency in OSD code. (#5223) 2018-03-04 11:43:46 +13:00
Míguel Ángel Mulero Martínez 37fa25606f Simplify HMC5883 Compass (#5289)
Remove the mag gain calculation. After some tests the maximun difference
is 6 degrees, so is not important.
2018-03-04 11:43:24 +13:00
etracer65 f96f9672d1 Revise ledstrip optimization to use overlay disable bitmask (#5270)
Clean up the logic to use a bitmask indicating which overlays are disabled rather than an array to indicate which are enabled.

Performance remains unchanged from the previous optimization but a few bytes of RAM are saved and the code is cleaner.
2018-03-04 11:43:07 +13:00