1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-23 16:25:31 +03:00
Commit graph

241 commits

Author SHA1 Message Date
Bruce Luckcuck
5c3b8c6eb6 Add camera frame OSD element
Adds an adjustable outline element designed to represent the field of view of the pilot's HD camera for visual framing. The width, height and position of the frame are adjustable.
2019-12-04 11:03:41 -05:00
Michael Keller
054bd66bc4
Update RC smoothing "auto" settings to consider interpolated fe… (#9249)
Update RC smoothing "auto" settings to consider interpolated feedforward
2019-12-02 11:31:05 +13:00
Bruce Luckcuck
b2a50819a3 Update RC smoothing "auto" settings to consider interpolated feedforward
Allows default settings for RC smoothing to work seamlessly regardless of the feedforward type selected ("classic" vs. interpolated).

Adds a new "AUTO" setting for the derivative filter type that will select based on whether interpolated feedforward is enabled (use PT1) or not (use BIQUAD). The derivative filter cutoff if set to auto (0) will also use a fixed cutoff calculated from a 100hz base if interpolated feedforward is enabled. Otherwise if classic FF is active then it will default to the previous method of calculating the cutoff based on the RX frame rate.
2019-11-30 19:06:44 -05:00
Alberto García Hierro
37e66b3dda Add support for FrSky OSD
- Add displayWriteFontCharacter() for font writing, removing all max7456
specific code.
- Add displayIsReady() for asynchronous display initialization
- Add displayBeginTransaction()/displayCommitTransaction() for display
transactions, which allow performing complex drawing operations without
flickering
- Add displayGetCanvas(), which retrieves the canvas associated with a
display (if it has it)
- Add canvas implementation for pixel based access for a display
- Add FrSkyOSD driver and displayPort driver
- Enable FrSkyOSD driver for targets with flash > 256
- Rename max7456_symbols.h to osd_symbols.h
2019-11-30 22:06:36 +00:00
Bruce Luckcuck
6b1f8485ac Add configurable duration to show the OSD logo on arming
Adds `osd_logo_on_arming_duration` which is configured in 0.1s intervals ranging from 5 to 50 (0.5s to 5.0s). The default is 5 (0.5s) to be consistent with the previous "ARMED" splash screen.
2019-11-29 15:55:49 -05:00
Bruce Luckcuck
05c8538752 Add option to display the OSD logo on arming
Adds `osd_logo_on_arming` setting with values `OFF, ON, FIRST_ARMING` (defaults to `OFF`). Optionally displays the OSD splash logo durin the "ARMING" message.
2019-11-28 13:38:33 -05:00
jflyper
2e84b0c442 Add support for character attribute rich displayport 2019-11-25 10:43:29 +09:00
jflyper
3d7151c6c0 Add temporary facility of vendor specific init string to displayport msp
Only for debugging purposes during attribute rich displayport devices.
Should be / Will be removed from a production firmware.
2019-11-23 18:11:58 +09:00
ctzsnooze
3c91da0e59 Interpolated feed forward smoothing 2019-11-20 11:29:37 +11:00
Michael Keller
6ecf864ad9
Disable stick arming by default, require settings change to ena… (#9183)
Disable stick arming by default, require settings change to enable
2019-11-18 14:18:31 +13:00
Bruce Luckcuck
8285ac46a2 Fix rate_6pos_switch setting data type and initialization
Just minor corrections for cleanup. Wouldn't have caused any problems.
2019-11-16 18:33:14 -05:00
Bruce Luckcuck
7087a5c87b Disable stick arming by default, require settings change to enable
Previously stick arming was assumed to be the case if an arming switch was not configured. This leads to a less safe default state and can lead to beginners thinking that stick arming is the default.

This change adds an `enable_stick_arming` setting which defaults to `OFF`. For stick arming to function the user must actively change this setting. The previous condition about there not being an arming switch configured still applies.
2019-11-16 18:23:01 -05:00
Michael Keller
67adc4ddab
Cleaned up parameter group definitions for displayPort. (#9115)
Cleaned up parameter group definitions for displayPort.
2019-10-31 01:14:22 +13:00
mikeller
4a7904695e Moved 'config.[ch]' into the 'config/' directory. 2019-10-28 11:17:25 +13:00
mikeller
d71b117c3e Cleaned up parameter group definitions for displayPort. 2019-10-28 08:30:09 +13:00
Bruce Luckcuck
365c6cb1f6 Move calibrationCompleted flag to a 4th element in the accZero structure
Allows the flag indicating that calibration was completed to be output in the values for `acc_calibration`.
2019-10-21 11:49:11 -04:00
Bruce Luckcuck
a021cc7c14 Add OSD distance from home alarm
Adds `osd_distance_alarm` (defaulting to 0 for OFF) which behaves similarly to `osd_alt_alarm`. Causes the OSD distance to home element to blink if the alarm setting is exceeded.

Also added to the CMS menu for consistency with the altitude alarm.
2019-10-21 20:17:12 +13:00
jflyper
6a8dfa75c2 Restrict MSP DisplayPort output to the MSP port that is marked 2019-10-18 14:56:21 +09:00
jflyper
8494d6e634 Add OSD displayPort device configurability 2019-10-18 14:56:19 +09:00
Michael Keller
c8c523328e
Add RC channel values to OSD (#8813)
Add RC channel values to OSD
2019-10-18 03:28:34 +13:00
Thorsten Laux
d907d5fab0 default f411 boards with timer 1 use to timer dshot 2019-10-16 22:47:16 +13:00
Bruce Luckcuck
381b38ca52 Fix crash recovery timeout logic and make settings limits rational
Timeout logic was ignored if the user had the accelerometer enabled and the quad wasn't within the angle limit. This was made doubly troublesome as the angle limit could be set to zero preventing crash recovery from ever deactivating.

Also adjusted the ranges of the parameters to be more rational to avoid invalid configurations.
2019-09-12 19:53:38 -04:00
jflyper
d4b4e37f6f Add RC channel values to OSD 2019-09-12 22:53:21 +09:00
Michael Keller
99bd45d13c Added target specific defines for bitbanged Dshot. 2019-09-10 13:40:10 +12:00
mikeller
2b98f137db Fixed problems with bitbanged Dshot and lazily allocated timers. 2019-09-10 01:48:25 +12:00
ctzsnooze
e381b27b9c Small modification to ff boost spike suppression
The feed forward boost concept improves stick response by adding a stick acceleration factor to feed forward. Generating spikes when there are steps in the RC signal is the main problem.
This PR makes one small change to how the spike suppression method is determined.
It no longer uses the 'jerk' signal to generate the spike suppression 'clip' value.  Instead it just uses the magnitude of the boost signal itself.
We originally used jerk because it is more sensitive to spikes. Detailed testing shows that jerk is that it has an unwanted impact one full RC step after the spike.
If we use the boost (acceleration) signal as the attenuator, that delayed impact does not occur, making the boost component more precise.
The threshold value for suppression needs to be a bit higher to achieve equivalence.
I've re-named the function to reflect it being related to spike suppression and removed 'jerk' since we aren't using that any more.
2019-09-07 11:22:06 +10:00
mikeller
224e3e2c9a Added 'auto' setting for 'scheduler_optimize_rate'. 2019-09-05 15:25:22 +12: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
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
mikeller
802c053e4e Removed Dshot1200 protocol. 2019-09-03 23:00:01 +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
Tony Cabello
0ddcfc097c Feature: show 3d speed on OSD 2019-08-30 08:21:19 +02:00
Bruce Luckcuck
736a677a3c Fix osd_gps_sats_show_hdop setting wrong PG
Setting was mistakingly in PG_GPS_CONFIG and should be in PG_OSD_CONFIG.
2019-08-28 11:01:45 -04:00
Tony Cabello
8cd23873a6 Feature: show HDOP next to sats indicator 2019-08-26 22:28:33 +02:00
mikeller
ec6fa21a90 Fixed incomplete removal of DJI HDL in CLI. 2019-08-23 09:12:45 +12:00
Michael Keller
c91b18098c
Simplified configuration of fast SBus. (#8716)
Simplified configuration of fast SBus.
2019-08-15 12:48:15 +12:00
mikeller
c31c8f9fbb Simplified configuration of fast SBus. 2019-08-13 22:17:33 +12:00
jflyper
a3ee09b434 [H7] Add SDMMC2 support 2019-08-11 10:57:51 +09:00
Michael Keller
b5981109b5
Add iterm relax to CMS (#8677)
Add iterm relax to CMS
2019-08-09 09:39:54 +12:00
IvoFPV
596222055d add itermrelax to cms 2019-08-08 10:24:59 +02:00
Thorsten Laux
91ad2498ff ff from interpolated setpoint 2019-08-08 09:50:18 +02:00
Andrey Mironov
8a279e688e Added Spektrum SRXL2 serial protocol for new receivers (Currently only SPM4650 released) 2019-08-07 14:02:33 -05:00
Thorsten Laux
d033a8dc76 address code review 2019-08-02 14:20:37 +02:00
Thorsten Laux
e39d5e7000 Make dyn_idle a conditional compile 2019-08-02 13:51:44 +02:00
Thorsten Laux
d474df3149 idle 2019-08-02 13:51:44 +02:00
jflyper
542146c702 Motor code refactor (Phase 1) 2019-07-17 01:33:39 +09:00
Dominic Clifton
980df1536f Refactored arbitrary gyro and mag alignment.
The original implementation:

* removed the old 'alignment' variable
* did not require 'ALIGN_CUSTOM'
* always used rotation matrix
* had no additional per-pid-loop conditional logic.

Extract currently unused code into tests.
In preparation for either deleting or re-using in validateAndFixConfig.

Fix code style of some old boardalignment code.

De-duplicate vector rotation code.

Now that rotation code is exacted from `alignBoard` and now  doesn't use
`boardRotation` some if it was similar to the code in `rotateV` in
maths.c

Use DECIDEGREES for mag and gyro/acc custom alignments.

Use unnamed structure instead of `values`.

Redefine what 'custom' orientation means.

Move alignment test-only code into the tests.

Ensure gyro/mag custom alignment settings follow the enum variations.

This can't be applied to ALIGN_DEFAULT because, in the case of the MAG,
the default isn't actually known until the gyro is detected, see
`compassDetect`.

OMNIBUSF4/F7 - Don't use ALIGN_DEFAULT in target.h,
common_defaults_post.h does this now.

Comment cleanup.

Delete unused alignment code left from various tests/refactoring
efforts.

* Please do not squash this commit.

Fix SITL build by avoiding structure assignment with anonymous inner
struct.

The error from the build server was as follows:

```./src/main/common/sensor_alignment.c:49:5: error: missing initializer
for field ‘yaw’ of ‘struct <anonymous>’
[-Werror=missing-field-initializers]
     *sensorAlignment = CUSTOM_ALIGN_CW0_DEG;
     ^
In file included from ./src/main/common/sensor_alignment.c:27:0:
./src/main/common/sensor_alignment.h:80:17: note: ‘yaw’ declared here
         int16_t yaw;
                 ^
```

Cleanup sensor_alignment API.
2019-07-13 11:51:20 +12:00
Bruce Luckcuck
4a7cfeb34f Expose camera control button resistance values
Allows fine tuning of the voltage divider resistance values for each button to account for slight variances amongst cameras. Also allows manual configuration for non-standard cameras. Resistance values are in 100ohm steps.
2019-07-10 09:52:20 -04:00