1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-16 04:45:24 +03:00
Commit graph

309 commits

Author SHA1 Message Date
Hans Christian Olaussen
90b155ce1d ELRS SPI Fix eeprom write and reboot for msp over telemetry 2022-05-01 01:04:52 +02:00
Hans Christian Olaussen
13cb7b4280 Fix non DSHOT protocols 2022-02-24 15:26:46 +01:00
ctzsnooze
2262dfc60e use Throttle Setpoint, not rcDATA(throttle), for TPA 2022-01-25 18:37:01 +11:00
Štěpán Dalecký
420fb85759 Fix bugs found by cppcheck 2021-12-28 21:32:27 +01:00
haslinghuis
eb881efba1
Merge pull request #11114 from limonspb/msp_request_sliders_calculations
MSP commands for calculating/requesting but not setting simplified tuning/values
2021-12-21 00:10:57 +01:00
Ivan Efimov
d5c31accdf FW sliders: separate MSP commands for requesting calculations but not applying them into the FW 2021-12-19 04:00:50 -06:00
Steve Evans
29d221502e Use peak tracking as default for task duration estimation rather than a moving average 2021-12-17 22:09:52 +00:00
Steve Evans
ab1baccc66 Track state execution time for OSD, baro, rx and GPS tasks and inform scheduler of next state execution time 2021-12-17 15:40:01 +00:00
ctzsnooze
7b0b8ee35d Retain dynamic idle settings, reduce dependencies 2021-11-25 15:58:36 +11:00
ctzsnooze
4a485b4f12 msp add feedforward max_rate_limit and jitter_factor
move params to one block, remove whitespace
2021-11-15 10:18:31 +11:00
ctzsnooze
99a7479b8c consistent gyro and dterm filter names 2021-09-27 09:12:00 +10:00
Michael Keller
3c5275190a
Merge pull request #10919 from ctzsnooze/New-PID-sliders 2021-09-27 01:00:37 +13:00
ctzsnooze
90a2057179 pid slider support with changed defaults 2021-09-26 15:05:05 +10:00
KarateBrot
3ee3b54ad6 Change RPM filter minHz limit
- Changed lower limit of minHz from 50 to 30
- Added fadeRangeHz to blackbox header
- Renamed variables to fit BF coding convention
- Renamed CLI commands respectively
2021-09-10 13:21:51 +02:00
J Blackman
afe49c480f
Merge pull request #10585 from knoopx/stuning-dmin-def
hide DMIN RATIO unless USE_D_MIN
2021-09-06 14:20:47 +10:00
Michael Keller
7a8b40a670
Merge pull request #10777 from ctzsnooze/move-feedforward-transtion-calculation 2021-09-04 16:56:37 +12:00
KarateBrot
8649f1003f Dynamic notch refactoring
+ added new parameter group for Dyn Notch
2021-09-01 12:39:21 +12:00
ctzsnooze
5863015354 ifdef condition consistently applied, field names consistent, pg ID updated 2021-08-30 09:33:12 +10:00
Steve Evans
432b80167f Added non-blocking SPI DMA support for access to FLASH for BB 2021-07-25 23:58:46 +01:00
Steve Evans
87c8847c13 New SPI API supporting DMA
Call targetConfiguration() once before config is loaded and again afterwards in case the config needs to be changed to load from SD card etc

Drop SPI clock during binding

Remove debug

Add per device SPI DMA enable

Fix sdioPinConfigure() declaration warning

Reduce clock speed during SPI RX initialisation
2021-07-25 12:40:25 +12:00
Victor Martinez
059e5a12fe disable s.tuning DMIN RATIO when USE_D_MIN is undefined 2021-07-21 13:11:51 +02:00
KarateBrot
1ae31fd3d5 Dynamic notch bandwidth back to Q
+ simplified frequency estimation
2021-06-11 00:16:21 +02:00
ctzsnooze
c26428232a msp and other small fixes 2021-05-25 08:29:32 +10:00
fgiudice98
590e876efc Adds blackbox fields_disabled_mask to msp 2021-05-16 14:00:15 +02:00
ctzsnooze
636d563abe major rc changes ctzsnooze 2021 2021-05-07 14:40:43 +10:00
Bruce Luckcuck
37dbbd0755 Add GPS coordinates OSD elements display variants; add support for Open Location Code display
Adds variations in GPS coordinate OSD element display:
1. Fractional degrees with 7 digits (default) - 000.0000000
2. Fractional degrees with 4 digits - 000.0000
3. Degrees, minutes, seconds - 000^00'00.0"E
4. Open Location Code (sometimed called Google Plus Code) - 23ABC4R8+M37

Uses Open Location Code library from:
https://github.com/google/open-location-code

Added support for `STATE(GPS_FIX_EVER)` to differentiate from having a fix now (`STATE(GPS_FIX)`) vs. ever having a fix.

Logic change to only display coordinates from the GPS module once a fix has been initially established. This prevents displaying interim coordinates supplied by the GPS while the fix is still being establised as these coordinates can be inaccurate by hundreds of miles. Once a fix is established initially then the coordinates will continue to be displayed even if the fix is lost or degrades in quality.

Add logic to "blink" the coordinates if the 3D fix is lost after initially being established. Alerts the user that the coordinate display may be inaccurate or no longer being updated. We want to keep the coordinates displayed to aid recovery if the user loses the fix (like crashing upside down).

Replace GPS defines `LAT` and `LON` used throughout the code with the enumeration:
```
typedef enum {
    GPS_LATITUDE,
    GPS_LONGITUDE
} gpsCoordinateType_e;
```

The Open Location Code option is bounded with `USE_GPS_PLUS_CODE` to allow it to be excluded if needed for targets with limited flash space. It currently fits for F411 but we may have to remove it in the future.
2021-04-26 23:43:11 +12:00
Michael Keller
5f2c29c725
Merge pull request #10661 from klutvott123/msp-bytes-remaining-check-fix
MSP fix bytes remaining check
2021-04-26 15:39:07 +12:00
Hans Christian Olaussen
e401a0b1ab MSP add GPS min rescue dth 2021-04-11 16:21:44 +02:00
Hans Christian Olaussen
8497762f50 MSP fix bytes remaining check
We need at least 2 bytes for dyn_notch_max_hz.
2021-04-02 21:37:54 +02:00
KarateBrot
d02af7334c Added tracking of multiple dynamic notches per axis and replaced FFT with SDFT 2021-03-24 17:09:28 +01:00
Bruce Luckcuck
84b6730cdd Separate OSD warnings from OSD task and make available via MSP
Provides a properly implemented way for MSP query type OSD implementations (like DJI) to display OSD warnings. Separates the warnings generation from the OSD task and shares common code to make the text available for the OSD and/or via MSP. Eliminates the need to implement hacks and workarounds like using the `CRAFT_NAME` field to display warnings. Since the warnings logic is now separate, the OSD task does not need to be running unlike other hacks.

Adds the `MSP2_GET_OSD_WARNINGS` message formatted as follows:
```
byte  description
0     Display attributes including blink (see displayPortAttr_e in drivers/display.h)
1     Length of warning text
2-n   Warning text characters
```
2021-02-13 14:11:38 -05:00
Nicola De Pasquale
19c85f3724 fix msp version in msp tuning sliders comments 2021-02-08 23:49:04 +01:00
Michael Keller
cad720abda
Merge pull request #10413 from limonspb/smartaudio_version
Added vtx device status to MSP
2021-01-10 08:23:30 +08:00
Michael Keller
243be1d216
Merge pull request #9119 from IvoFPV/add-tuning-sliders 2021-01-06 02:19:29 +08:00
Ivan Efimov
9db5b502b9 Added VTX device status to MSP 2021-01-03 20:55:25 -06:00
Michael Keller
7fc3c7cea6 Renamed 'tuning sliders' to 'simplified tuning'. 2020-12-26 14:26:56 +01:00
IvoFPV
cff19dc113 Implement tuning sliders, add to CMS, MSP 2020-12-26 14:26:50 +01:00
Michael Keller
0b81b26ce0 Fixed MSP command to send Dshot commands. 2020-12-15 16:12:11 +01:00
limonspb
fecf19b0d7 Dshot commands via MSP 2020-11-29 01:17:33 -06:00
ctzsnooze
8050ecd1e7 Mixer update: dynamic idle and throttle logging improvements
- all CLI parameters related to dynamic idle alone re-named with the `dyn_idle_` prefix
- when linear throttle scaling is active, the user's set idle value is now correct whether dynamic idle is on or off. Previously, the idle value fell when dynamic idle was activated at the same time as linear throttle scaling.
- enabling dynamic idle no longer causes a deadband at full throttle
- the setpoint throttle value sent to Blackbox does not include the dynamic idle offset
- the throttle value sent to the antigravity and dynamic lowpass code includes throttle scaling, but no other modifiers, to avoid false elevation of the apparent throttle position from dynamic idle and unnecessary transient changes in their filter cutoffs
- Dynamic Idle now uses a modified PI controller during active rpm control phase
- the D factor provides early detection of rapid falls in rpm, e.g. in hard chops. It is filtered heavily. Inadequate `dyn_idle_d_gain` may lead to a transient drop in rpm immediately after cutting throttle. Default is 50.
- the P factor provides fast control over rpm during the active control phase. Too much `dyn_idle_p_gain` may cause oscillation in that phase. Note enough and a slow drop in rpm will be inadequately corrected. Default is 50. Needs to be higher with heavier larger props.
- An integral element does most of the work.  It prevents enduring offsets from the set rpm. The I gain is high when increasing responding to low rpm, and slow to release.  The slow release makes a huge difference and avoids I oscillation. Not enough `dyn_idle_i_gain` and there may be wobble in rpm during the control phase, or the idle value may rise too slowly; too much may cause wobble. Default is 50. Needs to be higher with heavier larger props.
- The DYN_IDLE debug shows idle P, I and D in debugs 0, 1 and 2. minRps stays in debug 3.
- Interactions between throttle and thrust linear, dynamic idle, throttle scaling and throttle boost have been checked and work as they should.
2020-11-09 09:09:17 +11:00
Hans Christian Olaussen
a8cbd4d271 Add Thrust Linearization to MSP
Adds Thrust Linearization to MSP.
2020-10-11 21:23:08 +02:00
Michael Keller
7b255c866e
Merge pull request #9946 from limonspb/motor_mapping
Motor output reordering feature for CLI and MSP (Firmware part)
2020-08-16 09:47:51 +12:00
dev-fred
ed19e91131
// Added in API version 1.44
comment over the change done
2020-07-30 11:43:59 +02:00
dev-fred
2623560185
add comment: // Added in API version 1.44 2020-07-30 11:18:31 +02:00
dev-fred
a09210dcd4
Update msp.c
Add hdop in MSP_RAW_GPS 
https://github.com/betaflight/betaflight/issues/10063
2020-07-29 22:44:27 +02:00
limonspb
464919c416 Motor output reordering for CLI and MSP
Fixed some code formatting

+fixReorderingArray() for EEPROM load/save and renamings

fix brace new line

moving MOTOR_OUTPUT_REORDERING to MSP2 betaflight specific

validateAndfixConfig now resets reordering motor array to default in case it is invalid
2020-07-27 20:10:37 -05:00
Michael Keller
94cd650472
Merge pull request #9981 from mikeller/fix_max7456_delay_problems
Fixed the MAX7456 loop time problems introduced by #9948.
2020-07-26 15:31:16 +12:00
mikeller
386be8d742 Added registration for bus devices. 2020-07-08 21:34:31 +12:00
Michael Keller
41fa8754bc
Merge pull request #9633 from mikeller/remove_vbat_pid_compensation
Remove vbat pid compensation
2020-07-06 13:41:27 +12:00
mikeller
cfc89c98a8 Fixed the MAX7456 loop time problems introduced by #9948. 2020-07-05 22:00:13 +12:00