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

237 commits

Author SHA1 Message Date
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
Michael Keller
8ee0bff93c
Merge pull request #9967 from etracer65/osd_refresh_background_msp
Refresh OSD background after MSP change to craft name
2020-07-05 14:46:08 +12:00
Michael Keller
e96e63e252
Merge pull request #9963 from mikeller/remove_unused_header
Removed unused 'io/motors.h' header file.
2020-06-30 23:19:56 +12:00
Bruce Luckcuck
8a1b005bb7 Refresh OSD background after MSP change to craft name 2020-06-29 12:33:49 -04:00
Michael Keller
a0f6a91033
Merge pull request #9803 from fgiudice98/blackbox-freq-cms 2020-06-30 00:55:16 +12:00
mikeller
5b58c300b6 Removed unused 'io/motors.h' header file. 2020-06-29 18:49:06 +12:00
mikeller
b6689edc26 Removed VBat PID compensation. 2020-06-22 01:12:47 +12:00
Michael Keller
a8085bef8b
Merge pull request #9759 from etracer65/pid_init_separate
Split initialization from pid.c for flash savings
2020-06-22 00:35:42 +12:00
Michael Keller
12f02a1f19
Merge pull request #9753 from mikeller/remove_mag_declination
Removed the unused setting 'mag_declination'.
2020-06-22 00:20:33 +12:00
Asizon
5e59c9e980 Add vbat sag to msp 1.44, revise dyn_idle 2020-06-21 08:13:06 +02:00
Michael Keller
4b60b3ee4b
Merge pull request #9465 from Asizon/ffOptionsToMsp 2020-06-21 15:32:38 +12:00
Nicola De Pasquale
bddd7e37f6 added dterm configurable expo curve to MSP 2020-06-20 15:36:05 +02:00
Asizon
4f38b40446 Move to Msp 1.44 2020-06-17 11:13:20 +02:00
Asizon
5058fba97d FF Interpolate to MSP 2020-06-17 11:05:09 +02:00
mikeller
5d112384ae Fixed modes missing on startup. 2020-06-04 08:02:36 +12:00
Michael Keller
9eb97ea78d
Merge pull request #9875 from mikeller/move_box_init_to_activate_config
Moved calculation of available boxes into 'activateConfig()' to avoid a reboot.
2020-06-03 07:06:33 +12:00
mikeller
9ed83cf67c Moved calculation of available boxes into 'activateConfig()' to avoid a reboot. 2020-06-01 21:08:35 +12:00
mikeller
4a833cdda7 Fixed altitude output in MSP. 2020-05-31 13:58:49 +12:00
fgiudice98
b063cb4e90 Change p_ratio to sample_rate
Complete refactor logging rate selection in cli, msp and blackbox code
Retains backward compatibility

Fixed tests and requested changes

Fixed blackbox device "SERIAL" not showing in cms menu and whitespace of "FLASH"
2020-05-17 23:41:44 +02:00
mikeller
98efe1a972 Fixed reporting of configured / detected OSD device. 2020-05-17 03:56:20 +12:00
Bruce Luckcuck
c06106e2d1 Split initialization from pid.c for flash savings
Move low performance requirements initialization code into pid_init.c and optimize that for size.

Saves 2688 bytes for target STM32F7X2.
2020-05-03 13:58:55 -04:00
mikeller
b7ee04127d Removed the unused setting 'mag_declination'. 2020-05-02 23:30:01 +12: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