Commit Graph

13239 Commits

Author SHA1 Message Date
Michael Keller 4bff464b92
Merge pull request #7467 from mikeller/reorganise_interfaces
Reorganised interfaces, putting them where they are used.
2019-01-28 00:14:14 +13:00
mikeller 38e1ce04df Reorganised interfaces, putting them where they are used. 2019-01-27 13:38:22 +13:00
Michael Keller fe83d052da
Merge pull request #7465 from etracer65/fix_blackbox_throttle_value
Fix blackbox rcCommand[THROTTLE] logging
2019-01-27 12:05:02 +13:00
Michael Keller 06f89603bc
Merge pull request #7463 from etracer65/mixer_throttle_fix
Fix mixer throttle calculation
2019-01-27 11:38:15 +13:00
Michael Keller 90d801c5d8
Merge pull request #7457 from SteveCEvans/cpu_load
Modify CPU load calculations to not assume constant task duration
2019-01-27 11:37:33 +13:00
Bruce Luckcuck 55dc91d6f7 Fix blackbox rcCommand[THROTTLE] logging
The blackbox "P" frame is incorrectly offsetting the rcCommand[THROTTLE] value by `min_throttle`. The rcCommand value already ranges from 1000-2000 and is an input so it shouldn't be offset by a motor output value. Also this is clearly incorrect in the case of DSHOT which doesn't use `min_throttle`.
2019-01-26 16:55:28 -05:00
Michael Keller 9e7e263abb
Merge pull request #7450 from mikeller/improve_osd_stick_overlay_height
Change OSD stick overlays to be more square.
2019-01-26 22:11:36 +13:00
SteveCEvans faf33d1130 Use averageDeltaTime when calculating CPU load 2019-01-26 03:34:35 +00:00
Michael Keller 78406157c2
Merge pull request #7458 from etracer65/blackbox_add_setpoint
Add setpoint to blackbox logging
2019-01-26 16:26:09 +13:00
Michael Keller c25901883c
Merge pull request #7460 from etracer65/fix_ledstrip_battery_rssi_color_range
Fix color range for ledstrip battery and rssi layers
2019-01-26 16:16:22 +13:00
Bruce Luckcuck 8f7cb7184e Fix mixer throttle calculation
The calculation used to transform the rcCommand[THROTTLE] value to a throttle value used in the mixer was incorrectly applying the `min_check` range a second time. This leads to the mixer throttle value scaling incorrectly and adds an additional deadzone at the low range that basically doubles the `min_check` range.
2019-01-25 16:51:30 -05:00
Bruce Luckcuck 99685c21c6 Add setpoint to blackbox logging
Currently only rcCommand values are included in the log data and the configurator calculates the actual setpoint values based on rates values added to the blackbox header. The problem with this is that the rates information is only written at arming so if the rates change during the log (rateprofile change, in-flight adjustments, etc.) then the calculated setpoints will be incorrect. There's no way to tell from the log that this happened. This often causes confusion because it will suddenly make it appear in the log that the PID controller is not acheiving the requested rates when it's just a presentation error. Also the rates will be incorrectly calculated when the user selects Raceflight style rates as the rates type is not supplied in the log header (and the viewer doesn't have the forumla for them anyway).

This change adds the actual setpoint values for each axis as used by the PID controller, removing the necessity for the viewer to perform any calculations. In addition to showing any rate changes, it will also show any cases where other flight features have modified the setpoints from the user's input. These were invisible previously (examples include level modes, Acro Trainer, GPS Rescue, yaw spin recovery, etc.).

Also the throttle value used in the mixer is included in the throttle axis. This allow visualization of things that affect the commanded throttle like throttle boost, throttle limit, GPS Rescue, angle level strength, etc.
2019-01-25 09:01:55 -05:00
Bruce Luckcuck f6dc0ce516 Fix color range for ledstrip battery and rssi layers
The range was underflowing the calculated hue value causing it to loop back to other colors. For example when battery ranged from below 20% the color would shift from red (the correct color for minimum battery) to shades of magenta. RSSI had the same problem.

Now the logic reserves the base color (red in these cases) for the minimum 20% of the range. From 20-100% the color will scale from red through to green.
2019-01-24 18:50:53 -05:00
mikeller d8ade76fbe Simplify 'PWM_RANGE_MAX' handling. 2019-01-24 17:23:11 +13:00
mikeller 4503dffab0 Changed to smooth transitions everywhere. 2019-01-24 02:16:03 +13:00
mikeller c74e1f0df1 Change OSD stick overlays to be more square. 2019-01-24 01:51:07 +13:00
Michael Keller a4ce8b5600
Merge pull request #7447 from mikeller/make_battery_filtering_configurable
Make battery voltage / current filter cutoffs configurable.
2019-01-24 01:45:56 +13:00
Michael Keller 24bcf1ed30
Merge pull request #7445 from mikeller/remove_osd_disarming_flag
Remove the OSD_MENU arming disabled flag, as it is redundant to the CMS_MENU flag.
2019-01-24 01:45:34 +13:00
Michael Keller 3c6d0a1008
Merge pull request #7444 from etracer65/fix_osd_32bit_warnings
Fix OSD warnings settings to use UINT32 type
2019-01-24 01:45:14 +13:00
Michael Keller 6272f45851
Merge pull request #7161 from TonyBlit/gps_total_distance_stats_pos
Reordered Max Altitude and Total Distance in stats screen
2019-01-24 01:10:25 +13:00
Michael Keller 2da629b784
Merge pull request #7449 from mikeller/fix_osd_stick_position_scaling
Fixed position calculation for OSD stick position elements.
2019-01-24 00:56:13 +13:00
Michael Keller d824a1e35a
Merge pull request #7451 from etracer65/gyro_filter_debug_parm_fix
Fix gyro_filter_debug_axis settings definition
2019-01-23 12:58:30 +13:00
Tony Cabello 5c32240522 Updated comment regarding stats display order 2019-01-22 17:08:55 +01:00
Tony Cabello a0604dd1a5 Reordered Max Altitude and Total Distance in stats screen 2019-01-22 17:08:55 +01:00
Bruce Luckcuck 33202b33b0 Fix gyro_filter_debug_axis settings definition
Setting was incorrectly placed in the PROVILE_VALUE but should be in the MASTER_VALUE section.
2019-01-22 09:44:55 -05:00
mikeller 3e37d75645 Fixed position calculation for OSD stick position elements. 2019-01-23 00:49:12 +13:00
mikeller 3e1e467079 Make battery voltage / current filter cutoffs configurable. 2019-01-22 22:45:59 +13:00
mikeller b1d989ac41 Remove the OSD_MENU arming disabled flag, as it is redundant to the CMS_MENU flag. 2019-01-22 18:21:31 +13:00
Michael Keller c39ea81b6a
Merge pull request #7427 from fujin/dyn-lpf-debug-pitch
Extend gyro filter implementation debugging for pitch and yaw axis
2019-01-22 18:11:53 +13:00
Michael Keller f097df6fbd
Merge pull request #7438 from mikeller/fix_ledstrip_unit_tests
Fixed unit tests using 'ledstrip.c'.
2019-01-22 18:10:56 +13:00
Michael Keller 46c4da05a1
Merge pull request #7443 from etracer65/cms_multiple_entry_wedging
Fix array overflow/wedge after multiple entries into CMS
2019-01-22 18:10:37 +13:00
Michael Keller eb2e2d2eb6
Merge pull request #7439 from jflyper/bfdev-stdperiph-sdcard-quick-fix-after-shard-SPI
[SDCARD] Quick fix: Discard excess/bogus data in DR at prologue of spiTransferByte
2019-01-22 18:08:18 +13:00
Michael Keller 72383f3064
Merge pull request #7441 from Scavanger/CMS-Fullscreen
Clean fullscreen for HoTT-Textmode (and other displayports)
2019-01-22 17:50:28 +13:00
Michael Keller e020bcca9e
Merge pull request #7442 from etracer65/ledstrip_excessive_cpuload
Refactor ledstrip profiles to fix excessive cpu load
2019-01-22 17:31:56 +13:00
Bruce Luckcuck 1c6f801030 Fix OSD warnings settings to use UINT32 type
Missed in #7423
2019-01-21 09:07:42 -05:00
AJ Christensen 5bcf35c7af Extend gyro filter implementation debugging for pitch and yaw axis.
* Introduce CLI parameter gyro_filter_debug_axis which defaults to 'ROLL',
  the previous behavior. When set to either PITCH, or YAW, the debug logging
  implementation in the gyro filtering will use that axis instead.
2019-01-21 22:22:37 +13:00
Bruce Luckcuck a0eb2c8fa7 Fix array overflow/wedge after multiple entries into CMS
The menu stack counter was not being reset when CMS was initially entered and multiple entries can cause an array overflow/memory corruption and wedge.

Previosuly the problem was accidentally prevented because the user was required to "back out" through the menus to exit which decremented the array index. However with the addition of the popup exit/save menu it became possible to exit without traversing back through the menu structure and this bug was exposed.
2019-01-20 22:40:06 -05:00
Bruce Luckcuck 744d9eb7a3 Refactor ledstrip profiles to fix excessive cpu load
Previous logic bypassed optimizations and updated the ws2811 on every task execution - leading to and average of 92us task execution time. Restored the previous optimizations and additionally optimized the new "RACE" and "BEACON" modes so that they only update the led's when there's an actual state change. Task time for these modes is now in the 2-4us range for F405. For the normal "STATUS" profile the performance has been restored to previous optimized levels and typical configurations will generally have task times in the 8-14us range.

Revised the LEDLOW disable mode to function all the time and disable the ledstrip completely. Previously if visual beeper was enabled that would override the disable and the ledstrip would display whatever would be otherwise displayed but only during the duration of the beep. The resulted to a very inconsistent behavior depending on the user's settings.

Added visual beeper support to the new "RACE" and "BEACON" profile modes.

General cleanup and refactoring.
2019-01-20 19:21:47 -05:00
Michael Keller 8e2cba97da
Merge pull request #7431 from DieHertz/f4-uart-fix-incorrect-enum
Fixed incorrect enum value being used for GetITStatus on F4
2019-01-21 11:35:59 +13:00
Michael Keller 22a820a6ff
Merge pull request #7436 from etracer65/fix_ledstrip_defines
Fix LEDSTRIP defines to prevent compilation errors
2019-01-21 11:35:12 +13:00
Michael Keller aaad98ecc3
Merge pull request #7435 from etracer65/use_fabsf_for_floats
Use fabsf() instead of ABS() for floats
2019-01-21 11:34:47 +13:00
Michael Keller 9e9a46ef0d
Merge pull request #7433 from etracer65/cli_expose_feature_cut_level
Add FEATURE_CUT_LEVEL to the cli version command output
2019-01-21 11:34:22 +13:00
Michael Keller f72bc436f8
Merge pull request #7432 from etracer65/zero_throttle_anti_windup_in_pidloop
Move anti-windup iterm reset from rx loop to pid loop
2019-01-21 11:33:58 +13:00
Michael Keller 8740e484f7
Merge pull request #7393 from kmitchel/dyn_filt_init
Allow dyn lpf to initialize if static lpf config is 0.
2019-01-21 11:32:20 +13:00
jflyper f96508ceec Define and use DISCARD 2019-01-21 05:50:01 +09:00
Michael Keller f8934c357b
Merge pull request #7429 from mikeller/migrate_f3_to_feature_cut_levels
Migrate the remaining F3 targets to feature cut levels.
2019-01-21 09:10:15 +13:00
Scavanger dd30009925 "Fullscreen" mode for displayports. 2019-01-20 20:46:23 +01:00
Scavanger c7b2260645
Merge pull request #9 from betaflight/master
Sync to Betaflight/Betaflight
2019-01-20 19:42:38 +01:00
jflyper 35ade68bb3 Discard excess/bogus data in DR 2019-01-21 01:02:10 +09:00
mikeller 18496fe745 Fixed unit tests using 'ledstrip.c'. 2019-01-21 01:01:05 +13:00