1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-14 03:50:02 +03:00
Commit graph

180 commits

Author SHA1 Message Date
Michael Keller
5d7017c245
Merge pull request #5959 from mikeller/remove_unneeded_include
Removed unneeded include (that was breaking layering as well).
2018-05-26 23:54:10 +12:00
mikeller
d535fd6180 Renamed 'gpsRescue' to 'gpsRescueConfig' and moved it into the appropriate location. 2018-05-26 15:28:08 +12:00
jflyper
f9a43099db SPI CS preinit for configurability 2018-05-24 22:00:26 +09:00
mikeller
8fb75adbed Removed unneeded include (that was breaking layering as well. 2018-05-24 21:27:25 +12:00
Michael Keller
7ab2d0c7fd
Merge pull request #5935 from etracer65/cli_get_display_default
Add default display to cli get command if value has been changed
2018-05-23 22:09:55 +12:00
Bruce Luckcuck
361af53c2b Refactor to support target specific defaults
Also remove redundant call to targetConfiguration()
2018-05-22 17:34:39 -04:00
Bruce Luckcuck
40a88ada81 Abstracted the PG backup and restore for use in multiple places 2018-05-21 21:31:01 -04:00
Bruce Luckcuck
fc2f01cdf7 Add default display to cli get command if value has been changed
Presents the user with the default value for reference when displaying a parameter with the "get" command - but only if the current value differs from the default.
2018-05-21 17:25:20 -04:00
jflyper
b12a4270ba Add compass exit configurability 2018-05-21 12:03:11 +09:00
Michael Keller
dd151b3636
Merge pull request #5914 from etracer65/cli_cmd_feedback
Add responses for cli commands that were missing them for consistency
2018-05-20 00:31:57 +12:00
Bruce Luckcuck
119571f77e Add responses for cli commands that were missing them for consistency
Most cli commands give some feedback if the command was successful. However a few did not return a response to provide an indication that the command was successful. This change adds feedback responses for the following commands:

adjrange
color
led
rxrange
serial
servo
vtx
2018-05-17 18:05:40 -04:00
Bruce Luckcuck
4423bf9018 Ignore leading whitespace for cli command parameters 2018-05-17 15:48:14 -04:00
jflyper
20b187fea9 Add handling of array of pg structures in cli resource command. 2018-05-16 01:06:29 +09:00
s0up
de5fa47c4c navigation feature / reference removal 2018-05-09 10:28:36 -07:00
Bruce Luckcuck
aa4a8c7ec1 Add cli parameter bit setting type
Adds a new parameter mode `MODE_BITSET` that allows associating a cli parameter with a specific bit in a stored value. Bit packed values can be exposed with individual cli parameters for each bit as needed. Supports UINT8, UINT16 and newly added UINT32 data types (UINT32 not supported for other modes at this time).
2018-05-06 18:33:11 -04:00
blckmn
6d33fc6b0b Fixed CC Channel versus Index issue, and added additional mapping in timerHardware for 7X2 target 2018-05-06 12:00:31 +10:00
blckmn
e5031407a6 Configurable timers 2018-05-06 12:00:31 +10:00
Michael Keller
8f50aad585
Merge pull request #5809 from jirif/rx_rate_calculation
Fix rx rate calculation when using fport
2018-05-05 18:34:59 +12:00
Michael Keller
b0ee38d77b
Merge pull request #5807 from etracer65/gyro_both_validation
Only allow gyro_to_use = BOTH if both detected gyros are the same type
2018-05-05 18:34:42 +12:00
Michael Keller
65d9e08f1b
Merge pull request #5783 from jflyper/bfdev-max7456-busdevice-conversion
MAX7456 Increase (re)configurability
2018-05-05 18:32:02 +12:00
Bruce Luckcuck
34bdfc00e7 Update gyroregisters cli command to display both gyros
If gyro_to_use = BOTH, then display the registers for both active gyros.
2018-05-04 11:46:05 -04:00
Diego Basch
c46be03047 added gps for altitude estimation, remove most unused code, rename altitude.c to position.c, add hdop to nmea 2018-05-04 08:45:26 -07:00
jflyper
944a2986a5 Use busDevice_s for reconfigurability 2018-05-04 17:09:56 +09:00
jirif
fa40fbe865 Fix RX rate calculation when using fport 2018-05-04 07:45:47 +02:00
blckmn
a9f74cd6df Removed excess trailing spaces before new lines on licenses. 2018-04-25 20:58:00 +10:00
blckmn
46fe22b4bd Direct license replacement 2018-04-22 09:22:46 +10:00
jflyper
f9f05ecad5 FLASH Full (re)configurability (#5720) 2018-04-20 07:55:17 +12:00
SteveCEvans
6f088d0fd2 Add PID adjustment from AUX transmitter channel (#5584)
* Scale PIDs using aux channels

* Add control via variables and documentation

* Use USE_TXPID

* Removed OWNER_TXPID

* Use PWM_RANGE_MIDDLE

* Fix typos

* Move Tx PID arrays into pidProfile_t

* Move macro to pidUpdateRate function

* Enable TXPID on REVONANO

* Add support for direct setting of adjustments from aux channel

* Change variable name from adjustmentScale to adjustmentScale to avoid confusion

* Update documentation

* Change variable name from adjustmentScale to adjustmentScale to avoid confusion

* Only adjust settings if adjustment channel has changed value

* Fix formatting

* Use pidAudioModes_e type in ADJUSTMENT_PID_AUDIO setting. Only allow absolute override of settings of ADJUSTMENT_MODE_STEP.

* Add example 6

* Fix checking of adjustment mode

* Fix USE_PID_AUDIO code. Broke SPRACINGF7DUAL.
2018-04-18 00:23:44 +12:00
Michael Keller
fbd8f07440
Fixed help text for 'diff defaults'. (#5668) 2018-04-11 23:32:32 +12:00
jflyper
d749879cf6 FAT emulation of onboard flash for MSC (#5650) 2018-04-11 11:29:56 +12:00
Chris
9d5fa7311e Add MSC for F7 (#5629)
* Add MSC for F7

* Fix compilation error.
2018-04-06 12:53:26 +12:00
Michael Keller
b5c0076bc8
Added USE_ESC_SENSOR_INFO define, cleaned up USE_ESC_SENSOR define. (#5580) 2018-04-01 11:33:07 +12:00
Michael Keller
c3cb2e1605
Fixed CLI array assignment. (#5589) 2018-04-01 10:57:19 +12:00
Michael Keller
83e614c139
Made MSC initialisation pin configurable. (#5535) 2018-03-27 01:04:59 +13:00
Michael Keller
a8e86880f5
Generalised USB MSC use for all F4 targets with SD card. (#5519) 2018-03-24 16:00:53 +13:00
Michael Keller
5dc23e662f Fixed display of CLI lookup options. (#5493) 2018-03-22 09:40:49 +03:00
etracer65
062ef77276 Rework gyro sample rate and DLPF configuration and expose additional filter cutoffs (#5483)
The old gyro_lpf setting was based on the DLPF_CFG values for the MPU6050 gyro and the enumeration was inaccurate and misleading.  For example, the default "OFF" setting did not disable the DLPF, but actually set it to around 250hz.  The actual cutoff frequency for each setting varies by gyro hardware so the literal frequencies in the enumeration were also incorrect.

Removed gyro_lpf and replaced it with gyro_hardware_lpf (8KHz) and gyro_32khz_hardware_lpf (32KHz).  The parameters were renamed to indicate that they are hardware filtering options to differentiate from the many software lowpass filtering options.

gyro_hardware_lpf - This parameter sets the filtering and sample rate options for 8KHz gyros (or 32KHz capable gyros running in 8KHz mode).

- NORMAL - default setting that is equivalent to the previous "OFF" setting.  Configures 8KHz sampling with ~250Hz filter cutoff.
- EXPERIMENTAL - 8KHz sampling with a higher frequency filter cutoff (around 3000hz).  Considerably more noisy and requires additional software filtering.  Note that for the MPU6000 Invensense doesn't officially document the filter cutoff frequency for this selection and simply lists it as "reserved".  In testing it's clear that a higher frequency filter cutoff is being selected due to the increased noise, but the actual cutoff frequency is unknown.
- 1KHZ_SAMPLING - 1KHz sample rate with and approximate 188Hz filter cutoff.

Note that the following additional 1KHz sample rate options with lower filter cutoffs have been eliminated - "98HZ", "42HZ", "20HZ", "10HZ", "5HZ".  It seems unlikely that these are still needed are probably no longer viable and flight performance would be very poor.

gyro_32khz_hardware_lpf - This parameter sets the filtering options while running in 32KHz mode on capable gyros.  It also exposes a new high frequency filter cutoff mode.

- NORMAL - The default and matches the current settings used for 32KHz mode.  Provides a filter cutoff around 3000Hz.
- EXPERIMENTAL - Selects a filter cutoff around 8000Hz.  This is a very noisy setting and will require substantial software filtering.

The default values for both 8KHz and 32KHz sample rates were chosen to match the previous defaults and users should not experience any performance differences.

Normalized the gyro initialization.  Previously there was little consistency on how the initialization was performed and the settings interpreted.  For example, MPU9250 used a completely different logic tree when configuring the registers.

Disconnected the literal parameter value from the gyro initialization.  The gyro_lpf parameter contained a number from 0-7 that was literally applied to the configuration register during the gyro initialization.  This caused some older gyro initializations to be incorrect as they used a different register layout (MPU3050 and L3G4200D).  By transitioning to a logical selection the actual value applied to the hardware register is abstracted.  This will better future-proof the design as new gyros may have a different register structure that may be incompatible with the old method.

Added a gyroregisters command to the CLI that is used to read the current register settings from the gyro and dump them to the CLI.  This is used to verify the configuration in comparison to the datasheets for the various gyros.  Testing empirically by looking at the relative noise from the gyros can give a rough estimate whether the different options are selecting correctly, but it's not very precise.  The code for the gyroregisters CLI command is wrapped inside #ifdef USE_GYRO_REGISTER_DUMP blocks to allow easy disabling.  It's currently enabled for all targets but we may decide to disable before release or only limit to targets with more available space (>=F4).
2018-03-22 14:02:30 +13:00
Michael Keller
09f52d420d Allow the use of NULL values in CLI lookup tables. (#5489) 2018-03-21 20:13:02 +03:00
conkerkh
3a917a3755 Add USB Mass Storage Class support (#5443)
* Add MSC support

* Add support for MSC to WORMFC and SDIO_DMA

* Cleanup in fc_init

* Fix headers
2018-03-22 00:11:34 +13:00
SteveCEvans
5558174d33 Support programming of Arduino devices in serial passthrough mode (#5129)
* Support DTR in serial passthrough mode to enable programming of Arduino
based devices such as MinimOSD.

Use 'serialpassthrough 5 57600 rxtx 56' and then use Ardino to program MinimOSD
Use 'serialpassthrough 5 115200' and then use MWOSD configurator to setup

* Fix comment for CDC_SetCtrlLineStateCb routine

* Handle F7 CDC interface

* Use strToPin() to allow easy port/pin specification

* Fix use of CDC_SetCtrlLineStateCb for all processor types

* Only set baud when specified

* Fix unit tests for cli

* Only register callback if needed

* Fix white space

* Provide implementation of IOConfigGPIO in SITL

* Update serialpassthrough help text

* DTR handling through serial drivers

* Fix F3, F7 and SITL builds

* If serialpassthrough command specifies baud rate of 0, set baud rate over USB. MWOSD configurator can now access config and reflash MinimOSD without rebooting and changing baud rate.

* Fix F3 build

* Fix failing unit tests

* Use resources to declare DTR pin assignment

* Don't assert DTR during normal operation as MW_OSD doesn't like it

* MW_OSD must be built with MAX_SOFTRESET defined in order to support DTR resets

* Minimise changes after dropping DTR pin param from serialpassthrough cmd

* Remove DTR pin param from serialpassthrough cmd

* Treat ioDtrTag as boolean in conditional statements

* Tidy buffer check

* Check buffer size in CDC_Itf_Control

* Fix unit test

* Add documentation for DTR

* Add note on MAX_SOFTRESET to documentation

* Remove superfluous function definitions

* Fix tabs

* Fix tabs

* Removed superfluous entried from vtable

* Backout whitespace changes unrelated to this PR

* Pass true/false to IOWrite()

* Fix line coding packing

* Add LINE_CODING structure defintion

* Revise serial documentation

* Prevent tx buffer overflow in serialPassthrough()

* Revert change unrelated to PR

* Review feedback from ledvinap

* Fix unit test

* Use PINIO to drive DTR

* Fix unit test

* Remove change unrelated to PR

* Fix SITL build

* Use shifted bits for mask definition

* Fix serialpassthrough documentation

* Only compile PINIO functionality if USE_PINIO defined

* IOConfigGPIO not needed

* Move cbCtrlLine callback to cli.c

* serialPassthrough params changed

* Check packed structure size

* Fix unit test

* Tidy up baud rate handling
2018-03-21 23:17:31 +13:00
etracer65
0e051bebb2 Simplify CLI case-insensitive by using new strcasestr() (#5449)
Remove string lowercase function from cli.c and use the new strcasestr() added to string_light.c
2018-03-16 07:41:00 +13:00
jflyper
416495e17a Convert BEEPER to USE_ scheme (#5433) 2018-03-11 09:28:08 +13:00
etracer65
f97df6827e Change CLI "get" to be case-insensitive (#5382)
Matches the behavior of the "set" command.
2018-03-09 06:50:31 +13:00
etracer65
43d8f67db2 Fix diff support for array data types (#5366)
Previously diff would only compare the first element of an array type.  Changed valuePtrEqualsDefault() to make it array-aware and compare all elements to the defaults.
2018-03-04 01:38:01 +03:00
Michael Keller
9bcc6aca8e
Revert "BEEPER Conversion to use USE_ scheme" (#5368) 2018-03-04 09:40:17 +13:00
jflyper
ea0db878bf Convert to USE_ scheme 2018-03-02 22:29:40 +09:00
jflyper
122a967c24 Core temperature can be negative 2018-02-28 08:06:53 +09:00
jflyper
8f76a11081 Generic pin output driver 2018-02-11 15:57:28 +09:00
Michael Keller
ec4b3b0d60 Revert "CAMERA_CONTROL Drop software PWM mode" 2018-02-11 12:33:00 +13:00
Michael Keller
0a18daa5c8
Merge pull request #5121 from blckmn/sdcard_fix
Fixed error in SDCARD_SPI_CS_PIN define check
2018-02-08 22:45:46 +13:00