1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-19 22:35:23 +03:00
Commit graph

53 commits

Author SHA1 Message Date
ctzsnooze
b2241b32c3 Refactor Baro to floats, filter at position rate
convert pressure to altitude early
remove median filter
PT2 filtering upsampled to altitude function in position.c - thanks KarateBrot
baro task synced to position task - thanks Steve
PT2 implementation - thanks KarateBrot
ground altitude from filtered altitude
baro cali by average of calibration samples over cal period
adjust vario and smoothing defaults
don't say haveBaroAlt until cal is complete
reduce PIDs since Baro is faster
add baro smoothing values to blackbox header

Co-Authored-By: Jan Post <post@stud.tu-darmstadt.de>
Co-Authored-By: Steve Evans <SteveCEvans@users.noreply.github.com>
2022-09-02 14:38:40 +10:00
Štěpán Dalecký
f85ebba6a4 Refactoring of IMU and ACC 2022-06-28 18:26:10 +02:00
Mathias Rasmussen
87c259a26e Fix use of floating point math functions 2021-12-21 04:18:59 +01:00
Steve Evans
29d221502e Use peak tracking as default for task duration estimation rather than a moving average 2021-12-17 22:09:52 +00:00
Steve Evans
ab1baccc66 Track state execution time for OSD, baro, rx and GPS tasks and inform scheduler of next state execution time 2021-12-17 15:40:01 +00:00
Steve Evans
d5f62be013 Trigger gyro SPI DMA reads in EXTI handler if supported and lock gyroTask loop to gyro to eliminate missed updates and jitter 2021-09-28 01:38:18 +13:00
Hans Christian Olaussen
3177cb3ec0 Update unit tests 2021-04-26 15:14:59 +02:00
Bruce Luckcuck
f688227db6 Only enable PINIOBOX task when needed
Previously the task was always enabled and there's no reason for it to be running if there are no boxID associations.

Saves a few cycles by not running. But has a bigger effect on the scheduler by minimizing the number of active tasks when possible.
2020-04-12 20:31:32 -04:00
Michael Keller
5951a48fe6
Improved tests. (#9193)
Improved tests.
2019-11-22 00:07:11 +13:00
Michael Keller
f2a16157de Removed useless test. 2019-11-21 19:53:27 +13:00
mikeller
5808bfd6f3 Improved tests. 2019-11-21 19:51:53 +13:00
Bruce Luckcuck
f35dd086ac Fix small angle check when ACC is disabled or not defined
Fixes related to #9185
2019-11-20 00:20:20 -05:00
Michael Keller
a94e78a37a
Fix small angle check reversed logic (#9188)
Fix small angle check reversed logic
2019-11-20 08:17:00 +13:00
mikeller
cedcf2d7e2 Added calibration menu to CMS. 2019-11-19 13:59:52 +13:00
Bruce Luckcuck
b3b3b6a7d6 Fix small angle check reversed logic 2019-11-18 10:49:50 -05:00
mikeller
cc8b8d3bf6 Improved detection of upright / 'SMALL_ANGLE' state. 2019-11-18 14:09:06 +13:00
mikeller
e0a6f1ab14 Improved fixed wing detection. 2019-11-17 14:05:07 +13:00
Tony Cabello
25a499cc9a Mag heading optionally ignored while GPS Rescue is running
If flyaway condition is met and a mag is in use, mag is disabled and countdown is reset
Minor cleanup
2019-01-11 06:26:01 +01:00
Tony Cabello
6a6193551c Numeric Vario calculated with GPS altitude 2018-12-05 09:01:53 +01:00
Bruce Luckcuck
5cd886017d Fix throttle angle correction when smoothing throttle; reduce processing overhead
Change the logic to not modify rcCommand directly and instead apply the additional throttle directly in the mixer.

Also move the logic to the attitude task instead of having it calculate in the PID loop. The logic relies on an angle that's only updated in the attitude task so there was no point in running the calculation every PID loop.
2018-06-28 15:56:01 -04:00
jflyper
041bfb22c6 Create a pg for rxConfig 2018-05-27 09:13:04 +09:00
Martin Budden
3116ef4008 Moved compass health check into compass.c 2018-01-21 14:51:59 +00:00
mikeller
09d396c05c Cleaned up parameter group handling.
Fixed missing include.
2017-12-31 10:51:01 +13:00
mikeller
b489d0ba9d Renamed 'parameter_group' to 'pg'. 2017-12-19 23:36:31 +13:00
Anders Hoglund
e42d74926a Fixed unittest compile warnings caused by inconsistant data types. 2017-12-11 01:21:15 +01:00
Martin Budden
22c672fa7d Add acc and gyro accumulators to improve attitude estimation 2017-11-28 06:26:57 +00:00
mikeller
10557b81ee Cleaned up 'undef' after move to 'USE_<x>'. 2017-11-05 10:53:37 +13:00
Adrian Miriuta
7146c40ca8 HEADFREE true 3D (second edition)...
reduced memory footprint ...
	rebased squashed cleanup
2017-09-23 07:35:30 +02:00
Martin Budden
564e0c94b8 Move some GPS variables into struct. Some alignment with iNav 2017-06-25 14:44:04 +01:00
Michael Keller
f380c3d774 Fixed unit tests. 2017-06-19 13:33:29 +12:00
Hydra
0227b7fb28 CF/BF - Update re-instated unit tests due to rc_modes changes. 2017-06-19 13:31:08 +12:00
mikeller
a10e1d05ed Fixed tests. 2017-06-19 13:31:08 +12:00
Dan Nixon
3dae29611e Refactor IMU unit test 2017-06-11 11:44:52 +01:00
Martin Budden
2e71ac3b84 Got unit tests working by removing non-working tests 2016-10-16 10:12:41 +01:00
Martin Budden
e9a46c6ebb Cleanup of acc device drivers extern usage CF PR#2117 2016-06-16 18:09:05 +01:00
Dominic Clifton
519586a5ce Merge branch 'refactoredBeeperCode_181_1' of
git://github.com/ethomas997/cleanflight into
ethomas997-refactoredBeeperCode_181_1

Conflicts:
	src/main/flight/failsafe.c
	src/main/io/beeper.c
	src/main/mw.c
2015-04-23 01:21:27 +02:00
Dominic Clifton
6eaca17cbd fix unit test compilation errors caused by 0359a32 2015-04-14 19:54:48 +01:00
Dominic Clifton
f28158a5a7 Cleanup debug code. 2015-04-14 13:59:11 +01:00
E Thomas
f02d7403af Port of refactored beeper code 181_1
This the "Port of refactored beeper code #669" modification applied to
version 1.8.1 (4/4/2015) of the code.
2015-04-04 17:54:44 -04:00
Dominic Clifton
55cac2bdeb Finally rename flight.c/.h to pid.c/.h. Cleanup some dependencies.
Relocate more code.
2015-02-01 00:39:38 +01:00
Pierre Hugo
6a0d1b84f2 Add tests for the calculateHeading method of the IMU. 2015-01-23 23:31:43 -08:00
Pierre Hugo
80b78fd808 Fixed flight_imu_test after including maths. 2015-01-21 19:29:45 -08:00
Dominic Clifton
bf88696847 Update unit tests to correctly use C/C++ where appropriate. Cleanup
makefile by using additional whitespace.
2015-01-14 14:24:34 +00:00
Dominic Clifton
503e7a0817 Decouple altitudehold.c from config.c. Update flight_imu_unittest and
altitude_hold_unittest.
2014-11-03 20:03:21 +01:00
Dominic Clifton
f8b13d7c62 Update unittest_flight_imu. 2014-11-01 11:10:57 +00:00
Dominic Clifton
d60183d91d Normalize all the line endings 2014-09-15 23:40:17 +01:00
Dominic Clifton
5b3d86e966 Update unit tests. 2014-09-05 22:46:33 +01:00
Dominic Clifton
9f1a0fcb4c Cleanup line endings. 2014-07-31 23:53:34 +01:00
Dominic Clifton
f5baefea5b Adding debug declaration to allow imu unit tests to compile. 2014-07-08 13:27:49 +01:00
Dominic Clifton
0b9c326ffe Complete decoupling of imu code from config.
The giant list of unrelated includes is now gone and the dependencies
are now clear.
2014-06-07 02:44:06 +01:00