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

14774 commits

Author SHA1 Message Date
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
Michael Keller
632dc6c591
Update Development.md (#8564)
Update Development.md
2019-07-13 11:36:43 +12:00
Dominic Clifton
494b559277
Merge pull request #8558 from hydra/bf-ignore-launch-configurations
add launch configuration directories to .gitignore
2019-07-12 22:44:34 +02:00
John Polstra
3c10cc381d Set the FAT filesystem timestamps of Blackbox files based on the local timezone, where
possible.  See issue #8539.  On aircraft that have a valid real-time clock,
"timezone_offset_minutes" can be set appropriately to record real times in the local
timezone.  It affects, for example, the real time displayed in the OSD and the log start
time recorded in Blackbox files.  This commit extends that functionality to the FAT
filesystem timestamps of Blackbox files.  According to Microsoft, FAT timestamps are
supposed to reflect the local time where the files were created or modified.  See, for example:

https://docs.microsoft.com/en-us/windows/win32/sysinfo/file-times

Both Windows and Mac OS adhere to the local timezone convention.  Linux does not; however, I
believe this is best viewed as a bug in Linux, since Microsoft owns the FAT filesystem.
2019-07-11 18:32:59 -07:00
Kyle K
5aa36cf00c we got moved from travis-ci.org to travis-ci.com awhile back 2019-07-11 08:42:25 +00:00
Kyle Kienapfel
f57128e7c1
Update Development.md
From discussion in #8558
2019-07-10 20:48:42 -07:00
Michael Keller
07621912d2
Expose camera control button resistance values (#8552)
Expose camera control button resistance values
2019-07-11 13:13:08 +12:00
Dominic Clifton
5b47d29581 Add support/ozone to .gitignore 2019-07-10 19:18:47 +02:00
Dominic Clifton
93ab67199a Add support/support to .gitignore
Note: Eclipse requires an in-project directory to save launch configurations in.
2019-07-10 19:17:27 +02:00
Dominic Clifton
8d78e15a4b Fix use of sdcard.cardDetectPin before it is initialised.
* de-duplicate some SDIO/SPI sd-card detection code.
* ensure detectionInverted is set to false for SDIO case where
`cardDetectTag` is not configured.
2019-07-10 17:09:03 +02:00
Bruce Luckcuck
4a7cfeb34f Expose camera control button resistance values
Allows fine tuning of the voltage divider resistance values for each button to account for slight variances amongst cameras. Also allows manual configuration for non-standard cameras. Resistance values are in 100ohm steps.
2019-07-10 09:52:20 -04:00
Jonas
db4957b73c COLIBRI_RACE: BST GPS fix
3rd party GPS does now send correct long/lat coordinates to bst bus. FPVision OSD is now working correctly.
2019-07-10 06:58:32 +02:00
LinJieqiang
03ea490e06 Fix beeper support for IF_F411_PRO and IF_F405_TWING unified targets 2019-07-09 11:32:31 +08:00
Michael Keller
7471ada0c1
Fixed default setting for gyro 2. (#8544)
Fixed default setting for gyro 2.
2019-07-09 08:01:24 +12:00
Michael Keller
d1aabfcdcc
Fixed resource ownership / define for SPI RX bind pin. (#8543)
Fixed resource ownership / define for SPI RX bind pin.
2019-07-09 07:59:35 +12:00
Michael Keller
d0ff793b39
Fixed DMA resource conflicts for target BEEROTORF4. (#8540)
Fixed DMA resource conflicts for target BEEROTORF4.
2019-07-09 07:57:39 +12:00
Michael Keller
3a63ee93c6
Added TMOTORF4 target (#8533)
Added TMOTORF4 target
2019-07-09 07:55:00 +12:00
Andrey Mironov
33576bd822 Renamed SPEDIXF4 to TMOTORF4 2019-07-08 10:38:29 +03:00
jflyper
f693a6d63f [H7][ADC] Migration to V1.4.0 library
- VRef and Temperature sensor calibration constants defined in "stm32h7xx_ll_adc.h" are now included via “stm32h7xx_hal_adc.h”.
- Boostmode is now handled by HAL_ADC_Init using clock configuration parameters to cope with Rev.V.

- Channel specifier (ADC_CHANNEL_x) was a simple integer with V1.3.0, is now an bit field encoded value.
adcTagMap had this value, but adcChannel field in adcOperationConfig was not big enough to store it.
The adcChannel field is modified to hold 32-bit value.

- Rank for channel configuration was a integer, now a bit field encoded value (ADC_RANK_x).
adcRegularRankMap array was added to translate rank number to rank value.

- Other Rev.V changes also seem to be handled within HAL.
2019-07-08 09:36:04 +09:00
jflyper
6fbc0f44ca [H7][LIB][SPI] Use union to access size sensitive SPI data register
Application of

Use union to access access size sensitive registers (7a0d3e7)

to V1.4.0

----
Note from "Use union to access access size sensitive registers (7a0d3e7)":
----

Use union to access access size sensitive registers

As described in RM0433 section 49.4.13 "Data packing", STM32H7's SPI data register supports data packing and it is sensitive to actual access width.

The original code used pointer casting to obtain a code to access the register in a desired size.
However, these operation results in strict aliasing warnings (deferencing punned pointer) and are not desirable.

Here, we declare a union that allow access to a 32-bit register in 8, 16 or 32-bit width and cast pointer to the original RXDR and TXDR data registers and then access the portion of the register through an appropriate union member.

XXX FIXME Only handled 16-bit access case, as 32-bit (original declaration) and 8-bit (allowed) cases do not generate warnings, but these should be handled similarly for correctness and consistency of the code.
2019-07-08 09:36:04 +09:00
jflyper
8bbc1456f3 [H7][LIB][USB] Middlewares change: Fix memory corruption
Application of
[H7] USB LIB Middlewares change: Avoid null hhid from being deferenced
to V1.4.0
2019-07-08 09:36:04 +09:00
jflyper
c6321190a9 [H7][LIB][USB] Modify USB Library for composite device
Application of

[H7] Modify USB Middleware library for composite device support #8235 (1861c6d)

to V1.4.0
2019-07-08 09:30:55 +09:00
jflyper
d924e59c3c [H7][LIB][SDMMC] Workaround for SDMMC Errata 2.11.4
Application of

STM32H750 - Apply workaround to the SDMMC Errata 2.11.4 (8446832)

to V1.4.0
2019-07-08 09:30:55 +09:00
jflyper
41f7c0c5fd [H7][LIB][SD] Fix for H750 Errata 2.11.5.
Application of

STM32H750 - Fix for H750 Errata 2.11.5. (adcf556)

to V1.4.0
2019-07-08 09:30:55 +09:00
jflyper
125e0887b5 [H7][LIB] Take care of UNUSED parameters in V1.4.0 2019-07-08 09:30:54 +09:00
jflyper
49ee02a707 [H7][LIB] Modify HAL SPI driver for const-ness to match call from current bus_spi driver 2019-07-08 09:30:54 +09:00
jflyper
42c9475203 [H7][LIB][USB] usbd_def: disable insane defs of MIN and MAX 2019-07-08 09:30:54 +09:00
jflyper
0c7bc10bd0 [H7][LIB][CMSIS] Handle FLASH_SIZE def collision with Betaflight 2019-07-08 09:30:40 +09:00
jflyper
400a122f30 [H7] STM32H7.mk additions and cleanup 2019-07-08 09:30:21 +09:00
mikeller
a0473c43fa Fixed default setting for gyro 2. 2019-07-08 00:43:21 +12:00
mikeller
afb2bf57db Fixed resource ownership / define for SPI RX bind pin. 2019-07-08 00:41:39 +12:00
mikeller
56e7c8225a Fixed DMA resource conflicts for target BEEROTORF4. 2019-07-07 17:15:07 +12:00
Michael Keller
5e6e1af0bf
Added RTC6705 driver to Unified Targets. (#8529)
Added RTC6705 driver to Unified Targets.
2019-07-07 17:06:47 +12:00
mikeller
612cb25006 Added RTC6705 driver to Unified Targets. 2019-07-07 15:06:12 +12:00
jflyper
2f911c1163 [H7][LIB] Import V1.4.0 library 2019-07-05 00:09:01 +09:00
jflyper
1a8d40494d [H7][LIB] Remove V1.3.0 library 2019-07-05 00:09:00 +09:00
Michael Keller
5ba4fa3793
Properly add hex file building to '<target>_flash'. (#8530)
Properly add hex file building to '<target>_flash'.
2019-07-04 09:12:31 +12:00
Michael Keller
5e5e0dd1e7
Merge pull request #8528 from mikeller/add_aikon_manufacturer_id
Added manufacturer id for AIKON.
2019-07-04 09:12:16 +12:00
Michael Keller
829f80a0c1
Added manufacturer id for T-motor. (#8527)
Added manufacturer id for T-motor.
2019-07-04 09:11:58 +12:00
Michael Keller
6686570dc2
Fixed two typos in PR template (#8524)
Fixed two typos in PR template
2019-07-04 09:11:37 +12:00
Michael Keller
cd260821c1
Minor conditional-compilation fixes. (#8484)
Minor conditional-compilation fixes.
2019-07-04 09:07:41 +12:00
Andrey Mironov
e804642f59 Added TMOTORF4 target 2019-07-03 10:16:05 +03:00
Dominic Clifton
1f2ef98042 Fix compilation when USE_DSHOT and USE_PWM_OUTPUT are not defined.
Fix compilation when USE_DMA and USE_DMA_SPEC are not defined.

Cleanup calling code of `isMotorProtocolDshot`.

Fix 'unused' warning when USE_PWM_OUTPUT is not defined.

Undo isMotoroProtocolDshot change.

Disable USE_SERIAL_4WAY_BLHELI_INTERFACE when USE_PWM_OUTPUT is not
enabled.

Style cleanup.
2019-07-03 08:36:12 +12:00
Michael Keller
1631831147
Fixed CLI DMA presence mask support. (#8503)
Fixed CLI DMA presence mask support.
2019-07-03 08:18:39 +12:00
mikeller
e65bc6cb13 Properly add hex file building to '<target>_flash'. 2019-07-03 01:51:43 +12:00
mikeller
92549402d0 Added manufacturer id for AIKON. 2019-07-03 01:42:24 +12:00
mikeller
d0cd8b8277 Added manufacturer id for T-motor. 2019-07-03 01:38:22 +12:00
Michael Keller
07097431d2
Reset out of range filter cutoffs (#8512)
Reset out of range filter cutoffs
2019-07-03 01:22:52 +12:00
Michael Keller
c7550a7806
Add ascend and descend rates to CMS (#8519)
Add ascend and descend rates to CMS
2019-07-03 00:29:11 +12:00
Michael Keller
9b18071992
Fixed file permissions. (#8517)
Fixed file permissions.
2019-07-03 00:21:43 +12:00