1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-16 12:55:19 +03:00
Commit graph

131 commits

Author SHA1 Message Date
Michael Keller
3fc6906fa3
Merge pull request #6363 from mikeller/add_rc_smoothing_msp
Added RC smoothing parameters to MSP.
2018-07-18 00:35:30 +12:00
mikeller
aff5653981 Changes for an improved UX. 2018-07-17 18:34:06 +12:00
mikeller
df55fc99ec Added MSP for reboot to MSC. 2018-07-17 18:34:06 +12:00
mikeller
334117a4f0 Changes from review. 2018-07-17 01:36:36 +12:00
mikeller
7fe0c8f892 Added RC smoothing parameters to MSP. 2018-07-17 01:36:36 +12:00
Michael Keller
8607b1c38b
Merge pull request #6038 from supiiik/master
MSP for smart_feedforward and throttle boost
2018-07-17 01:26:48 +12:00
mikeller
30a51e2023 Removed legacy 'MSP_BF_CONFIG' and 'MSP_SET_BF_CONFIG' MSP commands. 2018-07-15 23:49:23 +12:00
AirBreak69
91ac74ca9c
Scale MSP altitude back to 1m per lsb as it was before RTH 2018-06-18 23:16:52 +02:00
AirBreak69
ff366098e5
Deleted extra 32bit altitude in msp 2018-06-14 20:58:41 +02:00
AirBreak69
ecc89d1ba1
Compensate 10x altitude resolution before transferring via MSP
GPS_RESCUE and subsequent changes increased gpsSol.llh.alt from 0.1m per lsb UNIT16 to 0.01m per lsb INT32.
The transfer of altitude data via MSP had to be corrected by factor 10 rescalings to be backwards compatible.
2018-06-14 01:31:24 +02:00
AirBreak69
84ee9c624c
Reverted change and added 32bit versions of gpsSol.llh.alt 2018-06-13 01:25:59 +02:00
AirBreak69
536ad399e6 GPS: handle negative and high altitudes; safer macros in maths.h
Fixes underflows at negative altitude (below MSL) and overflows at altitude higher than 655.35m
Corrected parenthesis in maths.h avoid incorrect equations if arguments contain expressions.
2018-06-12 00:02:29 +02:00
mikeller
5c2f598357 Added 'dshotBeaconOffFlags' to MSP. 2018-06-10 11:20:28 +12:00
Miguel Angel Mulero Martinez
9c6603fae9 Add new range for gyro lpf 1 into MSP 2018-06-05 08:19:24 +02:00
supiiik
4369605caf
Merge pull request #2 from betaflight/master
merge
2018-06-04 12:35:46 +02:00
supiiik
1d22cf70b3 MSP for smart_feedforward and throttle boost
Added 3 new MSP values: throttle boost and smart feedforward
2018-06-03 13:53:10 +02:00
mikeller
75693fbd5b Added defaults and MSP support to filter settings. 2018-06-03 22:44:42 +12:00
Michael Keller
f37a8184d5
Merge pull request #5891 from mikeller/add_disable_rx_loss_dshot_beacon_option
Implemented 'beacon' command in CLI.
2018-06-01 21:51:57 +12:00
mikeller
432f330e60 Fixes from review. 2018-05-31 23:25:03 +12:00
mikeller
0bf4708033 Added support for signing board / serial number. 2018-05-31 23:25:03 +12:00
mikeller
a101a58b68 Added ability to set and check board info. 2018-05-31 23:25:03 +12:00
mikeller
7e8f261436 Implemented 'beacon' command in CLI. 2018-05-31 01:48:27 +12:00
Cleric-K
e17abc4063 Failsafe switch choosable behavior #5994
The `failsafe_kill_switch` parameter has been renamed to
`failsafe_switch_mode` and it determines what happens
when the Failsafe mode is activated with an AUX switch.
It takes one of three values:
  0 - simulates RC signal loss - thus activates Stage1 failsafe
      (former behavior when kill switch option was OFF)
  1 - disarms immediately
      (former behavior when kill switch option was ON)
  2 - activates the failsafe procedure (Stage2) immediately (new)
2018-05-29 23:28:09 +03:00
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
David-VG
42f1d51f83 Fix MSP for GPS Rescue's build for some targets 2018-05-23 22:55:43 +02:00
David-VG
3993ea88d3 MSP for GPS Rescue 2018-05-23 22:05:43 +02: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