1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-23 08:15:30 +03:00
Commit graph

18707 commits

Author SHA1 Message Date
ctzsnooze
35d3006ecd Use autopilotAngle in place of posHoldAngle 2024-11-27 07:43:50 +11:00
ctzsnooze
9a80b75abe Use a function in gps.c to initate the posHold activity on new GPS data 2024-11-27 07:43:50 +11:00
ctzsnooze
4c9fa613ff rename showPosHoldWarning to posHoldFailure 2024-11-27 07:43:50 +11:00
ctzsnooze
c39b6ab06e compact the posHoldUpdate() function - thanks K 2024-11-27 07:43:49 +11:00
ctzsnooze
5b2f209074 A for acceleration element, not J 2024-11-27 07:43:49 +11:00
ctzsnooze
8f0f95cfb7 fix issues when pos hold deadband is set to zero 2024-11-27 07:43:49 +11:00
ctzsnooze
8289aac8ab licence updates, refactoring from review comments 2024-11-27 07:43:49 +11:00
ctzsnooze
dfac599097 fix small omission when refactoring after throttle raised PR 2024-11-27 07:43:49 +11:00
ctzsnooze
732d7b74de comments to explain strange rc multiplier 2024-11-27 07:43:49 +11:00
ctzsnooze
50a00842aa fixe defines and remove const 2024-11-27 07:43:49 +11:00
ctzsnooze
003bbc1511 conditionally only do compass check if Mag is defined 2024-11-27 07:43:49 +11:00
ctzsnooze
8dacb1708f Use mpif 2024-11-27 07:43:49 +11:00
ctzsnooze
7c85c9a7e7 tidy up after merge 2024-11-27 07:43:49 +11:00
ctzsnooze
ce72f16a62 force unit tests sto work 2024-11-27 07:43:49 +11:00
ctzsnooze
2fc85cdf85 adjust PID gains to 30 2024-11-27 07:43:49 +11:00
ctzsnooze
4962e080e5 resolve bounceback and remove iTerm attenuation 2024-11-27 07:43:49 +11:00
ctzsnooze
48b39c92ae reset position at start when slowed down, retain rotated iTerm back 2024-11-27 07:43:49 +11:00
ctzsnooze
7cdad7323d struct for values 2024-11-27 07:43:49 +11:00
ctzsnooze
67f6c6d331 retaisn iTerm just attenuate the output 2024-11-27 07:43:49 +11:00
ctzsnooze
a5baf7f939 try to prevent position hold if no mag without valid IMU
fixes a bug in the last commit, also
2024-11-27 07:43:49 +11:00
ctzsnooze
4e1d199943 separate alt and pos hold deadbands
if poshold deadband is zero, sticks are ignored
if user tries to enable posHold and it can't work, they get stick with a deadband
2024-11-27 07:43:49 +11:00
ctzsnooze
f09a71a76d allow user to fly without mag only if they reverse the default 2024-11-27 07:43:49 +11:00
ctzsnooze
5fecff404f basic sanity check and OSD warning 2024-11-27 07:43:49 +11:00
ctzsnooze
1f130ca3b4 block arming if poshold or althold switches are on 2024-11-27 07:43:49 +11:00
ctzsnooze
7810c6ff84 remove unnecessary debug 2024-11-27 07:43:49 +11:00
ctzsnooze
2d9c9877ff stop activation until throttle raised, but not require airmode
use wasThrottleRaised in place of isAirmodeActivated where airmode isn't really needed
2024-11-27 07:43:49 +11:00
ctzsnooze
5f4027e0c9 allow earth referencing in alt and pos hold 2024-11-27 07:43:49 +11:00
ctzsnooze
64b01e2759 force iTerm to zero when close to target 2024-11-27 07:43:49 +11:00
ctzsnooze
996d6ee379 adjust pids and smoothing; smoothing cutoff to settings 2024-11-27 07:43:48 +11:00
ctzsnooze
9b76715835 calculate PIDs independently for each axis, increas DJ gains 2024-11-27 07:43:48 +11:00
ctzsnooze
c2280b910c fix pid bug and improve iTerm handling 2024-11-27 07:43:48 +11:00
ctzsnooze
b7d6ca7bec sanity check notes 2024-11-27 07:43:48 +11:00
ctzsnooze
3837b0526a PIDJ distance controller, not velocity based. Remove airmode check 2024-11-27 07:43:48 +11:00
ctzsnooze
33f92db305 revise PID gains 2024-11-27 07:43:48 +11:00
ctzsnooze
a853b6ced3 Re-organise included files and functions thanks Karate 2024-11-27 07:43:48 +11:00
ctzsnooze
36f7379d6f add deadbands 2024-11-27 07:43:48 +11:00
ctzsnooze
897b9a9a61 first working example with smoothed acceleration 2024-11-27 07:43:48 +11:00
ctzsnooze
70b1097f08 add debug values for testing 2024-11-27 07:43:48 +11:00
ctzsnooze
29949ee8c5 basic control scheme 2024-11-27 07:43:48 +11:00
ctzsnooze
2b5a105f24 first position hold draft 2024-11-27 07:43:48 +11:00
ctzsnooze
b45ab68c8a get current gps location 2024-11-27 07:43:48 +11:00
ctzsnooze
0c8b636ddf initial position hold setup 2024-11-27 07:43:48 +11:00
ctzsnooze
aa9d3e3ffe autopilot naming, function sharing 2024-11-27 07:43:48 +11:00
Jay Blackman
53d44aa1b1
Adding common source location in ./src/platform (#14044)
* Adding common source location in ./src/platform

To enable the continued clean up of multiple files still in ./src/main/driver (more PRs to follow) that are specifically for AT32, APM32 and STM32

Source will be moved to MCU_COMMON_SRC where it is specifically for that MCU (or variant). The test will be to ensure no files in the MCU_EXCLUDES for SITL.

* Use of +=
2024-11-25 21:16:45 +01:00
Vladimir Demidov
63514c2b54
Added flight IMU pitch, roll, yaw attitudes to blackbox log (#14020)
* added attitude fields desriptions

* the attitude (imu pitch, roll, yaw) added to blackbox log

* Global variable imuAttitudeQuaternion[3] is added to store current normalized imu attitude quaternion

* IMU attitude quaternion added to log instead of Euler angles

* blackbox logging of IMU attitude quaterions is replaced to GYRO group

* Revert "blackbox logging of IMU attitude quaterions is replaced to GYRO group"

This reverts commit a6020ed6b6.

* code refactoring: use quaternion as global variable instead of float[3] array

* USE_ACC apply for attitude log

* quaterion struct data type is changed to union quaternion_t

* resolved issue of Test module

* Code style improvement: removed empty codes row

Co-authored-by: Mark Haslinghuis <mark@numloq.nl>

* Added STATIC_ASSERT check of quaternion components sequence.

Co-authored-by: Petr Ledvina <ledvinap@gmail.com>

* Code style improvement

Co-authored-by: Petr Ledvina <ledvinap@gmail.com>

* Resolved code issue

Co-authored-by: Mark Haslinghuis <mark@numloq.nl>

* resolved wrong data type name

* STATIC_ASSERT error resolved

Co-authored-by: Mark Haslinghuis <mark@numloq.nl>

* Improved assert condition

Co-authored-by: Petr Ledvina <ledvinap@gmail.com>

* added ATTITUDE condition for attitude blackbox log

* added blackbox_disable_attitude cli command

* Attitude position changed in blackbox disabling fields list

* resolved issue wrong quaternion log record condition

---------

Co-authored-by: Mark Haslinghuis <mark@numloq.nl>
Co-authored-by: Petr Ledvina <ledvinap@gmail.com>
2024-11-25 17:32:58 +01:00
Vladimir Demidov
57d32ea1da
Logging of the S -term values in blackbox for Fixed wings. (#14012)
* The S term values are added to blackbox logging for airplanes

* The axisS log fields are placed into NONZERO_WING_S_n group
2024-11-23 18:08:47 +01:00
Ivan Efimov
e422e42122
trailing spaces after #14010 (#14031) 2024-11-18 17:52:20 +01:00
Ivan Efimov
1c1c78f80f
TPA mode PDS + Wing setpoint attenuation (for wings) (#14010)
* TPA mode PDS + Wing setpoint attenuation

* removed brackets by haslinghuis :)

* Ledvinap's review

---------

Co-authored-by: limonspb <gendalf44@yandex.ru>
2024-11-16 02:07:13 +01:00
nerdCopter
ed6a4a4769
duplicate emptyline removal (#14027)
* trailing space removal

Co-authored-by: Petr Ledvina <ledvinap@gmail.com>

* deduplicate empty lines

---------

Co-authored-by: Petr Ledvina <ledvinap@gmail.com>
Co-authored-by: Mark Haslinghuis <mark@numloq.nl>
2024-11-15 23:07:25 +01:00
nerdCopter
493b9bf819
trailing whitespace removal (#14026)
trailing space removal

Co-authored-by: Petr Ledvina <ledvinap@gmail.com>
2024-11-15 22:19:13 +01:00