Commit Graph

12567 Commits

Author SHA1 Message Date
Bruce Luckcuck 4636f10385 Prevent MOTOR_STOP auto-disarm for stick arming when GPS Rescue is active
The MOTOR_STOP logic is designed to stop the motors if:
1. MOTOR_STOP feature is enabled
2. Airmode is disabled
3. Throttle is at minimum

The problem is that this also applied during GPS Rescue and if the pilot had these conditions the motors would stop. Changed to disable MOTOR_STOP while GPS Rescue is active.

Also if stick-arming is used the MOTOR_STOP logic also will auto-disarm after 5 seconds (auto_disarm_delay). Disable this also when GPS Rescue is active.
2018-10-24 11:28:04 -04:00
Michael Keller f912b891b5
Merge pull request #6952 from mikeller/improve_airmode_detection
Improved handling of airmode detection.
2018-10-25 00:41:50 +13:00
Michael Keller 05f935d38e
Merge pull request #6974 from etracer65/osd_remaining_time_div0
Fix OSD time remaining division by zero
2018-10-24 23:47:57 +13:00
Michael Keller 8ae0e929d1
Merge pull request #6973 from etracer65/osd_temperature_cleanup
OSD temperature display and calculations cleanup
2018-10-24 23:47:40 +13:00
Michael Keller 52b876a2a5
Merge pull request #6970 from etracer65/osd_gforce_fix
Improve OSD g-force display and avoid math when not needed
2018-10-24 23:46:22 +13:00
Michael Keller 9a4a3507f2
Merge pull request #6967 from jflyper/bfdev-fix-add-USE_ESC_SENSOR-conditional-to-OSD-stat-max-ESC-temp
OSD: Protect ESC stat max temp by USE_ESC_SENSOR
2018-10-24 23:43:50 +13:00
Michael Keller 673bb23ac6
Merge pull request #6951 from jflyper/bfdev-fix-f4by-sdcard-dma-spec
F4BY: Fix bad SDCARD DMA channel spec
2018-10-24 23:39:27 +13:00
Michael Keller c06d9c8004
Merge pull request #6947 from mikeller/fix_visual_beeper
Changed visual beeper to respect beeper settings.
2018-10-24 23:38:58 +13:00
Michael Keller e820c8f37c
Merge pull request #6936 from etracer65/stick_arming_gyro_calib_fix
Fix initial stick arming when gyro_cal_on_first_arm is used
2018-10-24 23:38:24 +13:00
Bruce Luckcuck c1f40b8ebb Fix OSD time remaining division by zero
If the current sensor wasn't configured (or the mahDrawn was still zero) then there would be a division by zero error in the remaining time OSD element calculation. Rearranged the logic to prevent.
2018-10-23 14:09:44 -04:00
Bruce Luckcuck b31b2d0680 OSD temperature display and calculations cleanup
Remove unnecessary decidegrees conversions as all temperature providers are in degrees celcius.

Fixed rounding for imperial units.

Fixed data type error in core temp warning element. Temperature is captured as int16 and can be negative but logic was using uint8 leading to an underflow for negative temperatures and a false alarm triggering.
2018-10-23 09:27:26 -04:00
mikeller feaa082ac3 Fixes from review. 2018-10-24 02:02:59 +13:00
Michael Keller 6adfd345db
Merge pull request #6971 from etracer65/osd_ah_div0
Fix OSD artificial horizon division by zero
2018-10-24 01:36:47 +13:00
Bruce Luckcuck 810b9dab74 Fix OSD artificial horizon division by zero
If osd_ah_max_pit was set to zero there would be a divide by zero error in the calculations for the OSD artificial horizon. Using zero for osd_ah_max_pit is a valid use-case to disable the vertical pitch component in the artificial horizon so we can't simply change the parameter range.
2018-10-23 07:26:01 -04:00
Michael Keller 7b8fefabb6
Merge pull request #6968 from loopur/target_hakrcf722
Update I/O and pwm define for target HAKRCF722 in production.
2018-10-23 22:17:44 +13:00
Bruce Luckcuck a66d6a2fc7 Improve OSD g-force display and avoid math when not needed
Previously the g-force element was being display using integer math and truncating the float value. This lead to the g-force displaying 0.9 much of the time. Changed to use rounding to one decimal place.

Also avoid the g-force calculation unless the element or post-flight statistic are enabled. This saves unnecessary math including a sqrt().
2018-10-22 19:46:51 -04:00
Michael Keller d0076cf24e
Merge pull request #6953 from mikeller/remove_led_strip_from_targets
Removed USE_LED_STRIP from individual targets.
2018-10-23 01:39:58 +13:00
mikeller 817bb2ed86 Rename 'isAirmodeActive()' to 'airmodeIsEnabled()'. 2018-10-23 01:09:17 +13:00
mikeller 6206f034a8 Improved handling of airmode detection. 2018-10-23 01:05:50 +13:00
Michael Keller d0432ae1e3
Merge pull request #6957 from wind0r/cleanup_dterm_lowpass
cleanup dterm lowpass order
2018-10-23 00:57:08 +13:00
Michael Keller 807188e652
Merge pull request #6958 from jflyper/bfdev-reinstate-f7-uart-txdma
Reinstate UART TX DMA for F7 (HAL driver)
2018-10-23 00:49:34 +13:00
Michael Keller 8e5f815582
Merge pull request #6961 from AlienWiiBF/FortiniF4
FortiniF4 Camera Control and LED pin fix
2018-10-23 00:35:59 +13:00
Michael Keller 1fcdd8c784
Merge pull request #6959 from wind0r/switch_readme_update
update switch example to fit current coding style
2018-10-23 00:30:14 +13:00
loopur 7ec3be6c06 Update I/O and pwm define for target HAKRCF722 in production. 2018-10-22 10:12:43 +08:00
jflyper 849024ce59 Protect ESC telemetry features in osd.c by USE_ESC_SENSOR 2018-10-22 09:15:45 +09:00
Michael Keller 60db62f6b8
Merge pull request #6956 from etracer65/mixer_size_optimize
Refactor mixer motor_stop handling - reduces flash usage
2018-10-22 11:34:56 +13:00
MJ666 85c9e1f9d7 FortiniF4 Camera Control and LED pin fix 2018-10-21 16:48:04 +02:00
jflyper 70723bdcfe
Merge pull request #6955 from mikeller/fix_crazybeef3fr_flash_overflow
Fixed flash overflow on CRAZYBEEF3FR.
2018-10-21 02:56:11 +09:00
jflyper 82a4d42b0e Reinstate UART TX DMA for F7 (HAL driver) 2018-10-20 23:57:17 +09:00
Steffen Windoffer f45ab5bb0a cleanup dterm lowpass order 2018-10-20 15:12:40 +02:00
Steffen Windoffer 956ea31c8f update switch example to fit current coding style 2018-10-20 15:04:12 +02:00
mikeller 770266ccae Fixes from review. 2018-10-21 01:34:44 +13:00
Michael Keller 610b712390 Fixed flash overflow on CRAZYBEEF3FR. 2018-10-19 10:41:25 +13:00
Bruce Luckcuck 79abfb05fb Refactor mixer motor_stop handling - reduces flash usage
Rearranges the placement of the motor_stop handling logic in relationship to the motor output calculations.

Saves 4124 bytes of flash on F3.
2018-10-18 17:32:27 -04:00
Michael Keller 9ab8370379
Merge pull request #6933 from kmitchel/dlpf2_biquad
Implement biquad on 2nd dterm lowpass filter.
2018-10-19 01:32:19 +13:00
mikeller 9b36810eae Removed USE_LED_STRIP from individual targets. 2018-10-19 00:05:01 +13:00
mikeller a4b2f655d4 Fix from review. 2018-10-18 19:09:01 +13:00
jflyper 47fa3d933a Assume DMA1_Stream4 Channel 0 for SPI2_TX 2018-10-18 09:23:59 +09:00
mikeller 788119a093 Changed visual beeper to respect beeper settings. 2018-10-18 02:10:47 +13:00
Michael Keller 7631e2419c
Merge pull request #6940 from jflyper/bfdev-f7uartdma-remove-txIrq
F7: Remove txIrq from uartHardware_s
2018-10-18 01:49:03 +13:00
jflyper a4c1b76c80 Remove txIrq from uartHardware_s
It was not IRQ at all by itself, but a dmaIdentifier_e for TX side DMA, which can be obtained by dmaGetIdentifier.
2018-10-17 02:03:58 +09:00
Michael Keller 27b80d8454
Merge pull request #6925 from fredericmorin/bigger_cam_mix_angle
Increase fpv_mix_degrees maximum value
2018-10-16 23:07:22 +13:00
Michael Keller f991a44d4d
Merge pull request #6934 from etracer65/auto_disarm_timer_reset
Fix stick arming auto-disarm timer not being reset
2018-10-16 22:41:31 +13:00
Bruce Luckcuck c676ce2f52 Fix initial stick arming when gyro_cal_on_first_arm is used
Previously the initial arming attempt would initiate the gyro calibration but then fail because gyro calibration was underway. The user is confused as they're holding the arming sticks but nothing is happening. This always forced the user to release the arming stick command and then perform a second arming stick command to actually arm.

After the fix the initial arming will proceed as long as the pilot holds the arming stick command through the duration of the gyro calibration (1.25 seconds by default). This seems normal to the user as they're waiting for the motors to start (or at least the arming beeps) before releasing the sticks anyway.
2018-10-15 10:15:07 -04:00
Bruce Luckcuck f0e2cf195b Fix stick arming auto-disarm timer not being reset
Fix code path that could prevent the auto-disarm timer from being reset leading to a possible immediate disarm if airmode was switched off while in flight.
2018-10-15 09:00:13 -04:00
Michael Keller d193783e66
Merge pull request #6912 from flywoo/master
modify the scl pin -PB8 flywoo405 target
2018-10-16 00:03:39 +13:00
Michael Keller 13eae84b8c
Merge pull request #6930 from mikeller/re_add_features_for_f3
Re-added removed features on F3 after rx / telemetry cleanup.
2018-10-15 23:39:37 +13:00
Kenneth Mitchell 641d0a2e54 Implement biquad on 2nd dterm lowpass filter. 2018-10-14 13:34:11 -04:00
mikeller a16cd1f251 Make it work on master. 2018-10-15 00:17:16 +13:00
mikeller 2ad0da5e90 Re-added removed features on F3 after rx / telemetry cleanup. 2018-10-14 21:21:46 +13:00