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

105 commits

Author SHA1 Message Date
Bruce Luckcuck
ad0e7154a7 Split initialization from gyro.c for flash savings
Move low performance requirements initialization code into gyro_init.c and optimize that for size.
2020-03-13 10:08:11 -04:00
Bruce Luckcuck
447cbac988 Add support for Bosch BMI270 gyro/accelerometer sensor 2020-03-08 18:56:50 -04:00
jflyper
ff16686893 White space tidy 2020-02-17 23:54:57 +13:00
Bruce Luckcuck
f584780944 Gyro native rate sampling, filtering, and scheduler restructuring 2020-02-04 18:19:35 -05:00
Dominic Clifton
3b3ead25f0 ICM42605 - Initial sensor support. 2019-12-26 20:09:47 +01:00
mikeller
cedcf2d7e2 Added calibration menu to CMS. 2019-11-19 13:59:52 +13:00
mikeller
a21d0f5d31 Fixed potentially incorrect calculation in ACC calibration if non-default cycle number is used. 2019-11-17 10:58:28 +13:00
mikeller
4a7904695e Moved 'config.[ch]' into the 'config/' directory. 2019-10-28 11:17:25 +13:00
Michael Keller
b704e753b9
Cleanup unused accResetFlightDynamicsTrims() function (#9080)
Cleanup unused accResetFlightDynamicsTrims() function
2019-10-23 13:20:40 +13:00
Bruce Luckcuck
ba73f4add1 Cleanup unused accResetFlightDynamicsTrims() function 2019-10-21 12:05:27 -04:00
Bruce Luckcuck
365c6cb1f6 Move calibrationCompleted flag to a 4th element in the accZero structure
Allows the flag indicating that calibration was completed to be output in the values for `acc_calibration`.
2019-10-21 11:49:11 -04:00
Bruce Luckcuck
565f1f4db5 Add ACC_CALIB arming disabled reason if ACC is required but not calibrated
Checks various features, modes, and OSD elements to determine if ACC is needed. Generates an arming disabled warning if ACC calibration has never been completed.
2019-10-21 11:13:55 -04:00
Dominic Clifton
980df1536f Refactored arbitrary gyro and mag alignment.
The original implementation:

* removed the old 'alignment' variable
* did not require 'ALIGN_CUSTOM'
* always used rotation matrix
* had no additional per-pid-loop conditional logic.

Extract currently unused code into tests.
In preparation for either deleting or re-using in validateAndFixConfig.

Fix code style of some old boardalignment code.

De-duplicate vector rotation code.

Now that rotation code is exacted from `alignBoard` and now  doesn't use
`boardRotation` some if it was similar to the code in `rotateV` in
maths.c

Use DECIDEGREES for mag and gyro/acc custom alignments.

Use unnamed structure instead of `values`.

Redefine what 'custom' orientation means.

Move alignment test-only code into the tests.

Ensure gyro/mag custom alignment settings follow the enum variations.

This can't be applied to ALIGN_DEFAULT because, in the case of the MAG,
the default isn't actually known until the gyro is detected, see
`compassDetect`.

OMNIBUSF4/F7 - Don't use ALIGN_DEFAULT in target.h,
common_defaults_post.h does this now.

Comment cleanup.

Delete unused alignment code left from various tests/refactoring
efforts.

* Please do not squash this commit.

Fix SITL build by avoiding structure assignment with anonymous inner
struct.

The error from the build server was as follows:

```./src/main/common/sensor_alignment.c:49:5: error: missing initializer
for field ‘yaw’ of ‘struct <anonymous>’
[-Werror=missing-field-initializers]
     *sensorAlignment = CUSTOM_ALIGN_CW0_DEG;
     ^
In file included from ./src/main/common/sensor_alignment.c:27:0:
./src/main/common/sensor_alignment.h:80:17: note: ‘yaw’ declared here
         int16_t yaw;
                 ^
```

Cleanup sensor_alignment API.
2019-07-13 11:51:20 +12:00
mikeller
b5908f5bab Applied 'USE_ACC' consistently. 2019-02-08 09:51:48 +13:00
jflyper
869e25d385 More USE_ACC application 2019-02-04 21:59:41 +09:00
jflyper
cc0e689bb5 Add USE_ACC conditionals 2019-02-04 20:37:43 +09:00
mikeller
21edada68b Removed leftover references to 'gyro_align', 'acc_align'. 2019-02-01 01:50:40 +13:00
jflyper
5b40bb4b24 Set acc alignment to that of active gyro 2019-01-29 11:33:01 +09:00
MJ666
6aa3b78629 Gryro configuration parameters cleanup 2018-10-25 18:09:27 +02:00
jflyper
fc6c24c38e Configurable acc/gyro 2018-09-10 17:55:52 +09: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
6394cc275d Fixed problems with accelerometer. 2018-08-20 15:54:29 +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
d8dd6f29f8 Set FAST_RAM to go into .fastram_data by default. Added FAST_RAM_NOINIT 2018-05-23 14:40:33 +03:00
jflyper
6c044829cc Mark unused acc/gyro support toward retirement. 2018-05-16 14:31:39 +09:00
blckmn
a9f74cd6df Removed excess trailing spaces before new lines on licenses. 2018-04-25 20:58:00 +10:00
blckmn
46fe22b4bd Direct license replacement 2018-04-22 09:22:46 +10:00
adrianmiriuta
c2898a4fd9 review of #4986 (#5422)
* review #4986 v1

* jfliper requested changes

* correction
2018-03-15 02:37:39 +13:00
Dominic Clifton
cde9a9517b SPRacingF7DUAL - Dual SIMULTANEOUS gyro support. (#5264)
* CF/BF - Set STM32F7 SPI FAST clock to 13.5Mhz - Gyros not stable at
27mhz.

* CF/BF - Initial SPRacingF7DUAL commit.

Support two simultaneous gyro support (code by Dominic Clifton and Martin Budden)
There are new debug modes so you can see the difference between each gyro.

Notes:
* spi bus instance caching broke spi mpu detection because the detection
tries I2C first which overwrites the selected bus instance when using
dual gyro.
* ALL other dual-gyro boards have one sensor per bus.  SPRacingF7DUAL is has two per bus and thus commit has a lot of changes to fix SPI/BUS/GYRO initialisation issues.

* CF/BF - Add SPRacingF4EVODG target.

This target adds a second gyro to the board using the SPI pads on the back of the board.

* CF/BF - Temporarily disable Gyro EXTI pin to allow NEO target to build.
2018-03-04 11:29:31 +13:00
Martin Budden
d90b42970c Acc fn/variable renames to align with iNav 2017-12-29 10:23:51 +00:00
Martin Budden
671382234a Enabled switch fallthrough checking by compiler 2017-12-23 19:46:40 +00:00
mikeller
b489d0ba9d Renamed 'parameter_group' to 'pg'. 2017-12-19 23:36:31 +13:00
Martin Budden
81ebdb38b6 Improved accgyro device structure alignment 2017-12-17 16:54:13 +00:00
Martin Budden
a33a82725e Add fast RAM support, CCM or TCM depending on processor 2017-12-16 17:42:35 +00:00
Martin Budden
c0b1572175 Fix to acc gyro accumulation code 2017-11-28 16:04:00 +00:00
Martin Budden
22c672fa7d Add acc and gyro accumulators to improve attitude estimation 2017-11-28 06:26:57 +00:00
Martin Budden
ed04a1f24a Improve ACC filter initialisation 2017-11-24 07:23:19 +00:00
brianlbalogh
b295a159b0 Add gyro rates and configurable FSR for ICM20649 (#4077) 2017-09-07 14:05:11 +01:00
Brian Balogh
afec0258c7 Add support for ICM-20649 acc/gyro 2017-09-01 10:57:54 -04:00
Martin Budden
3d4f0bb137 Whitespace tidy 2017-07-05 06:36:22 +01:00
blckmn
67d2c3ef25 Minor makefile change to support windows better
Removed uninitialised warnings
2017-07-02 06:55:14 +10:00
Martin Budden
23f158913e Moved time functions out of system.h into time.h 2017-05-26 14:03:28 +01:00
Martin Budden
6645d43949 Tidy of mixer and servo code 2017-05-16 20:13:14 +01:00
Martin Budden
83d49e503e Add Fn suffix to accgyro function pointers 2017-05-07 23:21:44 +01:00
Martin Budden
2493c214b0 Created subdirectories in drivers directory 2017-04-12 08:06:22 +01:00
Martin Budden
9a3cad9ca3 Further work on gyro SPI selection 2017-03-26 10:10:10 +01:00
Martin Budden
60c2b812d1 Added runtime setting of gyro SPI pin 2017-03-26 07:43:51 +01:00
DieHertz
d97a012eca Set acc_lpf_hz default back to 10 2017-03-17 02:56:51 +03:00
Martin Budden
1964362dce Removal of USE_PARAMETER_GROUPS 1 2017-03-09 22:03:59 +00:00