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

12526 commits

Author SHA1 Message Date
Bruce Luckcuck
5b3fd2d08f Disable dynmaic idle if RPM filter is not enabled
The addition of previous checks of bidirectional DSHOT being enabled were not sufficient. Additionally RPM filter must also be active (harmonics > 0) for dynamic idle to determine the minimum motor RPM and function correctly.
2020-04-22 20:36:54 -04:00
Michael Keller
bf9cc615c5
Merge pull request #9720 from codecae/crsf_displayport_init_fix
Relocated CRSF CMS display port init from telemetry to fc
2020-04-23 00:39:08 +12:00
Michael Keller
1d8a0e9fd6
Merge pull request #9723 from rvdveen/lagged-avg-init-fix
Zero the movingSum and buffer for laggedMovingAverage to fix ff_interpolate_sp switches
2020-04-22 01:47:16 +12:00
Roy van der Veen
0d2920423b Zero the movingSum and buffer for laggedMovingAverage to prevent persistent error from being introduced on re-initialization 2020-04-20 17:21:01 +02:00
Michael Keller
10bac1fd17
Merge pull request #9719 from etracer65/dyn_idle_change_profile_fix
Fix dynamic idle safety issues
2020-04-20 23:13:52 +12:00
Michael Keller
e060a0d507
Merge pull request #9712 from etracer65/fix_blocking_dshot_command
Fix blocking DSHOT commands
2020-04-20 23:07:40 +12:00
Curtis Bangert
d76465e23a Relocated CMS Displayport init from telemetry to init 2020-04-19 15:48:56 -04:00
Michael Keller
7a856bfe23
Merge pull request #9698 from etracer65/link_quality_alarm_range
Fix osd_link_quality_alarm range
2020-04-20 02:15:42 +12:00
Michael Keller
50fa2b4d71
Merge pull request #9695 from jflyper/bfdev-fix-i2c2-sda-on-F446RE
Fix I2C2 SDA pin def for F446
2020-04-20 02:05:09 +12:00
Michael Keller
0fcd8e9250
Merge pull request #9701 from tstibor/fix_sizeof_ticker_chr_count
Determine correct size of TICKER_CHARACTER_COUNT
2020-04-20 01:47:03 +12:00
Michael Keller
ee5df72916
Merge pull request #9702 from tstibor/fix_declaration
Make sure function declaration and definition are equal
2020-04-20 01:42:10 +12:00
Bruce Luckcuck
52d0764d17 Fix dynamic idle safety issues
Fixes a problem with dynamic idle not checking for bidirectional DSHOT being enabled. So the code would run but have no RPM data available leading to elevated motor idle.

Fixes a problem with dynamic idle not resetting accumulated static variables that continue to be used when dynamic idle is switched off via a PID profile change. Depending on the state of the variables this could cause excessive motor idle speed. In some cases enough to cause the quad to spontaneously take off on arming or be unable to descend in flight.

Fixes a problem with dynamic idle inappropriately modifying the static `motorOutputLow` that is set based on the chosen motor protocol. Downstream code that relies on this value to determine the acutal motor output range was adversely affected.
2020-04-19 09:12:45 -04:00
Michael Keller
9ae3845919
Merge pull request #9705 from ctzsnooze/Increase-default-yaw-P
Increase default Yaw P to 45
2020-04-20 01:10:37 +12:00
Michael Keller
2451a615ff
Merge pull request #9706 from ctzsnooze/Increase-TPA-start-point-to-1350-from-1250
Increase TPA start point to 35% throttle
2020-04-20 01:09:50 +12:00
Michael Keller
5bf1a1d849
Merge pull request #9707 from ctzsnooze/Enable-expo-on-D-by-default-at-5
Enable expo on the D lowpass filter at 5
2020-04-20 01:08:57 +12:00
Michael Keller
4f2a6103bb
Merge pull request #9703 from IllusionFpv/add-rates-type-to-blackbox-header
Add rates_type to blackbox header
2020-04-18 23:53:16 +12:00
Bruce Luckcuck
c6c9ba7229 Fix blocking DSHOT commands
Motor and DSHOT refactoring broke blocking DSHOT commands as the check for commands being enabled was not taking into account that "blocking" type commands need to operate only when the motors are not enabled.

Fixes the CLI `dshotprog` command.
2020-04-17 08:29:24 -04:00
ctzsnooze
a3091751fe Enables expo on the D lowpass filter at 5
Most people who have tested IllusionFPV's expo on the dynamic D lowpass filter have found it to improve propwash without adverse effects.

It achieves this reducing D lowpass delay more quickly on throttling up.

This allows us to retain, at idle, the strong lowpass filtering we currently have, but quickly reduce lowpass delay and improve propwash by mid throttle.

A value of 5-7 is OK I'm proposing 5 as a conservative start.

I know this is a new feature but it is really good .  It would be great if it could be made active by default, if possible, in 4.2.
2020-04-15 10:28:29 +10:00
ctzsnooze
502f74b30a Increase TPA start point to 35% throttle
This should allow more D around the typical propwash points without adverse effects.  Probably 1250 was a bit too low.
2020-04-15 10:21:40 +10:00
ctzsnooze
9c99eed602 Default Yaw P to 45 2020-04-14 17:38:57 +10:00
Nicola De Pasquale
05dc3045ae add rates_type to blackbox header 2020-04-14 01:18:31 +02:00
Thomas Stibor
4e464058b2 Make sure function declaration and definition are equal 2020-04-13 19:33:14 +02:00
Thomas Stibor
bcc8a05978 Determine correct size of TICKER_CHARACTER_COUNT
Since tickerCharacters is a char pointer rather than a char array the
result is: sizeof(8) / sizeof(1).
However, desired
result is: sizeof(5) / sizeof(1).

See also following example:

const char *tickerCharacters = "|/-\\";
const char _tickerCharacters[] = "|/-\\";

int main(void)
{
	printf("%zu\n", (sizeof(tickerCharacters) / sizeof(char)));
	printf("%zu\n", (sizeof(_tickerCharacters) / sizeof(char)));

	return 0;
}

> gcc test.c -o test && ./test
8
5
2020-04-13 19:21:22 +02:00
jflyper
cbd9b0b599 Fix I2C2 SDA pin def for F446 2020-04-13 18:38:54 +09:00
jflyper
b291bc804c [H7] Fix/add timer IRQ handlers 2020-04-13 16:33:14 +09:00
Michael Keller
fde6c680b3
Merge pull request #9694 from etracer65/pid_process_denom_default_v2
Revise pid_process_denom default logic - 2nd try
2020-04-13 15:25:17 +12:00
Michael Keller
568c31a4f2
Merge pull request #9689 from mikeller/fix_missing_linefeed
Added missing linefeed after version in CLI.
2020-04-13 13:10:50 +12:00
Bruce Luckcuck
24849bce0e Fix link_quality_alarm range
This was missed during the transition to CRSF using a 0-100 range instead of 0-300.
2020-04-12 20:46:47 -04:00
Michael Keller
a2aa3f19f4
Merge pull request #9684 from etracer65/fix_cms_task_rate
Fix CMS task rate; correct cmsDeviceCount logic; coding style cleanup
2020-04-12 17:33:04 +12:00
mikeller
547f161d27 Added missing linefeed after version in CLI. 2020-04-12 15:18:45 +12:00
Bruce Luckcuck
fb034c22e7 Revise pid_process_denom default logic - 2nd try
Now with the motor protocol defaulting to DISABLED we can reimplement this.

Remove dependence on gyro type and base on MCU type.

The previous logic was based on expecting an 8K sampling gyro and would set an inappropriate loop time for other gyro types.

Change the logic to be based on the capabilities of the MCU which is more appropriate. We set the pid_process_denom default to the maximum recommended value for a given MCU.

The `pid_process_denom` will be defaulted as follows (assuming a 8khz gyro) based on MCU type:

MCU	`pid_process_denom`
F1:	8 (1khz)
F3:	4 (2khz)
F411:	2 (4khz)
Others:	1 (8khz)

Of course the final PID loop rate will be based on the native sample rate of the gyro.
2020-04-11 20:23:43 -04:00
Michael Keller
2101326a1d
Merge pull request #9619 from mikeller/add_motor_protocol_disabled
Added 'disabled' motor protocol and made it the default.
2020-04-11 12:41:18 +12:00
Michael Keller
5be62ca162
Merge pull request #9653 from mikeller/cli_print_custom_defaults_data
Parse and print custom defaults header data in CLI.
2020-04-11 12:29:13 +12:00
Michael Keller
337f176a11
Merge pull request #9675 from mikeller/fix_gyro_detection_time
Fixed unnecessarily long startup time due to gyro detection.
2020-04-11 12:28:53 +12:00
Bruce Luckcuck
9fa0c3bb1e Fix CMS task rate; correct cmsDeviceCount logic; coding style cleanup
The CMS task was configured to run at 60hz but there was limiting logic in place to restrict it to every 50ms (20hz). Remove the extra logic and simply run the task at 20hz.

There was incorrect logic that checked if `(cmsDeviceCount < 0)` to not run the task. Firstly `cmsDeviceCount` can never be < 0, and secondly the task should not run when it is 0 as that means there are no registered `displayPort` devices. Generally fix the logic to used `unsigned` for `cmsDeviceCount`. It can only ever be increaded (new device registered) and there is no mechanism to "unregister" a device.

Lots of coding style cleanup.
2020-04-10 10:01:51 -04:00
mikeller
b9462c386f Fixed inconsistency in ANGLE mode naming. 2020-04-08 13:24:34 +12:00
mikeller
489156602f Fixed unnecessarily long startup time due to gyro detection. 2020-04-07 22:20:04 +12:00
ctzsnooze
8f7db49515 increase dMin values 20,22 to 23,25 2020-04-06 18:07:59 +10:00
Thomas Stibor
b9ccc67f1d Fix buffer is accessed out of bounds
Fix out of bounds buffer problems caused by employing incorrect sizes
VOL_LABEL_LEN != 12 in bs->volume_label
FILE_NAME_SHRT_LEN + FILE_NAME_EXTN_LEN != 8 in entry->name
2020-04-05 07:22:52 +02:00
Michael Keller
4859e466f3
Merge pull request #9666 from ctzsnooze/Reduce-default-iterm_relax_cutoff-to-15
Reduce default iterm_relax_cutoff to 15 from 20
2020-04-02 13:44:03 +13:00
Michael Keller
98e3d291bf
Merge pull request #9663 from fgiudice98/fix-vbat-digits
Fix osd vbat digits
2020-04-02 13:40:56 +13:00
Michael Keller
eefb27818d
Merge pull request #9665 from ctzsnooze/Increase-default-D_Min-Gain
Increase D_Min gain to improve D behaviour on most quads
2020-04-02 13:40:45 +13:00
mikeller
7b845150af Parse and print custom defaults header data in CLI. 2020-04-02 01:51:33 +13:00
Michael Keller
1b5b06197b
Merge pull request #9657 from MadQ/CliFix
Fixed inconsistent CR/LF
2020-04-02 00:38:04 +13:00
mikeller
d1ac12eccd Added 'disabled' motor protocol and made it the default. 2020-04-01 20:33:29 +13:00
ctzsnooze
ba7dc48732 Reduce default iterm_relax_cutoff to 15 from 20 2020-04-01 10:41:14 +11:00
ctzsnooze
6f198b84ab Increase D_Min gain to improve D behaviour on most quads 2020-04-01 10:33:54 +11:00
fgiudice98
9093c46456 Fix osd vbat digits
IE was showing 4.9 instead of 4.09
2020-03-31 21:41:06 +02:00
jflyper
4892d7092c Add missing I2C2 pin for F446 2020-03-31 20:33:17 +09:00
MadQ
6de521fe21 Fixed inconsistent CR/LF so that the Configurator CLI code can be simplified. 2020-03-30 09:27:00 -04:00