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

131 commits

Author SHA1 Message Date
Bruce Luckcuck
05cc74a4ae Extend OSD warnings storage to 32bits; add count to MSP
Extends the possible OSD warnings elements from 16 to 32.

Adds a warnings count to MSP data to enable improved handling of warnings added to the firmware but not in the Configurator. Incremental Configurator development required.
2019-01-17 19:46:58 -05:00
Michael Keller
e0fc9300ed
Merge pull request #7181 from hydra/fix-msp-flash-read
Fix MSP flash read
2019-01-17 01:53:36 +13:00
mikeller
77f0e106f6 Removed unnecessary cast. 2019-01-17 00:02:13 +13:00
Michael Keller
305f2c213a
Merge pull request #7285 from jflyper/bfdev-vtx-table-refactor
[VTX] Convert direct reference to string and freq table to vtxCommon services
2019-01-16 07:16:11 +13:00
jflyper
d8f55f35ef Convert direct reference to string and freq table to vtxCommonXXX services 2019-01-14 11:31:45 +09:00
fgiudice98
979e56e14d Added getLegacyBatteryVoltage 2018-12-27 12:16:26 +01:00
fgiudice98
9d5fb85474 Increased vbat precision 2018-12-25 12:00:45 +01:00
Bruce Luckcuck
b8085b170e MSC on-board flash: Persist RTC across reboot and use as file timestamp
Adds support to persist the RTC (if set) across the reboot if entering mass storage mode for on-board flash. The value is then used as the timestamp for the files exposed in the virtual FAT32 filesystem. The files will then have reasonable creation dates when copied to the host computer.

If the RTC is not set (or supported), then the default timestamp of 2018-01-01 will be used (unchanged from previous).

Included some improvements to the RTC functions and exposed the `tz_offsetMinutes` in the `timeConfig` PG. Support already existed for timezone offsets but the parameter wasn't exposed to the user and couldn't be set.

Move timezone offset up a layer as a parameter to systemResetToMsc()
Adds support for specifying a custom timezone offset from both the CLI and MSP calls to enter mass storage mode.

Added an option timezone offset minutes to the CLI `msc` command. If no parameter is specified then the default as specified by `timezone_offset_minutes` will be used. So to reboot into mass storage mode and force the file timestamps to be in UTC, use `msc 0`.

Added reboot message `MSP_REBOOT_MSC_UTC` to support rebooting into mass storage mode and forcing the timestamps to use UTC time (0 offset). The Configurator will need to be modified to use this message for operating systems that expect UTC times for FAT file systems (like Linux).
2018-12-17 19:40:51 -05:00
mikeller
53278c08f8 Fixed PID profile switching. 2018-12-15 22:53:12 +13:00
Dominic Clifton
2627826cb7 Fix MSP flash read so it returns the actual bytes read from the flash,
and not the amount of bytes requested, which may be different depending
on the constraints of the flash chip used.
2018-12-06 12:18:25 +01:00
Bruce Luckcuck
78ecccd724 Add throttle_limit settings to MSP
The feature has been in place and stable since 3.4 so it seems reasonable to add it to MSP so it can be added to the configurator.
2018-11-24 17:58:54 -05:00
Michael Keller
b418824f87
Merge pull request #7083 from McGiverGim/fix_throttle_max_msp_gps_rescue
Remove duplicated throttle max in MSP_GPS_RESCUE
2018-11-23 20:25:37 +13:00
mikeller
bc09e929b5 Removed issue with sparse 'defaultAdjustmentConfigs' in adjustment ranges. 2018-11-13 01:29:02 +13:00
Miguel Angel Mulero Martinez
672ca6fe27 Remove duplicated throttle max in MSP_GPS_RESCUE 2018-11-12 12:20:25 +01:00
jflyper
57a6060005 Prevent sdcard_getMetadata from being called when card is not inserted or not ready 2018-10-05 03:41:53 +09:00
Michael Keller
b43c6ca73b
Merge pull request #6796 from etracer65/adjustment_range_optimize
Optimize in-flight adjustments to only process configured ranges
2018-09-20 20:51:21 +12:00
Bruce Luckcuck
044648ca12 Optimize in-flight adjustments to only process configured ranges
Previously the logic would process all possible ranges defined by MAX_ADJUSTMENT_RANGE_COUNT even if some (or even all) ranges were not configured.  This change first builds a list of configured ranges and only processes thos entries.

Reduces CPU load by skipping unnecessary processing and minimizes the impact of increasing the number of available ranges.
2018-09-18 10:31:58 -04:00
Michael Keller
ea6c21f1e6
Merge pull request #6447 from bforbort/vario
Enable Vario on targets that support barometers
2018-09-18 23:53:09 +12:00
Bruce Luckcuck
a39f9480d9 Fix USB HID parameter support in MSP_SET_RX_CONFIG msp message
Workaround to make the firmware tolerant of missing Configurator support in versions 10.4.1 or less. Will still work properly when Configurator support is added.
2018-09-04 16:44:44 -04:00
Blaine
2e552841f1 Enables Vario on targets that support barometers
OSD and telemetry output of vario data is enabled on F4 and up targets
that have
USE_BARO defined.  Settings and telem elements are removed from all
other targets.

F3 targets are not supported to free memory.
2018-09-02 23:20:07 -07:00
mikeller
0bce8549ee Renamed 'fc/fc_' files to remove the double 'fc'. 2018-08-26 14:07:06 +12:00
Michael Keller
fc60cc27e9
Merge pull request #6623 from mikeller/remove_osd_slave
Removed OSD_SLAVE defines.
2018-08-25 23:37:30 +12:00
Michael Keller
83fa3f31c6
Merge pull request #6531 from awolf78/GPS_FROM_MSP
GPS support via MSP
2018-08-24 08:38:17 +12:00
Michael Keller
c3ebd2d46e
Merge pull request #4682 from fiam/agh_msp_set_rtc
Change MSP_SET_RTC to accept seconds and milliseconds
2018-08-23 23:06:54 +12:00
mikeller
6a77c5f576 Removed OSD_SLAVE defines. 2018-08-23 23:03:22 +12:00
Michael Keller
4b965a572a
Merge pull request #6254 from mikeller/remove_feature_call
Removed calls to (latching) 'feature()'.
2018-08-23 00:00:16 +12:00
Michael Keller
53151817e1
Merge pull request #6430 from mikeller/remove_duplicate_build_bug_on
Removed 'BUILD_BUG_ON'.
2018-08-22 18:49:45 +12:00
mikeller
6de1c32d9d Added shadow copies for CLI and MSP. 2018-08-21 00:36:47 +12:00
mikeller
c99629bbf1 Removed calls to (latching) 'feature()'. 2018-08-21 00:35:55 +12:00
mikeller
b4db764b46 VTX improvements from iNav. 2018-08-20 23:26:57 +12:00
mikeller
70ac9423c7 Unified BUILD_BUG_ON and STATIC_ASSERT into STATIC_ASSERT. 2018-08-20 10:50:06 +12:00
mikeller
63b6298c78 Fixed GPS rescue MSP. 2018-08-19 00:13:00 +12:00
AirBreak69
0e52e21524 GPS altitude: cleanup all occurancies to assume source is in cm per lsb resolution
Harmonized (and partly corrected) all occurancies of gpsSol.llh.alt and getEstimatedAltitude() to handle altiude sourced in cm resolution.
This was introduced by GSP_RESCUE/RTH.
Introduced a naming convention that include the unit into the variable/function names:
gpsSol.llh.alt -> gpsSol.llh.alt_cm
getEstimatedAltitude() -> getEstimatedAltitude_cm()
2018-08-19 00:11:30 +12:00
mikeller
a4a701829c Fixed GPS rescue MSP. 2018-08-18 14:09:41 +12:00
Michael Keller
5a2501f3e5
Merge pull request #5955 from David-VG/master
MSP for GPS Rescue
2018-08-18 12:56:12 +12:00
Michael Keller
701bcd24da
Merge pull request #6522 from awolf78/LUA_VTX_support
VTX LUA support for external VTX devices
2018-08-17 00:35:39 +12:00
Alex Wolf
031ea3ea94 Merge branch 'master' of https://github.com/betaflight/betaflight 2018-08-13 18:27:44 -04:00
Alex Wolf
92d3b7ca6f GPS support via MSP 2018-08-08 09:49:36 -04:00
Michael Keller
283e55e45d Removed SPRACINGF3OSD support. 2018-08-08 08:32:20 +12:00
Alex Wolf
7b6555f001 Add MSP_MULTIPLE_MSP 2018-08-07 10:47:32 -04:00
Alex Wolf
096457fcd4 VTX LUA support for external VTX devices 2018-08-05 21:40:49 -04:00
mikeller
651174e794 Added antigravity mode parameter to MSP. 2018-07-22 22:23:17 +12:00
mikeller
ec06575203 Removed unused PID settings. 2018-07-22 11:41:22 +12:00
Bruce Luckcuck
17e76e48f6 PID controller feedforward
Restructures the PID controller to decouple feedforward from D.

Cleaned up the structure of the PID controller; moved some feature-based enhancements out of the main structure.

Feedforward becomes a separate component of the PID controller and there is now:
f_pitch
f_roll
f_yaw

The default values of 60 for pitch and roll matches the default setpoint weight used in BF3.4.  Yaw previously had no setpoint weight capability so the default here needs to be discussed.  Currently it's also set to 60 and flight testing seems positive.  Feedforward on yaw adds a lot of value so I don't think we want to default to 0.  Instead we need decide on the default.

All occurences of setpoint weight have been replaced by feedforward. "setpoint_relax_ratio" has been renamed to "feedforward_transition".

The pidSum now consists of P + I + D + F.

D has been added back for yaw (disabled by default with d_yaw = 0). We've found little need for D for normal quads but it may have value for other configurations - particularly tricopters.

Updated CMS menus to support adjusting the feedforward for each axis.

Changed the default for "rc_interp_ch" to be "RPYT".  Need yaw to be smoothed to support feedforward.

Open issues:

Needs BFC support
- Need to add support for the axis "F" gains.
- Remove "setpoint weight" slider.
- Rename "D Setpoint transition" to "Feedforward transition"

Needs BBE support
- Header "setpoint_relaxation_ratio" has been renamed "feedforward_transition"
- Header "dterm_setpoint_weight" has been replaced with an array named "feed_forward_weight".
  example: H feed_forward_weight:65,60,60    (R,P,Y)
- PID component "AXISF" has been added for all axes. Should be handled like P, I and D values.
- PidSum calculation needs to include F.

Needs LUA script support
- Support the renamed "setpoint_relax_ratio".
- Support for feedforward weight on all 3 axes.

Open code issues:
- rc_adjustments.c - support for adjusting feedforward weight for all axes. Currently only supporting roll - needs coordination with BFC.
2018-07-21 10:26:23 -04:00
Michael Keller
460b72f81f
Merge pull request #6364 from mikeller/add_usb_hid_msp
Added MSP for USB HID configuration.
2018-07-18 08:46:42 +12:00
mikeller
862c14af19 Fixed botched rebase. 2018-07-18 02:30:33 +12:00
mikeller
80a29b9ad5 Removed unneeded parameters. 2018-07-18 01:14:03 +12:00
mikeller
2735a626e0 Changes from review. 2018-07-18 01:10:47 +12:00
mikeller
b4b88a5972 Adding MSP for new profile settings introduced in 3.4. 2018-07-18 01:10:47 +12:00
mikeller
76a51e989e Added MSP for USB HID configuration. 2018-07-18 01:06:01 +12:00