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.
* * 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
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.
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.
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.
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.
* 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.
* 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
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.
* 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
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.
* 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
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.