Commit Graph

16058 Commits

Author SHA1 Message Date
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 18cc54992d
Merge pull request #9716 from mikeller/add_translators_to_readme
Added instructions for new translators to README.md.
2020-04-20 01:03:01 +12:00
mikeller bb24002a50 Added point about testing to Unified Target configuration creation instructions. 2020-04-19 02:42:11 +12:00
mikeller 17f9ba291a Added instructions for new translators to README.md. 2020-04-19 02:34:20 +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
Michael Keller 81dd5b28b0
Merge pull request #9696 from mikeller/fix_typo_in_readme
Fixed typo in README.md.
2020-04-18 23:36:46 +12:00
mikeller 276494c7e7 Fixed pull request template. 2020-04-18 19:01:55 +12:00
Michael Keller 7b0f4bde92
Merge pull request #9700 from jflyper/bfdev-h7-fix-timer-irq-handlers
[H7] Fix/add timer IRQ handlers
2020-04-18 18:30:32 +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
Bruce Luckcuck f688227db6 Only enable PINIOBOX task when needed
Previously the task was always enabled and there's no reason for it to be running if there are no boxID associations.

Saves a few cycles by not running. But has a bigger effect on the scheduler by minimizing the number of active tasks when possible.
2020-04-12 20:31:32 -04:00
mikeller fa4275603e Fixed typo in README.md. 2020-04-13 01:27:31 +12: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
Ian be791cb14f
Fix rssi_scale formula.
Change * to / in 
rssi_scale = 100 * 1000 / (rssi_fullsig - rssi_nosig)
to keep the scale near 100 instead of 100000..
2020-04-11 00:22:06 -06: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
Michael Keller 04bbaa8590
Merge pull request #9678 from mikeller/fix_angle_mode_inconsistency
Fixed inconsistency in ANGLE mode naming.
2020-04-10 00:57:07 +12:00
mikeller b9462c386f Fixed inconsistency in ANGLE mode naming. 2020-04-08 13:24:34 +12:00
Michael Keller 1dee491370
Merge pull request #9674 from ctzsnooze/increase-dMin-default
increase dMin values 20,22 to 23,25
2020-04-07 22:29:10 +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
Michael Keller 00f2e2a772
Merge pull request #9672 from tstibor/fix_out_of_bounds
Fix buffer is accessed out of bounds
2020-04-06 08:29:41 +12: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 cb8ab75475
Merge pull request #9654 from mikeller/add_4_2_release_freeze_announcement
Added announcement of the feature freeze for 4.2.
2020-04-05 00:41:08 +13:00
mikeller 4b1ec391a9 Added announcement of the feature freeze for 4.2. 2020-04-04 12:34:09 +13: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
Michael Keller b1ddfc2e76
Merge pull request #9662 from jflyper/bfdev-f446-add-missing-i2c-pin
Add missing I2C2 pin for F446
2020-04-02 00:35:47 +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