1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-23 16:25:31 +03:00
Commit graph

348 commits

Author SHA1 Message Date
Bruce Luckcuck
c1f40b8ebb Fix OSD time remaining division by zero
If the current sensor wasn't configured (or the mahDrawn was still zero) then there would be a division by zero error in the remaining time OSD element calculation. Rearranged the logic to prevent.
2018-10-23 14:09:44 -04:00
Bruce Luckcuck
810b9dab74 Fix OSD artificial horizon division by zero
If osd_ah_max_pit was set to zero there would be a divide by zero error in the calculations for the OSD artificial horizon. Using zero for osd_ah_max_pit is a valid use-case to disable the vertical pitch component in the artificial horizon so we can't simply change the parameter range.
2018-10-23 07:26:01 -04:00
Michael Keller
1edb5411d9
Merge pull request #6891 from etracer65/arming_disabled_osd_display_improvements
Increase priority of arming disabled OSD warnings and cycle through all
2018-10-11 02:07:33 +13:00
Michael Keller
2f1643924e
Merge pull request #6656 from timman2er/add_stat_esc_max_temp_rpm
added esc max temp and rpm to OSD
2018-10-08 01:03:20 +13:00
Bruce Luckcuck
8205bb74e3 Increase priority of arming disabled OSD warnings and cycle through all
Previously the OSD arming disabled warnings were given a low priority so other warnings like "LOW BATTERY" would obscure the arming arming disabled reason(s). Increased the piority so that arming disabled reasons will always be displayed.

Also change the logic to cycle through all arming disable reasons rather than only show the first active flag.
2018-10-06 11:04:28 -04:00
Bruce Luckcuck
a3fb5cc156 Add HEADFREE indicator to the OSD flight mode and warnings display elements
Provide multiple mechanisms to alert the pilot that he is attempting to fly in HEADFREE mode while in FPV - which will likely result in disorientation and loss of control.
2018-10-03 19:06:59 -04:00
timman2er
88f91681e7 fix order for OSD display 2018-09-25 03:04:09 +02:00
timman2er
ef17d7fc31 add max esc temp and rpm to osd 2018-09-20 10:15:00 +02: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
Kenneth Mitchell
91dcea8053 Relocate G-force calculation. 2018-09-16 19:19:40 -04:00
Kenneth Mitchell
1f81011f5e Fix OSD Flip arrow. 2018-09-13 18:24:55 -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
timman2er
fc49f738c9 flip arrow turtle mode 2018-08-27 11:16:03 +02:00
mikeller
0bce8549ee Renamed 'fc/fc_' files to remove the double 'fc'. 2018-08-26 14:07:06 +12:00
Michael Keller
a02e1dd384
Merge pull request #6610 from jflyper/bfdev-osd-warn-fail-safe
Add osd warning for fail safe state.
2018-08-23 22:36:48 +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
jflyper
82268b7a4e Add osd warning for fail safe state. 2018-08-22 20:22:40 +09: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
Michael Keller
1d63edf7c5
Merge pull request #6580 from jflyper/bfdev-fix-osd-flymode-precedence
OSD GPS RESCUE has display precedence over other modes except FS
2018-08-20 16:40:52 +12:00
mikeller
70ac9423c7 Unified BUILD_BUG_ON and STATIC_ASSERT into STATIC_ASSERT. 2018-08-20 10:50:06 +12:00
Kiripolszky Károly
6e33878af6 remove OSD_LOG_STATUS from unconditionally drawn elements 2018-08-19 10:56:01 +02:00
Kiripolszky Károly
ada8235470 add trailing comma 2018-08-19 10:22:07 +02:00
Kiripolszky Károly
c0e2ca3546 initial implementation of log status OSD element 2018-08-19 10:21:19 +02: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
jflyper
00d3f2217a GPS RESCUE has display precedence over other modes except FS 2018-08-17 23:31:03 +09:00
Michael Keller
45b6989350
Merge pull request #6536 from leocb/Acc-reciprocal
Change divisions by acc_1G to multiply by the reciprocal value
2018-08-17 00:36:27 +12:00
Michael Keller
41ce2c6327
Merge pull request #6391 from leocb/osd-max-g-force-stat
Added Max G-force OSD stat
2018-08-17 00:22:11 +12:00
Michael Keller
d4eabba541
Merge pull request #6232 from McGiverGim/add_elements_osd_order_loop
Add OSD elements to order loop
2018-08-16 23:57:46 +12:00
leocb
34b0707cb6 change divisions by acc_1G to multiply by the reciprocal value 2018-08-09 14:41:05 -03:00
Andrey Mironov
65bff6b7d7 Added a condition for enabling OSD task 2018-07-24 13:40:01 +03: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
ctzsnooze
4c917efa50 Smooth anti gravity 2018-07-21 23:49:41 +12:00
leocb
4b415d54cb code formating 2018-07-18 07:56:24 -03:00
leocb
05e42db90b Added Max G-force OSD stat 2018-07-17 11:44:01 -03:00
Michael Keller
e2cf7fc238
Merge pull request #6233 from leocb/add-gforce-osd
Added G-Force to the OSD
2018-07-17 18:28:58 +12:00
leocb
4def6e3281 Fixed OSD G-force symbol as suggested 2018-07-16 08:59:15 -03:00
leocb
c9df378dcc Really fixed OSD G Symbol 2018-07-16 08:36:02 -03:00
leocb
d0be9578e3 Fix G-force unit symbol 2018-07-16 08:10:23 -03:00
Michael Keller
f40b5979f4
Merge pull request #6339 from McGiverGim/fix_osd_warnings_when_esc
Fix low priority warnings when ESC sensor enabled
2018-07-15 16:15:17 +12:00
Bruce Luckcuck
ef4a03507f Adjustments strings for OSD not kept in sync with enumeration causing invalid pointers
When the separate rc rates and rc expos for roll/pitch were added the descriptive names were never added to the OSD display strings array. Then later PID audio was added causing the array to be out of sync with the enumerated adjustment types.  This led to a corrupted pointer reference in the OSD display.

Also the adjustment display name used for the OSD display was never initialized so the pointer was pointing to random memory.

Removed the use of globals and changed to use "getter" functions.
2018-07-14 22:56:35 -04:00
Miguel Angel Mulero Martinez
b9633eb59d Fix low priority warnings when ESC sensor enabled 2018-07-12 09:16:00 +02:00
Michael Keller
83612180fc
Merge pull request #6265 from atomgomba/improvement-acro-trainer-osd
Add Acro Trainer as flight mode to OSD
2018-07-09 22:57:56 +12:00
Bruce Luckcuck
899942621c Fixes from review 2018-07-07 20:22:37 -04:00
Bruce Luckcuck
af267864e9 Add OSD warning and beeper pattern if rc smoothing initialization not complete
In the OSD display the warning "RCSMOOTHING".  Also play a beep pattern of 3 short, 1 long that will repeat.

If rx rate filter training completes the warning/beeper will stop. The warnings are only active when armed.
2018-07-07 18:43:06 -04:00
Kiripolszky Károly
b5e0a82852 add Acro Trainer as flight mode to OSD 2018-07-02 15:16:51 +02:00
jflyper
9d1e4db800 Call flashfsIsSupported instead of flashfsIsReady to check flash chip existence 2018-07-02 09:46:54 +09:00
leocb
7df8075fa3 OSD G-force Fix unit test; use sqrtf 2018-06-28 16:15:16 -03:00
leocb
51e57199fb OSD G-force - Fixes compile errors and optimize math 2018-06-28 12:16:25 -03:00