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

55 commits

Author SHA1 Message Date
jflyper
1a035aa0f3 Create a pg for rxSpiConfig 2018-05-27 13:13:20 +09:00
jflyper
041bfb22c6 Create a pg for rxConfig 2018-05-27 09:13:04 +09:00
supiiik
cc12dddedb Indentations repaired 2018-05-23 15:55:07 +02:00
supiiik
8a1c5e5e74 small fixes, MIN for 8bit MSP 2018-05-23 14:36:23 +02:00
supiiik
4312513a77 MSP changed
Changed MSP, all new data are at the end
2018-05-23 13:33:43 +02:00
supiiik
76e3e7aded dterm_setpoint_weight to uint16_t
dterm_setpoint_weight changet to uint16 with limit 0-2000
2018-05-23 08:39:45 +02:00
s0up
de5fa47c4c navigation feature / reference removal 2018-05-09 10:28:36 -07:00
Bruce Luckcuck
905f14d86c Change enabled OSD stats storage to bitmap
Previously the flags controlling the enabled OSD stats were stored as an array of boolean. This change reduces config storage by storing the flags as bits inside a single uint32.
2018-05-07 12:07:25 -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
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
0cb6205f05 Don't call flashfsGetOffset if device is not found or unsupported. (#5684) 2018-04-16 22:32:58 +12:00
Míguel Ángel Mulero Martínez
4e024f5467 Fix MSP Flash FS supported (#5670) 2018-04-15 12:29:49 +12:00
Míguel Ángel Mulero Martínez
802edf236b Fix Blackbox P interval (#5645) 2018-04-10 00:35:54 +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
Míguel Ángel Mulero Martínez
7ad4bbfa0f Simplify the precompiler condition for MSP_VOLTAGE_METERS (#5554)
... and MSP_CURRENT_METERS
2018-03-28 08:11:08 +13:00
Míguel Ángel Mulero Martínez
8095d3442c Fix MSP_VOLTAGE_METERS and MSP_CURRENT_METERS (#5547)
Only sustract the unused voltage/current meters from ESC when
USE_ESC_SENSOR is defined
2018-03-28 03:34:53 +13:00
AJ Christensen
46291a8374 Dual-stage Gyro Filtering: PT1, Biquad, Butterworth, Denoise (FIR), FKF (fixed K), and Biquad RC+FIR2 (#5391)
* Dual-stage Gyro Filtering: PT1, FKF, and Biquad RC+FIR2

* Builds on the previous work of apocolipse.
* Fixes 'stage2'/'stage1' mis-naming to reflect where it is applied in the loop.
  That is, the older Biquad, PT1, Denoise (FIR) filters are 'stage2' - applied
  after dynamic and static notches (if enabled), and the controversial PT1,
  'fast Kalman' filter, and Biquad RC+FIR2 filters, are 'stage1'. e.g. before
  dynamic notch.
* FKF bruteforce Kalman gain removed. Calculate from half of PT1 RC constant,
  automatically taking loop-time into account.
* New union type definition for stage1 filtering.
* New gyro sensor members for stage1 filter application function and states for
  all three supported filter types
* New enum types for stage1 v. stage2. dterm lowpass type references 'stage2'.
* updates to CMS/MSP/FC to allow compilation (untested, probably breaks
  MSP, Lua, and ~comms with BFC~).
* Refactors FKF initialization, update and associated structures to be faster by
  not continuously calculating 'k'. Filter gain is calculated once during
  initialization from RC constant as per PT1 and Biquad RC+FIR2. It was
  discovered this converges to static value within 100 samples at 32kHz, so can
  be removed. Remove related interface (CLI) settings.
* update dterm_lowpass_type to use new 'TABLE_LOWPASS2_TYPE' (biquad/pt1/FIR)
* Stage 1 defaults to PT1, 763Hz (equivalent to Q400 / R88 from quasi-kalman
  filter) - suitable for 32kHz sampling modes. Can be switched to Biquad
  RC+FIR2, and FKF.
* Update `#if defined(USE_GYRO_SLEW_LIMITER) to `#ifdef`.
* Includes optional Lagged Moving Average 'smoothing' pipeline step, applied (in
  code) after the output of stage1.
* (diehertz): Removed redundant pointers from gyro filtering

* blackbox: fix indentation

* cms IMU menu: fix indentation

* filters: remove USE_GYRO_FIR_FILTER_DENOISE in filter type enum

* gyro sensors: go back to `if defined()` form. for slew limiter

* gyro sensors: increment parameter group version

* due to non-appending changes, the version must be bumped.
2018-03-21 15:52:59 +13:00
ctzsnooze
ab231b7c84 Second dterm pt1 (#5458)
* Second PT1 on DTerm

This PR replaces the default biquad filter with a second PT1 set to
200Hz.

Basically allows the user to enable a second, set point configurable,
PT1 type first order low-pass filter on DTerm.

This is useful because most noise in most logs arises from D, not P.

The default is set to on, at twice the normal Dterm setpoint.  This
provides greater Dterm cut than a single PT1, and twice the steepness
of cut above the second setpoint.  Modelling shows significant
reductions in higher frequency Dterm noise with only minor additional
delay.

The improvement in noise performance will be less than for biquad, but
the delay is considerably less.

If with the default settings the overall noise improves a lot, it may
be possible bring D both filtering set points to higher numbers (e.g.
140/280), or alternatively remove other filters such as the notch
filters, while maintaining an adequate level of control over noise.

* Update names, old defaults, fix whitespace

Defaults restored to biquad with second PT1 off.  ‘lpf’ retained as
abbreviation for values, otherwise generally remove ‘Filter’ where
redundant, replace ‘FilterLpf’ with ‘Lowpass’, etc, thanks Fujin and
DieHertz

* Remove underscore in lowpass_2, add hz to setpoint for lowpass

Thanks DieHertz

* completed replacing lpf with lowpass, added _hz to all lowpass set points in profile

Thanks DieHertz

* fix whitespace

fixed whitespace in settings.c

* whitespace attempt #57

* change lpf to lowpass where appropriate elsewhere

Note did not change OSD abbreviations, they are still LPF, and did not
change gyro_lpf anywhere.

* second attempt at a simple PT1 implementation

Basically copied from the DtermNotch implementation

* Second PT1 on DTerm

This PR replaces the default biquad filter with a second PT1 set to
200Hz.

Basically allows the user to enable a second, set point configurable,
PT1 type first order low-pass filter on DTerm.

This is useful because most noise in most logs arises from D, not P.

The default is set to on, at twice the normal Dterm setpoint.  This
provides greater Dterm cut than a single PT1, and twice the steepness
of cut above the second setpoint.  Modelling shows significant
reductions in higher frequency Dterm noise with only minor additional
delay.

The improvement in noise performance will be less than for biquad, but
the delay is considerably less.

If with the default settings the overall noise improves a lot, it may
be possible bring D both filtering set points to higher numbers (e.g.
140/280), or alternatively remove other filters such as the notch
filters, while maintaining an adequate level of control over noise.

* Rebase

* Remove underscore in lowpass_2, add hz to setpoint for lowpass

Thanks DieHertz

* completed replacing lpf with lowpass, added _hz to all lowpass set points in profile

Thanks DieHertz

* fix whitespace

fixed whitespace in settings.c

* whitespace attempt #57

* change lpf to lowpass where appropriate elsewhere

Note did not change OSD abbreviations, they are still LPF, and did not
change gyro_lpf anywhere.

* second attempt at a simple PT1 implementation

Basically copied from the DtermNotch implementation

* Whitespace fix - thanks, Ledvinap

* Fix PG issue

by moving added dterm_lowpass2_hz to bottom of struct

* Got rid of redundant indirection

* Fixed indentantion shifts
2018-03-21 01:40:23 +13:00
Míguel Ángel Mulero Martínez
44b19f3cdb Fix MSP values of the MAG (#5451)
The MAG only shows positive values in the configurator. This fixes it.
2018-03-16 08:09:13 +13:00
Michael Keller
b0e3da51ea
Merge pull request #3031 from cleanflight/fix-osd-slave-settings (#5424)
CF/BF - Fix OSD slave settings not being saved/reset.
2018-03-15 02:39:26 +13:00
jflyper
85b922383b MSP_RAW_IMU to convert accADC from float to integer (#5417) 2018-03-15 02:24:39 +13:00
jflyper
416495e17a Convert BEEPER to USE_ scheme (#5433) 2018-03-11 09:28:08 +13:00
Alberto García Hierro
88dcaa95ef Output more information in MSP_BOARD_INFO (#5206)
* Append the target name to the response of MSP_BOARD_INFO

This allows MSP clients to retrieve the actual target name, which
is useful for e.g. automatically upgrading the firmware on a board
without asking the user to select the target manually or to present
a warning dialog if we detect the user has chosen the wrong target.

* Output wether a board uses VCP in MSP_BOARD_INFO

This allows the configurator to detect if the board uses VCP
without using an external list of boards.

* Use a single bit to output wether the board uses VCP

This lets us use the remaining 7 bits for other flags.
Also, output if the board has softserial support using the next
bit.
2018-03-04 11:38:30 +13:00
Michael Keller
9bcc6aca8e
Revert "BEEPER Conversion to use USE_ scheme" (#5368) 2018-03-04 09:40:17 +13:00
jflyper
bf11921dc0
Merge pull request #5285 from jflyper/bfdev-convert-beeper-to-USE_-scheme
BEEPER Conversion to use USE_ scheme
2018-03-03 23:22:56 +09:00
Hydra
2c12a8fe52 CF/BF - Fix 'unused variable disableRunawayTakeoff' warning when
building CJMCU.
2018-03-03 01:34:01 +01:00
jflyper
ea0db878bf Convert to USE_ scheme 2018-03-02 22:29:40 +09:00
Bruce Luckcuck
84db8ef3fc Removed duplicate legacy gyro_lpf validation from msp.c
Additional validation in msp.c was resetting the gyro and pid denoms incorrectly under the assumption that any non-zero gyro_lpf value means the gyro is in 1KHz refresh rate.  The correct validation is already been performed by fc/config.c so the extra legacy validtions are not needed.
2018-02-20 14:38:28 -05:00
Bruce Luckcuck
17aeaa3ee0 Runaway Takeoff Prevention - temporarily disable during configurator bench testing
Temporarily disables Runaway Takeoff Prevention when the `ARMING_DISABLED_MSP` flag is cleared in the configurator by switching the safety switch on the motors tab.  Allows bench testing the motors and flight controller response without triggering a runaway takeoff auto-disarm.

Requires coordination with the configurator to pass an extra runaway takeoff temporary disable flag with the MSP_ARMING_DISABLE msp command.
2018-02-14 09:09:30 -05:00
Bruce Luckcuck
076ad942e4 Disarm when configurator sets ARMING_DISABLED_MSP arming disabled flag
Addresses an edge case where the user could turn on the safety switch (on motors tab), arm and spin the motors, and then turn off the safety switch (without disarming first).  In this scenario the motors would keep spinning even though the ARMING_DISABLED_MSP arming disabled flag would be set.

This change checks the arming state and disarms when the configurator sets the ARMING_DISABLED_MSP flag.
2018-02-13 09:51:50 -05:00
Michael Keller
8738e7d623
Merge pull request #5092 from etracer65/airmode_activate_3d_fix
Change airmode activation to be throttle percent based to fix 3D mode
2018-02-02 02:59:14 +13:00
Michael Keller
666c2980e9
Merge pull request #5000 from martinbudden/bfa_vtx_tidy
Corrected VTX vtables to not use static device handle
2018-02-02 01:16:54 +13:00
Michael Keller
2fef637905
Merge pull request #5089 from basdelfos/msp-changes-bfc
BF 3.3 configurator changes
2018-02-02 00:51:45 +13:00
Bruce Luckcuck
bed1c03f70 Airmode 3D activation fix requested changes
Formatting changes and correction to update the PG version.
2018-02-01 06:50:11 -05:00
Martin Budden
e2683cd2dc Corrected VTX vtables to not use static device handle 2018-02-01 11:15:07 +00:00
Bruce Luckcuck
003979a2eb Change airmode activation to be throttle percent based to fix 3D mode
The previous logic used an absolute throttle value of 1350us which won't work in 3D mode and resulted in airmode being activated on arming.  Renamed the parameter to airmode_start_throttle_percent and set the default to 32 (equivalent to what the previous setting of 1350 when min_check is taken into account).

To preserve MSP functionality the value is transformed to/from microsecond values (32 becomes 1320) when interfaced.
2018-01-31 22:40:56 -05:00
Bas Delfos
40b6bda25e Added remaining bytes check 2018-01-31 23:29:26 +01:00
Bas Delfos
ff68f0da0d Added DSHOT beacon config to MSP_(SET_)BEEPER 2018-01-31 23:12:08 +01:00
Steffen Windoffer
45a6588eaf remove setting which disallow disarming on throttle above low 2018-01-30 23:48:54 +01:00
Martin Budden
e7cac0e9c6 Always use arming disable flag names 2018-01-21 14:15:49 +00:00
mikeller
ee65eba88d Added selectable RaceFlight rates. 2018-01-19 00:38:14 +13:00
mikeller
385623bd9d Converted defines for VTX_COMMON, VTX_CONTROL, VTX_RTC6705, VTX_RTC6705SOFTSPI, VTX_TRAMP, VTX_SMARTAUDIO to use USE_ prefix. 2018-01-09 17:34:34 +13:00
Martin Budden
d90b42970c Acc fn/variable renames to align with iNav 2017-12-29 10:23:51 +00:00
mikeller
2d930b28ce Moved vcd parameter group to pg/. 2017-12-24 15:13:48 +13:00
Martin Budden
671382234a Enabled switch fallthrough checking by compiler 2017-12-23 19:46:40 +00:00
jflyper
11c47c631b Port iNav's rangefinder 2017-12-20 12:54:19 +09:00
mikeller
b489d0ba9d Renamed 'parameter_group' to 'pg'. 2017-12-19 23:36:31 +13:00
jflyper
db014752d7 Convert TRANSPONDER to USE_xxx scheme 2017-12-11 02:49:00 +09:00
Alberto García Hierro
59f8ee0d15 Fix MSP code in switch for MSP_SET_TX_INFO
Case was handling MSP_TX_INFO which is an out command and already
handled in mspProcessOutCommand. This case should handle MSP_SET_TX_INFO
2017-11-28 13:15:33 +00:00