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

736 commits

Author SHA1 Message Date
Bruce Luckcuck
b31b2d0680 OSD temperature display and calculations cleanup
Remove unnecessary decidegrees conversions as all temperature providers are in degrees celcius.

Fixed rounding for imperial units.

Fixed data type error in core temp warning element. Temperature is captured as int16 and can be negative but logic was using uint8 leading to an underflow for negative temperatures and a false alarm triggering.
2018-10-23 09:27:26 -04:00
mikeller
feaa082ac3 Fixes from review. 2018-10-24 02:02:59 +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
Michael Keller
811364c2ec
Merge pull request #6810 from azolyoung/fix_rcsplit_t_control_bug
fix rcdevice can't work
2018-10-06 15:38:20 +13:00
azolyoung
18085eafdd fix coding style 2018-09-22 10:15:01 +08:00
Michael Keller
ae0f99c494
Merge pull request #6806 from Smeat/fport_rssi
Fix rssi logging for fport.
2018-09-22 03:55:11 +12:00
azolyoung
6bc6c36116 fix error of unittest 2018-09-21 17:00:47 +08:00
Kevin
8e5bd7fc71 Fix blackbox unit test. 2018-09-20 15:35:50 +02:00
Michael Keller
ec8d363adb
Merge pull request #6748 from borisbstyle/fix_ITERM_RELAX_RP_INC_bug
Improved pid_unittests
2018-09-21 00:13:49 +12: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
timman2er
ef17d7fc31 add max esc temp and rpm to osd 2018-09-20 10:15:00 +02:00
borisbstyle
2d68e9c387
Merge pull request #6793 from etracer65/crsf_telem_gps_speed_fix
Fix CRSF telmetry GPS speed calculation
2018-09-19 09:32:32 +02:00
borisbstyle
87b2eeb2fd More isolated pid_unittests
Refactor iterm_relax to iterm_relax_axis

Isolate pidLevel test

Isolate pidHorizon tests

remove if UNIT_TEST

revert to iterm_relax from iterm_relax_axis
2018-09-19 08:15:32 +02: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
Bruce Luckcuck
0d7f8f5feb Fix CRSF telmetry GPS speed calculation
Calculation was assuming that the GPS groundspeed was in 1/10 m/s when in reality it's in cm/s units.  This was causing the value sent in telemetry to be 10 times too large.
2018-09-18 07:07:22 -04:00
ctzsnooze
9cc96bfa67 Grr missed two ITerm's in unit test clode 2018-09-16 12:04:57 +10:00
borisbstyle
93c6f93ac1
Merge pull request #6738 from andrejpodzimek/per_target_tests
Adding a per-target unit test for timer metadata consistency.
2018-09-12 21:59:56 +02:00
borisbstyle
afccf50d96 Add Iterm Relax unittest // refactor
Refactor PID code Iterm Relax and Absolute control

Move defines for unittest to Makefile

Fix unittest isAirmodeActivated()

Absolute control unittests + optimizations

Fix dead code absolute control // unittests

Further optimizations to absolute control switch logic
2018-09-12 08:09:21 +02:00
Andrej Podzimek
9d553380c3 Adding a per-target unit test for timer metadata consistency. 2018-09-11 06:42:10 +02:00
borisbstyle
aa44fd6bbd Change default iterm_windup 2018-09-10 23:38:40 +02:00
borisbstyle
00dbaf9fa7 Cleanup code // add unittestst for iterm windup 2018-09-10 23:38:39 +02:00
borisbstyle
864a2d6a2b Fix bug with antiwindup inversion 2018-09-10 09:08:36 +02:00
Michael Keller
39ced6bbfe
Merge pull request #6668 from mikeller/add_fno_common
Added '-fno-common' build option, fixed resulting problems.
2018-09-08 16:51:22 +12:00
jflyper
9caeceb2dd Resolve upward inclusion 2018-09-06 18:43:58 +09:00
mikeller
4ec481a843 Added '-fno-common' build option, fixed resulting problems. 2018-08-30 18:58:34 +12:00
borisbstyle
9d01a5681e
Merge pull request #6659 from betaflight/pid_unittest_fix
Feedforward unittest
2018-08-29 09:10:45 +02:00
Michael Keller
b14d532dc5
Merge pull request #6624 from thomasbridi/CRSF_avg_cell_telemetry
feat:add average cell voltage in CRSF telemetry
2018-08-28 21:21:36 +12:00
borisbstyle
a85eecf42d Add feedforward tests 2018-08-28 10:06:48 +02:00
borisbstyle
5b7209329b Add tolerance for feedforward 2018-08-28 08:44:06 +02:00
thomas.bridi
a567bb71d3 merge 2018-08-27 18:31:09 +02:00
thomas.bridi
1a67f5da17 fix: missing test 2018-08-27 18:28:06 +02:00
mikeller
0bce8549ee Renamed 'fc/fc_' files to remove the double 'fc'. 2018-08-26 14:07:06 +12:00
thomasbridi
8eccc325ae
Fix:remove unused variable 2018-08-23 15:27:47 +02:00
thomas.bridi
50d287a9d4 feat:add average cell voltage in CRSF telemetry 2018-08-23 13:09:51 +02: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
jflyper
82268b7a4e Add osd warning for fail safe state. 2018-08-22 20:22:40 +09:00
mikeller
40f1fe0737 Fixed tests. 2018-08-22 19:51:32 +12:00
mikeller
00a7d20227 Fixed tests. 2018-08-21 00:37:20 +12:00
mikeller
8a72362a67 Fixed tests. 2018-08-21 00:36:47 +12:00
mikeller
6de1c32d9d Added shadow copies for CLI and MSP. 2018-08-21 00:36:47 +12:00
mikeller
8abf138e2a Fixed tests, SPRACINGF3OSD. 2018-08-21 00:36:31 +12:00
Kiripolszky Károly
c4a32160a7 fix OSD unittest for log status element 2018-08-19 10:22:07 +02:00
Michael Keller
a1b84b58d3
Merge pull request #6182 from Ziege-One/Hott-telemetry-alarm-voltage-and-mAh
Hott telemetry alarm voltage and mAh
2018-08-19 01:45:39 +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
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
6e718b504a Fixed tests. 2018-08-06 08:37:26 +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
mikeller
4439852984 Fixed test. 2018-07-22 00:24:48 +12:00
ctzsnooze
4c917efa50 Smooth anti gravity 2018-07-21 23:49:41 +12:00
mikeller
35b93f2c18 Fixed tests. 2018-07-19 00:09:55 +12:00