1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-15 12:25:20 +03:00
Commit graph

11902 commits

Author SHA1 Message Date
Thorsten Laux
3d9541eea0 Allow rpm filter to be reinitialized with different settings 2019-09-06 01:13:19 +12:00
Michael Keller
44f0fb577c
Merge pull request #8816 from mikeller/add_scheduler_optimize_rate_auto
Added 'auto' setting for 'scheduler_optimize_rate'.
2019-09-06 01:11:42 +12:00
Thorsten Laux
b6b2b90f38 Fix serial esc telemetry with bitbang dshot 2019-09-05 11:13:25 +02:00
Tony Cabello
1406b068e2 Bugfix: Vario GPS and 3D Total Distance overflow 2019-09-05 09:33:01 +02:00
jflyper
eac1565987 Provide isMotorEnabled function pointer to motorIsEnabledNull for motorNullVTable
Also suppress call to this function from MSP_MOTOR when motors are not
present by inquiring motorIsEnabled first.
2019-09-05 16:24:52 +09:00
Miguel Angel Mulero Martinez
5f8919eb98 Add RPM Filter, FF and Iterm Relax values to the Blackbox header 2019-09-05 08:44:57 +02:00
mikeller
224e3e2c9a Added 'auto' setting for 'scheduler_optimize_rate'. 2019-09-05 15:25:22 +12:00
mikeller
3f0f3ab685 Added the parameters for RPM filtering to MSP. 2019-09-05 12:31:40 +12:00
TheIsotopes
077fed23ee
Remove DShot1200 Protocol Part2
has crept in with #8736
2019-09-04 17:04:46 +02:00
Michael Keller
75447ef2b8
Merge pull request #8736 from joelucid/ff2_1
various ff2_0 improvements
2019-09-05 02:14:23 +12:00
Michael Keller
d6c5b9824c
Removed Dshot1200 protocol. (#8806)
Removed Dshot1200 protocol.
2019-09-05 02:08:45 +12:00
Michael Keller
2432ed0356
Merge pull request #8804 from joelucid/no_transient
change transient throttle limit default to 0
2019-09-04 23:33:49 +12:00
Thorsten Laux
5855b275f4 various ff2_0 improvements
simplify

double period averaging

fix calc

ff changes

in between

fixes

clip * clip and cleanup

address review feedback

more review feedback

10 to 100
2019-09-04 23:08:02 +12:00
jflyper
adf6fd1764 DMA bit banging Dshot, first cut
F405 working (OMNIBUSF4SD target)
F411 not tested
F722 working, needs testing (OMNINXT7 target)
F74x not working

NOX target (temporary)

bb_dshot with telemetry on f4
bbshot f7 targets and fix crash due to missing debug pins

remove empty line

add empty lines

remove OMNIBUSF4 specific debug pins

add missing comma

add missing comma

Use separate bbTimerHardware array to fix unified targets

eliminate now unneeded timerGetByUsage

don't duplicate timer1 def

Add auto mode, rename dshot_bbshot to dshot_bitbang

remove newline

renamve various files

various changes to address feedback

address feedback

address feedback

add pacer timers to timer show

don't disable telemetry if dshot_bitbang is on or auto

Address feedback, add faster decode implementation based on bit banding, modify dma parameters to reduce required memory bandwidth on half

remove debug output

remove NOINLINE

Protect gpio direction change with critical sections

FIXWS_SAVE_INDEX

add static back in

no forward typedef

address review feedback

disallow proshot1000 with dshot bitbang

Extracted and plumbed up 'dbgPin'.
2019-09-04 16:06:48 +12:00
Michael Keller
37b059532f
Merge pull request #8792 from jflyper/bfdev-fix-servo-to-write-...
Write forward only servos
2019-09-03 23:59:24 +12:00
Michael Keller
dd8d7b0be2
Changed Unified Target custom defaults to use sector 0 memory. (#8797)
Changed Unified Target custom defaults to use sector 0 memory.
2019-09-03 23:34:10 +12:00
mikeller
802c053e4e Removed Dshot1200 protocol. 2019-09-03 23:00:01 +12:00
Thorsten Laux
1a4c42aabc change transient throttle limit to 0 2019-09-03 12:38:12 +02:00
jflyper
a5c4c8c21f Refactor tripcopter case 2019-09-03 15:10:06 +09:00
azolyoung
86e79b2216 add speedybee f7 2019-09-03 12:01:59 +08:00
mikeller
1c8cfbd241 Extended configuration status to accommodate custom defaults. 2019-09-03 09:57:43 +12:00
mikeller
460c16d57d Changed Unified Target custom defaults to use sector 0 memory. 2019-09-02 21:16:26 +12:00
ctzsnooze
f61a940a05 Set default dyanmic notch range to medium
In 4.0x the dynamic notch range was set by default to AUTO mode.

This would set range to low, medium or high based on the dynamic lowpass max setting, which the user was supposed to configure to suit the maximum rpm of the quad.

In 4.1 we are moving the maximum value of the dynamic gyro lowpass very high whenever the rpm filter is enabled.  And, generally, it is OK to do this even on non-rpm quads.

The problem then becomes that the dynamic notch quietly shifts itself to HIGH mode, and that can cause it to not track ordinary frame and prop resonances like it should.

I think it will be better overall in medium mode, which works best for most quads out of the box.  Users of very high RPM quads can choose high.  XClass quads or machines with low frequency resonance should choose low, and should set the dyn_notch_min_hz value low enough to reach the resonant peak.
2019-09-02 15:50:10 +10:00
Michael Keller
227f6f76a2
Merge pull request #8769 from mikeller/add_custom_defaults_to_msp
Added support for resetting to custom defaults to MSP.
2019-09-02 08:50:29 +12:00
jflyper
e9c951ea51 Write forward only servos after gimbal servos
Servos marked as forwarded from RC channels and not written previously
should be written after gimbal servos and before forwarding by
FEATURE_CHANNEL_FORWARDING.
2019-09-02 02:34:18 +09:00
ctzsnooze
445122a997 FF defaults increased to 90's
Higher feed forward improves stick responsiveness and reduces bounce back on lower authority quads.

Feed forward defaults in 4.0 were slightly conservative even for typical quads.

In association with ff_boost and ff_max_rate_limit, overshoot with even higher feed forward is less of a problem than before.

I think these values should be about right for 4.1
2019-09-01 20:06:06 +12:00
mikeller
36dc7306e2 Merge branch 'fix_custom_defaults_addresses' into add_custom_defaults_to_msp 2019-09-01 20:03:57 +12:00
Michael Keller
1585b4a31a
Merge pull request #8784 from ctzsnooze/Static-lowpass1-to-match-min
Set default static lowpass1 gyro value to the same as default gyro lowpass1 min
2019-09-01 15:43:28 +12:00
Michael Keller
a835939ddd
Increase iTerm defaults slightly for 4.1 (#8785)
Increase iTerm defaults slightly for 4.1
2019-09-01 15:42:36 +12:00
mikeller
772b249a3f Added support for resetting to custom defaults to MSP. 2019-09-01 14:26:57 +12:00
mikeller
3128328224 Fixed start / end addresses for custom defaults. 2019-09-01 13:35:10 +12:00
Bruce Luckcuck
86f9960987 Gyro filtering restructure
Refactor the gyro filtering to move the filters from the individual gyro sensor and make them part of the logical gyro object. For dual-gyro mode the sensors are averaged BEFORE and then filtering is applied. This differs from the current structure where filtering is applied individually to each sensor and the results were averaged at the end.

Significantly reduces filtering processing load and enables RPM Filtering for dual-gyro mode.
2019-08-31 19:13:41 -04:00
Michael Keller
e38d460acf
Fix tasks period calculation (#8782)
Fix tasks period calculation
2019-09-01 11:01:24 +12:00
Michael Keller
2184a0d126
Merge pull request #8776 from DieHertz/tmotor-f7-target
Add TMOTORF7 FC target
2019-09-01 10:56:26 +12:00
Michael Keller
c33cc100ec
Merge pull request #8759 from TonyBlit/3d_speed
Feature: show 3d speed on the OSD
2019-09-01 01:19:03 +12:00
ctzsnooze
b5ec9cd5bf Increase iTerm defaults slightly for 4.1
The feed forward changes in 4.1 will bring, to all quads of reasonable control authority, reduced setpoint to gyro delay and less error.  iTerm will tend to accumulate less during fast inputs so there will be less of a problem with iTerm-windup and iTerm related bounce-back.

Higher I values lead to better control during tight turns and greater stability in wind.  Higher I doesn't increase the absolute amount of iTerm accumulating in the PID loop, but does allow it to change more quickly and to more quickly zero out the residual errors that are strong in tight turns.

I think this modest increase will optimise performance of the default 4.1 PIDs for most quads.

Lower authority quads will need to either reduce their I setting, or, preferably, lower the iterm_relax value to 10 or even 5, to avoid wind-up.
2019-08-31 12:59:51 +10:00
ctzsnooze
e1c1fa8e47 Set static lowpass1 on gyro to match gyro lowpass1 min
In 4.0, the dynamic gyro lowpass1 min and the static gyro lowpass1 alternative had the same values, so that if the dynamic lowpass was not active, we would get conservative static filtering.

In moving to 4.1 with PT1 filtering we have raised the dynamic gyro lowpass1 min, but not raised the static gyro lowpass1 value.

We should make them both the same, again.
2019-08-31 12:25:37 +10:00
Bruce Luckcuck
ec43107559 Fix tasks period calculation 2019-08-30 13:39:30 -04:00
Dominic Clifton
c1ce69e813
Merge pull request #8777 from hydra/bf-remove-processrccommand-from-fast-code
Keep `updateRcCommand` out of FAST_CODE.
2019-08-30 17:11:06 +02:00
Tony Cabello
0ddcfc097c Feature: show 3d speed on OSD 2019-08-30 08:21:19 +02:00
Dominic Clifton
99f18775c8
Merge pull request #8768 from hydra/bf-dshot-remove-micros-use-in-irq-handler
Reduce CPU usage in dshot motor handler to reduce DSHOT telemetry errors.
2019-08-30 03:12:26 +02:00
Dominic Clifton
2d4b2f827b
Merge pull request #8771 from etracer65/target_furyf4osd_add_baro
Add missing baro support for target FURYF4OSD
2019-08-30 01:04:56 +02:00
Michael Keller
2cb3191d8a
Merge pull request #8758 from TonyBlit/fix_ttff
BugFix: time to first fix was sometimes abnormally high due to improp…
2019-08-30 07:25:51 +12:00
Dominic Clifton
d016aa2fc4 DSHOT - Use cycle counting instead of recording timestamp in dshot motor_DMA_IRQHandler.
It turns out that two calls to micros() and the calculation of
directionChangeDurationUs took 581 cycles, vs 396 cycles without the
calls to micros() and deferred calculation of the duration which is only
needed in the CLI.

This brings the time down from around 7 microseconds to 5.5 microseconds
on an F3 at 72Mhz.

This makes the difference between 100% invalid telemetry and 4% invalid
telemetry on the first motor on the F3.

Squashed commits:
* Remove the forward declaration for `pwmDshotSetDirectionInput` and make
it static.
* Remove unneeded forward declaration of `motor_DMA_IRQHandler`.
* Remove duplication in DMA IRQ Handler.
  Doesn't affect resulting code but improves readability.
* Use an inline function to read DWT->CYCCNT.
* Remove unneeded forward declarations from cli.c now that the correct
header is included.
* Update DWT unlock method.
2019-08-29 20:01:20 +02:00
Michael Keller
fc97d888f4
Scheduler - Fix unused period warning when `USE_TASK_STATISTI… (#8765)
Scheduler - Fix unused `period` warning when `USE_TASK_STATISTICS` is not defined.
2019-08-30 02:07:13 +12:00
Dominic Clifton
0baed339e6 Keep updateRcCommand out of FAST_CODE.
It's event driver or called at 33hz.

Keeping this out of FAST_CODE allows for more important code to be
placed in FAST_CODE.
2019-08-29 15:52:07 +02:00
Tony Cabello
751e1ae444 BugFix: time to first fix was sometimes abnormally high due to improper configuration of Ublox GPS 2019-08-29 15:41:36 +02:00
Michael Keller
6f4c2bb48c
Merge pull request #8770 from etracer65/fix_osd_hdop_pg
Fix osd_gps_sats_show_hdop setting being in incorrect PG
2019-08-30 01:40:02 +12:00
Andrey Mironov
84c6939f29 Added TMOTORF7 target 2019-08-29 15:58:40 +03:00
Bruce Luckcuck
3bec1576ba Add missing baro support for target FURYF4OSD 2019-08-28 11:07:57 -04:00