Commit Graph

10632 Commits

Author SHA1 Message Date
Michael Keller d4f71bba63
Merge pull request #7534 from etracer65/optimize_rc_modes_processing
Optimize rc modes activation conditions processing
2019-02-06 15:38:11 +13:00
mikeller 9339f2ad21 Removed unneeded source files from 'target.mk'. 2019-02-06 12:58:13 +13:00
mikeller 37d0d402c8 Added single colour mode to WS2811 driver for RAM savings. 2019-02-06 12:04:34 +13:00
Michael Keller 7393d5fdac
Merge pull request #7529 from jflyper/bfdev-stronger-USE_ACC
[REFACTOR] More application of USE_ACC
2019-02-06 10:08:49 +13:00
Michael Keller d32ee28373
Merge pull request #7528 from jflyper/bfdev-refactor-persistent-object-name
[PERSISTENT OBJECT] Refactor / rename boot loader request object
2019-02-06 10:08:12 +13:00
Bruce Luckcuck 42af168854 Optimize rc modes activation conditions processing
Analyze the rc modes activation conditions and only process configured entries. Previously the entire possible list was processed even though typically only a handful are configured.

Reduces the RX task processing time by about 25% (~44us to ~33us) with an average setup of 3 modes configured (F405, SBUS). Processing time savings will diminish as the user configures more modes. But typically far fewer than the maximum of 20 will be configured.
2019-02-05 16:05:16 -05:00
Bruce Luckcuck f1e3c60dd9 Optimize MAX7456 driver invert and brightness functions
Eliminate unnecessary register writes by keeping previous state information and only writing the registers when the related settings actually change. Saves 17 register writes per `clearScreen()` call.

Also fixed character invert flag handling. Previously changes to the flag would only affect subsequently drawn characters and previous characters would remain unchanged. So for static OSD elements it produced an inconsistent state. Now all characters immediately reflect the current state of the invert flag.

Results in appoximately a 33% reduction in processing time for the OSD task at default settings (~31us reduced to ~21us on F405).
2019-02-05 12:02:34 -05:00
warhog 442b2feb60 move definition of SPEKTRUM_RSSI_LINK_LOSS_FADES to spektrum_rssi.c because it is not needed elsewhere 2019-02-05 10:29:39 +01:00
warhog 33c5e465a6 improve rssi handling on link loss for spektrum srxl 2019-02-05 10:05:14 +01:00
mikeller 5006387c59 Dang, forgot to push the changeset that reverts the test code. 2019-02-05 20:13:05 +13:00
brettcollis2212 db7b97d882
Change resource PINIO 1 from PB8 to B08
This was wrong pin description for 4.0 resource mapping
2019-02-04 22:45:39 +00:00
mikeller e121e1e92b Separated LED_STRIP parameter groups, separated out LED_STRIP status mode code. 2019-02-05 08:39:42 +13:00
jflyper 869e25d385 More USE_ACC application 2019-02-04 21:59:41 +09:00
jflyper cc0e689bb5 Add USE_ACC conditionals 2019-02-04 20:37:43 +09:00
jflyper 85cd4df2ea Refactor / rename PERSISTENT_OBJECT_BOOTLOADER_REQUEST to PERSISTENT_OBJECT_RESET_REASON 2019-02-04 19:06:19 +09:00
Michael Keller af84f9e99d
Merge pull request #7520 from jflyper/bfdev-srxl-datetime_t-should-inside-USE_RTC_TIME
[TELEMETRY SRXL] dateTime_t should be declared inside USE_RTC_TIME
2019-02-04 19:29:12 +13:00
Michael Keller 7411e10482
Merge pull request #7519 from mikeller/fix_cli_profile_setting
Fixed range detection for setting of PID / rate profiles in CLI.
2019-02-04 19:28:45 +13:00
Michael Keller 0752b62206
Merge pull request #7521 from mikeller/make_tests_fast_again
Separate out target specific tests into the 'test-all' goal.
2019-02-04 17:24:23 +13:00
mikeller 299d96fdc7 Added battery cell count based automatic PID profile switching. 2019-02-04 13:15:43 +13:00
Bruce Luckcuck 9d7af42e9f Add CMS entry for motor_output_limit
Will assist tuning while at the field. Added under PROFILE -> MISC PP.
2019-02-04 10:55:24 +13:00
Michael Keller e1b84ad204
Merge pull request #7515 from mikeller/fix_driver_layer_upreference
Fixed up reference in the driver layer.
2019-02-04 10:04:15 +13:00
Michael Keller 1a1464094f
Merge pull request #7511 from etracer65/reduce_airmode_activation_percent
Reduce airmode activation percent to 25
2019-02-04 08:00:02 +13:00
Michael Keller 398fd93b1d
Merge pull request #7513 from etracer65/airmode_enabled_by_default
Enable FEATURE_AIRMODE by default
2019-02-04 07:59:49 +13:00
Michael Keller 42ecc7e7c1
Merge pull request #7509 from mikeller/add_uint16_cli_support
Added support for full range uint16_t parameters in CLI.
2019-02-04 07:58:49 +13:00
Michael Keller 5094061567
Merge pull request #7518 from mikeller/feature_cuts
Removed features from AIORACERF3 and IMPULSERCF3 to make it fit flash.
2019-02-03 17:40:35 +13:00
mikeller 344bddf882 Make 'test-representative' work as expected. 2019-02-03 17:38:55 +13:00
mikeller b329f0d70b Separate out target specific tests into the 'test-all' goal. 2019-02-03 15:54:26 +13:00
jflyper bc2e13e021 dateTime_t should be declared inside USE_RTC_TIME 2019-02-03 11:47:36 +09:00
Michael Keller 493d0d0d8f
Merge pull request #7500 from mikeller/improve_crsf_flight_mode_reporting
Improved CRSF flight mode reporting.
2019-02-03 14:50:09 +13:00
mikeller f0f6f46eeb Fixed range detection for setting of PID / rate profiles in CLI. 2019-02-03 14:42:26 +13:00
mikeller 5b56086e11 Removed features from AIORACERF3 and IMPULSERCF3 to make it fit flash. 2019-02-03 14:31:38 +13:00
Michael Keller 5a1c0769e7
Merge pull request #7503 from etracer65/osd_profile_msp
Add MSP support for OSD profiles and OSD stick overlay
2019-02-03 14:05:32 +13:00
mikeller f5a979c737 Added support for full range uint16_t parameters in CLI. 2019-02-03 11:14:07 +13:00
mikeller 210e90249e Fixed up reference in the driver layer. 2019-02-03 11:04:34 +13:00
Michael Keller d833a51317
Merge pull request #7506 from etracer65/gyro_align_msp_compatibility
Update MSP gyro alignment support and preserve backwards compatibility
2019-02-03 10:42:26 +13:00
Bruce Luckcuck 3db58c51bd Enable FEATURE_AIRMODE by default
It's long past time for this! The vast majority of airmode related support issues we encounter involve people forgetting to enable airmode.

For the tiny percentage that still (mistakenly) believe they don't want to enable airmode, they can disable if they desire.
2019-02-02 11:41:56 -05:00
Bruce Luckcuck 9fd82882e0 Reduce airmode activation percent to 25
In recognition of a more appropriate value based on the average hardware in use today.
2019-02-02 11:20:15 -05:00
Bruce Luckcuck 5c05e945df Add MSP support for OSD profiles and OSD stick overlay
Adds available profiles and currently selected OSD profile. If the `USE_OSD_PROFILES` feature is not available then the profile count and selected profile will be 1.

Adds OSD stick overlay radio mode. A zero value indicates OSD stick overlay is not available.
2019-02-02 09:40:48 -05:00
mikeller b296c5f6aa Fixed flash overflow on IMPULSERCF3, RMDO, and SPRACINGF3. 2019-02-02 23:00:41 +13:00
Michael Keller fd297b6b2c
Merge pull request #6924 from smoriarty21/pilot_name
Pilot Name
2019-02-02 21:20:08 +13:00
mikeller 4d8bf61d94 Improved CRSF flight mode reporting. 2019-02-02 21:15:32 +13:00
Bruce Luckcuck d66533fb5a Update MSP gyro alignment support and preserve backwards compatibility
Preserve gyro/acc alignment backwards compatibility for configurator versions unaware of the revised sensor alignment scheme.

Update MSP to add support for:
1. Flag to indicate whether `USE_MULTI_GYRO` is available
2. `gyro_to_use`
3. `gyro_1_sensor_align` and `gyro_2_sensor_align`.
2019-02-01 21:52:47 -05:00
Michael Keller b3b2517fab
Merge pull request #7489 from etracer65/ledstrip_beacon_improvements
Enhance ledstrip BEACON profile
2019-02-02 15:27:15 +13:00
Michael Keller d208cd0f8f
Merge pull request #7482 from mikeller/add_motor_output_limit
Added motor output limiting per profile.
2019-02-02 15:25:54 +13:00
Michael Keller 85ac92f42a
Merge pull request #7502 from mikeller/remove_deprecated_align
Removed leftover references to 'gyro_align', 'acc_align'.
2019-02-02 15:17:08 +13:00
mikeller f7134580f8 Fixed missing conditional, incremented parameter group version, added
config reset.
2019-02-01 07:53:09 +13:00
mikeller 21edada68b Removed leftover references to 'gyro_align', 'acc_align'. 2019-02-01 01:50:40 +13:00
Sean M 09fce7f1fa Adding display name to OSD and CLI 2019-02-01 01:11:40 +13:00
mikeller 183275beb4 Fixed flash overflow on CHEBUZZF3, FURYF3, FURYF3OSD, LUX_RACE, RACEBASE, SIRINFPV, and SPRACINGF3MINI. 2019-02-01 00:58:03 +13:00
Michael Keller ae194f2eb3
Merge pull request #7491 from etracer65/ledstrip_profile_msp
Update ledstrip MSP to add support for advanced flag and profile
2019-01-30 10:36:45 +13:00
Bruce Luckcuck 12a29eb7a9 Enhance ledstrip BEACON profile
Added features to the BEACON ledstrip profile:

Added a `ledstrip_beacon_color` to allow color selection rather than forcing to white.

Added `ledstrip_beacon_period_ms` to configure the blink period in milliseconds. Smaller time periods mean faster blinking.

Added `ledstrip_beacon_percent` to configure the "ON" time duty cycle. User can set to 100% to have the beacon display a solid color. 0% can be used to turn the becaon completely off.

Added `ledstrip_beacon_armed_only` to allow the user to configure whether the beacon is only on when armed.

Added `ledstrip_visual_beeper_color` to allow configuration of the visual beeper color.

Added the new parameters to the CMS menu.

Simplified the code and combined the RACE and BEACON profile processing.

Added support for auutomatically displaying a beacon that indicates RX_SET or failsafe regardless of the other RACE or BEACON settings.
2019-01-29 15:26:13 -05:00
Bruce Luckcuck d8c54460a9 Update ledstrip MSP to add support for advanced flag and profile
Added a flag indicating the level of ledstrip support (to allow improved Configurator behavior) along with support for reading/setting the current `ledstrip_profile`.

ledstrip support flag is as follows:
0 = basic ledstrip available
1 = advanced ledstrip available
2019-01-29 09:43:19 -05:00
Michael Keller aa020c8970
Merge pull request #7471 from jflyper/bfdev-4.0-compatible-acc-alignment
Set acc alignment to that of active gyro
2019-01-30 02:44:32 +13:00
Michael Keller 436892424c
Merge pull request #7492 from jflyper/bfdev-fix-pinio-initialization
[PINIO] Fix inverted pin initialization problem
2019-01-30 02:39:44 +13:00
Michael Keller 2a31d3c3d7
Merge pull request #7488 from AlienWiiBF/Generic_update
Update DMAOPT settings for generic targets
2019-01-30 00:17:31 +13:00
mikeller 73d18ede66 Halved motor_output_limit for 3D modes. 2019-01-30 00:05:41 +13:00
Michael Keller 0b7fbdf3bd
Merge pull request #7486 from mikeller/add_exemplary_tests
Added 'test-representative' make target to run a representative subset of the unit tests.
2019-01-29 16:28:13 +13:00
jflyper 5b40bb4b24 Set acc alignment to that of active gyro 2019-01-29 11:33:01 +09:00
Michael Keller fc289e95b7
Merge pull request #7485 from mikeller/add_led_strip_to_f3
Re-added minimal LED_STRIP support to F3.
2019-01-29 07:27:36 +13:00
jflyper 06e7a73661 Pin state is a pin voltage level, not a logic (active-high/low) level 2019-01-28 19:34:10 +09:00
Michael Keller 6c8b3a7193
Merge pull request #7473 from AlienWiiBF/DMAOPT_fix
Preinitialallize all SPI DMA option value defaults
2019-01-28 20:19:46 +13:00
Michael Keller bbedb60fe2
Merge pull request #7476 from mikeller/add_stick_overlay_symbols
Changed OSD stick overlay to use custom symbols.
2019-01-28 20:17:10 +13:00
Michael Keller 933fb0b6b4
Merge pull request #7475 from mikeller/fix_debug_names
Aligned debug mode names with debug enum value names for more fun when debugging.
2019-01-28 20:16:11 +13:00
Michael Keller 28de73ab13
Merge pull request #7470 from jflyper/bfdev-protect-flashInit-from-NULL-SPI-instance
[FLASH] Protect flashInit from NULL SPI instance
2019-01-28 20:14:40 +13:00
mikeller 53b03e6c3c Re-added minimal LED_STRIP support to F3. 2019-01-28 11:21:20 +13:00
MJ666 033920ccb6 Update DMAOPT settings for generic targets 2019-01-27 18:42:32 +01:00
MJ666 f47936c92f Preinitialallize all SPI DMA option value defaults 2019-01-27 13:31:34 +01:00
mikeller 95eb87b678 Changed OSD stick overlay to use custom symbols. 2019-01-28 00:53:02 +13:00
mikeller a3cf7e0cf7 Added motor output limiting per profile. 2019-01-28 00:37:00 +13:00
mikeller 8c2a896025 Added 'test-representative' make target to run a representative subset of the unit tests. 2019-01-28 00:08:01 +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
mikeller 118e92c8b2 Aligned debug mode names with debug enum value names for more fun when debugging. 2019-01-27 12:04:38 +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
jflyper 4ab7ab03ef Protect flashInit from NULL SPI instance 2019-01-27 00:37:19 +09: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
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
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
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
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
Michael Keller 62da4d09e6
Merge pull request #7424 from jflyper/bfdev-make-USE_SPI_TRANSACTION-generic-F4-feature
[F4] Make USE_SPI_TRANSACTION generic feature for F4
2019-01-21 00:33:46 +13:00
mikeller e983ebf702 Migrate the remaining F3 targets to feature cut levels. 2019-01-21 00:21:49 +13:00
Bruce Luckcuck 6034143a59 Fix LEDSTRIP defines to prevent compilation errors 2019-01-19 14:59:22 -05:00
Bruce Luckcuck 3d671c7134 Use fabsf() instead of ABS() for floats
The ABS() macro doesn't handle -0 floats correctly. Also fabsf() is more efficient.
2019-01-19 14:15:54 -05:00
Bruce Luckcuck b68717a03b Add FEATURE_CUT_LEVEL to the cli version command output 2019-01-19 11:42:08 -05:00
Bruce Luckcuck d867aeced3 Move anti-windup iterm reset from rx loop to pid loop
Having the iterm resetting happening in the rx loop causes a sawtooth PID/motor effect while idling since the PID loop is running at a much higher rate and iterm is allowed to grow during this, and then only reset at a much lower rate in the rx loop. This can potentially lead to some oscillation and/or resonance while idling before takeoff as the sawtooth signal can make it through to the motor outputs.
2019-01-19 11:18:24 -05:00
Andrey Mironov 4e5f0e3c54 Fixed incorrect enum value being used for GetITStatus on F4 2019-01-19 16:25:57 +03:00
Michael Keller 628fdb8adc
Merge pull request #7409 from mikeller/fix_4way_conditionals
Fixed conditionals for 4 way ESC boot loader.
2019-01-19 23:28:58 +13:00
Michael Keller dfb438cc5b
Merge pull request #7303 from pkruger/4278-LED-profiles-switchable-via-OSD
Add LED strip profile feature
2019-01-19 23:18:41 +13:00
Pieter Kruger 4ec536a317 Add LED profile feature - 4278 2019-01-19 20:23:03 +10:00
Michael Keller 8be90d44a9
Merge pull request #7422 from jflyper/bfdev-isr-vector-to-ram-for-F411
[F411] Provide VECTAB segment as alias to RAM
2019-01-19 14:47:50 +13:00
Michael Keller cb78e3e457
Merge pull request #7423 from etracer65/osd_warnings_uint32
Extend OSD warnings storage to 32bits; add count to MSP
2019-01-19 14:23:52 +13:00
Michael Keller 7eedfff428
Merge pull request #7415 from jflyper/bfdev-change-call-timing-of-vtxInit-after-device-parameter-init
[VTX] Follow-up to #7285 vtx changes
2019-01-19 14:23:18 +13:00
mikeller 71216cd878 Fixed conditionals for 4 way ESC boot loader. 2019-01-19 10:56:16 +13:00
mikeller 5b3f54874d First wave of feature cut conversions: CHEBUZZF3, MIDELICF3, and SPRACINGF3EVO. 2019-01-19 00:53:09 +13:00
Michael Keller b4663aa5a5
Merge pull request #7419 from etracer65/stale_baro_parms
Remove stale baro parameter baro_cf_alt
2019-01-18 23:47:08 +13:00
Michael Keller 96d2538b5d
Merge pull request #7410 from mikeller/fix_osd_conditionals
Fixed conditionals in OSD code.
2019-01-18 23:12:16 +13:00
Michael Keller 2e2609fbb6
Merge pull request #7417 from phobos-/flysky-refactor
Added flysky spi rx specific cli commands
2019-01-18 23:11:41 +13:00
Michael Keller 3557104c61
Merge pull request #7403 from mikeller/flash_overflow_new_approach
For discussion: Take a methodical approach to dealing with flash overflows.
2019-01-18 18:52:25 +13:00
Michael Keller c99a52ca38
Merge pull request #7284 from etracer65/telemetry_disabled_sensors_detailed_parms
Expose individual telemetry sensor disable flags as parameters (F4+)
2019-01-18 18:51:31 +13:00
jflyper 95905ff666 Make USE_SPI_TRANSACTION generic feature for F4 2019-01-18 13:04:59 +09:00
Bruce Luckcuck 0ac761da22 Shorten parameter names per suggestions 2019-01-17 20:31:23 -05:00
Bruce Luckcuck 05cc74a4ae Extend OSD warnings storage to 32bits; add count to MSP
Extends the possible OSD warnings elements from 16 to 32.

Adds a warnings count to MSP data to enable improved handling of warnings added to the firmware but not in the Configurator. Incremental Configurator development required.
2019-01-17 19:46:58 -05:00
Michael Keller c7e462fe96
Merge pull request #7399 from etracer65/blackbox_undefined_compile_fix
Fix compilation errors if USE_BLACKBOX is not defined
2019-01-18 09:18:37 +13:00
Michael Keller 0627463659
Merge pull request #7400 from etracer65/blackbox_invalid_device_fix
Validate and reset invalid blackbox device selections
2019-01-18 09:17:09 +13:00
Michael Keller 2fdf48b415
Merge pull request #7421 from jflyper/bfdev-make-MIDELICF3-fit-with-vtx-changes
Drop USE_RTC_TIME from MIDELICF3 to fit with vtx changes
2019-01-18 08:39:06 +13:00
jflyper 9743d678a0 Provide VECTAB segment as alias to RAM 2019-01-18 02:07:13 +09:00
jflyper 53ab1ad23e Protect vtxCommonLookupXXX against null vtxDevice call 2019-01-18 01:21:04 +09:00
jflyper 80c1cfa6db Call vtxInit after device parameters are initialized 2019-01-18 01:20:35 +09:00
jflyper a0d930a5fb Drop USE_RTC_TIME from MIDELICF3 2019-01-18 01:08:59 +09:00
Bruce Luckcuck 9e53d97e4d Remove stale baro parameter baro_cf_alt 2019-01-16 18:26:13 -05:00
phobos- 305e423c90 Added flysky spi rx specific cli commands 2019-01-16 21:11:50 +01:00
mikeller 2e000506c8 Renamed to 'FEATURE_CUT_LEVEL', added 'FORCE_FEATURE_CUT_LEVEL' command line option. 2019-01-17 09:03:35 +13:00
ctzsnooze 65750f09dc Classic D values if no D_Cut
At compile time, if D_CUT is not defined for a given target, the user will get lower default D values.
2019-01-16 09:00:38 -07:00
Bruce Luckcuck 2cb1f8f12e Expose individual telemetry sensor disable flags as parameters (F4+)
Exposes each telemetry sensor disable flag as a separate OFF/ON parameter. Makes the settings more accessible without the user having to calculate the binary bitmask directly.

Only added for F4+ due to flash usage. F3 will continue to present the `telemetry_disabled_sensors` 32bit bitmask setting.

Would almost like to reverse the logic to make them enabling flags. Having a "disabled = ON" is a little counterintuitive.
2019-01-16 08:09:59 -05:00
Michael Keller e0fc9300ed
Merge pull request #7181 from hydra/fix-msp-flash-read
Fix MSP flash read
2019-01-17 01:53:36 +13:00
mikeller 07f299962d Fixed conditionals in OSD code. 2019-01-17 01:44:16 +13:00
mikeller 77f0e106f6 Removed unnecessary cast. 2019-01-17 00:02:13 +13:00
Michael Keller b0e06d2e26
Merge pull request #7395 from TonyBlit/gps_rescue_disabled_warning
GPS Rescue disabled warning
2019-01-16 23:53:29 +13:00
Michael Keller 776549785d For discussion: Take a methodical approach to dealing with flash overflows. 2019-01-16 15:56:10 +13:00
Kenneth Mitchell f6e456cd06
Allow dyn lpf to initialize if static lpf config is 0.
Change min > max per review.

Fix missing ifdef.
2019-01-15 16:48:21 -05:00
Michael Keller 469d5c5477 Fixed flash overflow on SPRACINGF3NEO. 2019-01-16 08:55:23 +13:00
Michael Keller 305f2c213a
Merge pull request #7285 from jflyper/bfdev-vtx-table-refactor
[VTX] Convert direct reference to string and freq table to vtxCommon services
2019-01-16 07:16:11 +13:00
Tony Cabello ec71965dd8 GPS Rescue disabled warning 2019-01-15 17:34:04 +01:00
Bruce Luckcuck e0d81c4c2b Validate and reset invalid blackbox device selections
Since we really can't conditionally build the list of options, it's possible to select an invalid blackbox device type using CLI `set blackbox_device =`. This change validates that the selected device is included in the code and if not resets to "no logging".
2019-01-15 11:17:39 -05:00
Bruce Luckcuck 4da9b75c8f Fix compilation errors if USE_BLACKBOX is not defined 2019-01-15 10:08:15 -05:00
mikeller a95980ef09 Undo move of USE_SMART_FEEDFORWARD, as it's been done in #7391 already. 2019-01-15 22:13:02 +13:00
Thorsten Laux 96e33e6c18 manage space of f3 targets 2019-01-15 22:10:34 +13:00
Thorsten Laux d441955391 more renaming to accomodate review feedback 2019-01-15 22:10:34 +13:00
Thorsten Laux 6e46f05e7d remove smart_feedforward at 128mb to make room for scheduler_fix 2019-01-15 22:10:34 +13:00
Thorsten Laux d90ef12248 address review feedback 2019-01-15 22:10:34 +13:00
Thorsten Laux 006749a66c reverse unit test change 2019-01-15 22:10:34 +13:00
Thorsten Laux d9cd6f2cda fix FAST_RAM_ZERO_INIT 2019-01-15 22:10:34 +13:00
Thorsten Laux 33741dce75 Add option for scheduling policy targeting constant average task rates 2019-01-15 22:10:34 +13:00
Michael Keller 2bf2ded102
Merge pull request #7383 from jflyper/bfdev-f4-vector-table-relocation
[F4] Relocate ISR vector table to RAM
2019-01-15 21:53:28 +13:00
Michael Keller d4f164b3cc
Merge pull request #7390 from etracer65/msc_use_persistence_layer
Change MSC boot mode to use persistence layer and unify with bootloader
2019-01-15 21:36:14 +13:00
Michael Keller e1d7948b0a
Merge pull request #7389 from bnn1044/pyrof4
Enable Pin A14 for pinio use
2019-01-15 21:35:02 +13:00
Michael Keller 521db54735
Merge pull request #7387 from klutvott123/Increase-voltage/current-cutoff-frequencies
Increase voltage/current cutoff frequencies
2019-01-15 21:32:23 +13:00
Michael Keller 234186f493
Merge pull request #7392 from mikeller/remove_features_from_betaflightf3
Removed features from BETAFLIGHTF3 to fix flash overflow. Also removed some doubled up 'undef' statements.
2019-01-15 01:54:23 +13:00
Michael Keller 07320f6633
Merge pull request #7391 from mikeller/move_smart_feedforward
Removed Smart Feedforward from F3.
2019-01-15 01:54:08 +13:00
Michael Keller 06f1661d8f
Merge pull request #7380 from etracer65/cli_msc_device_check
Check that flash device is selected for blackbox before msc CLI reboot
2019-01-15 00:14:59 +13:00
mikeller c3400fc524 Removed features from BETAFLIGHTF3 to fix flash overflow. Also removed some doubled up 'undef' statements. 2019-01-14 22:57:41 +13:00
mikeller a42d2ae500 Removed Smart Feedforward from F3. 2019-01-14 22:27:06 +13:00
jflyper d8f55f35ef Convert direct reference to string and freq table to vtxCommonXXX services 2019-01-14 11:31:45 +09:00
Bruce Luckcuck 065ce24d4d Change MSC boot mode to use persistence layer and unify with bootloader
Replaced the existing `PERSISTENT_OBJECT_BOOTLOADER_REQUEST` that was bootloader specific, with `PERSISTENT_OBJECT_BOOTMODE_REQUEST` that can be shared by any required boot mode based on it's contents. Currently supports bootloader and MSC, but is extensible for additional future needs. The previous hardcoded memory address usage for MSC boot was removed.
2019-01-13 19:45:22 -05:00
Michael Keller 5c5520ecf4
Merge pull request #7382 from etracer65/prevent_msc_bootloop
Fix boot loop if mass storage mode init fails
2019-01-14 13:36:46 +13:00
Cheng Lin b337ab45f8 Enable Pin A14 for pinio use
Signed-off-by: Cheng Lin <bnn1044@gmail.com>
2019-01-13 18:52:41 -05:00
Michael Keller 492d1f323e
Merge pull request #6809 from jflyper/bfdev-spi-transaction
Allow mixed speed and mode on a SPI bus
2019-01-14 09:23:50 +13:00
jflyper 343e9b3a67 Allow mixed speed and mode on a SPI bus by CR1 caching 2019-01-14 03:34:27 +09:00
Hans Christian Olaussen 6770bbafca Increase voltage/current cutoff frequencies
Increase IBAT_LPF_FREQ  and VBAT_LPF_FREQ
2019-01-13 17:41:48 +01:00
jflyper 52625a4d56 Relocate ISR vector table to RAM for F4 2019-01-14 00:05:06 +09:00
Michael Keller 7f58ecc77f
Merge pull request #7294 from TonyBlit/gps_rescue_no_mag
Mag heading ignored while GPS Rescue is running
2019-01-13 23:14:06 +13:00
ctzsnooze 7e3e5649e1 DTERM_CUT
This code cuts D by a specified percentage durning normal flight.

It lets D smoothly rise up to normal during rapid gyro moves like flips and rolls, and increase during prop wash events.

D should now be tuned to values the 'normal' 30-45 range.

If D is 40, a dterm_cut_percentage of 65 will cut D to 14 in normal flight, but the quad will still get full 40 of D to control bounce-back after flips and about 25 of D during strong prop wash.

The dterm_cut_percentage can be adjusted via the OSD, from the D filtering page.
Adding d_cut results in cooler motors, lower amounts of noise in motor traces and faster reactions to quick stick inputs.

Too high a dterm_cut_percentage may bring out P oscillation from lack of D.  Values of 70% are generally OK.

Input is gyro differential (delta).  Frequencies above 40hz (above propwash) are attenuated with a configurable (dterm_cut_range_hz) biquad filter.  Lower values for range can be used if the quad is very noisy or gets low frequency D resonant oscillation.  Up to 50 or 60hz may suit clean quads where prop wash control is the main priority.  Too high a range value results in D being boosted from noise in normal flight.

The boost signal is 'integrated, smoothed and delayed' with a 7hz PT1 'dterm_cut_lowpass_hz' filter.  The default of 7Hz gives about the right amount of smoothing and delay.  Higher numbers cause the boost to come on faster, with less delay. Lower values delay the boost effect and cause it to last longer.

The dterm_cut_gain amount controls the strength of the boost effect by amplifying the input to the boosting effect.  If the quad is flow gently, a higher gain value may be needed to gain full boost.

Logging with set debug_mode = D_CUT allows recording of realtime D values on roll and pitch into debug 2 and 3.  The reatime D value should reach its set maximum during rapid turns, ideally at about the time D itself peaks.  If it fails to reach the maximum, gain should be increased.

The D_Cut feature is not enabled on LUXV2RACE, OMNIBUS, SPRACINGF3NEO because there isn't enough flash space.
2019-01-12 21:09:03 -07:00
Michael Keller 8e54c6711c
Merge pull request #7381 from mikeller/fix_luxv2_race_flash_overflow
Removed features from LUXV2_RACE, OMNIBUS, and SPRACINGF3NEO to fix flash overflow.
2019-01-13 14:02:48 +13:00
Michael Keller 329b9d38d7
Merge pull request #7279 from AlienWiiBF/FF_RACEPIT
Add FuriousFPV RacePit target as generic target
2019-01-13 12:37:43 +13:00
Michael Keller 40c6621d0a
Merge pull request #7374 from stawiski/pr-f7-adc-cleanup
ADC driver refactor: removed "continue" in loops to improve readabili…
2019-01-13 12:32:00 +13:00
Michael Keller 1c3eb9520d
Merge pull request #7375 from stawiski/pr-transponder-ir-io-cleanup
Removed unused "dmaBufferOffset" bloat from transponder_ir_io drivers…
2019-01-13 12:31:39 +13:00
mikeller 441b52f309 Removed some more features from OMNIBUS and SPRACINGF3NEO as well. 2019-01-13 12:23:04 +13:00
Bruce Luckcuck 0ed1fbc609 Fix boot loop if mass storage mode init fails
The logic already performed a reboot if mass storage init failed, but it never reset the boot vector value so it continued to contain the `MSC_MAGIC` value leading to a boot loop.

Also fixed fixed the F7 version of `mscWaitForButton()` as it was using the F4 vector.
2019-01-12 18:23:03 -05:00
mikeller 715107eb00 Removed USE_EXTENDED_CMS_MENUS from LUXV2_RACE to fix flash overflow. 2019-01-13 12:11:47 +13:00
Bruce Luckcuck e9d498e77a Check that flash device is selected for blackbox before msc CLI reboot
Previously the logic would only validate whether one or more of the defined flash device types was ready and not examine the user selected blackbox device. Then on reboot during `mscStart()` the logic there would use the selected blackbox device type to decide which mode to operate in. If a flash device wasn't selected the msc initialization failed (like if serial port or "no logging" were selected).

This change only checks the status of the selected blackbox device to ensure that a reboot will properly start mass storage mode.
2019-01-12 17:12:08 -05:00
Thorsten Laux 7859e6d540 Add dshot command queue and limit max notch filter frequency 2019-01-12 12:25:30 +01:00
Michael Keller 9b43b30b48
Merge pull request #7369 from TonyBlit/gps_set_home_once
Parameter for updating GPS Home point once
2019-01-12 19:21:11 +13:00