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

12667 commits

Author SHA1 Message Date
Michael Keller
5123e8bb38
Add support for IRC Tramp race lock flag, and extended VTX stat… (#7128)
Add support for IRC Tramp race lock flag, and extended VTX status.
2019-07-29 02:13:26 +12:00
jflyper
b33c671e3d Clear reset reason also upon button initiated EEPROM reset 2019-07-28 22:56:39 +09:00
Michael Keller
3857f6cb75
Correct IMU gyro input to be based on sample loop time rather t… (#8613)
Correct IMU gyro input to be based on sample loop time rather than actual delta time
2019-07-28 11:39:14 +12:00
Michael Keller
06cabd741f
Unify DMA stream and channel handling (#8586)
Unify DMA stream and channel handling
2019-07-28 11:03:46 +12:00
Michael Keller
e00122d88a
Added target variant NUCLEOH743_RAMCONFIG. (#8488)
Added target variant NUCLEOH743_RAMCONFIG.
2019-07-28 10:36:20 +12:00
Michael Keller
93b842c566
[F7] Set DShot DMA buffer attribute to FAST_RAM_ZERO_INIT (#8610)
[F7] Set DShot DMA buffer attribute to FAST_RAM_ZERO_INIT
2019-07-28 10:21:30 +12:00
jflyper
7ddfd7dea6 Unify DMA stream and channel handling 2019-07-27 21:20:34 +09:00
jflyper
e8125e57c9 Set DShot DMA buffer attribute to FAST_RAM_ZERO_INIT
The buffer was originally a part of motorDmaOutput_s structure which resided in the FAST_RAM_ZERO_INIT(DTCM RAM). The buffer was separated as a part of the motor refactor #8534, and wasn’t properly attributed.

In the future, DMA buffer coherence will be maintained by MPU and the DShot buffer will be moved there to save the scarce DTCM resource.
2019-07-27 18:22:23 +09:00
mikeller
1c60776487 Added target variant NUCLEOH743_RAMCONFIG to get CI coverage of 'EXST' changes.
Changing over to be RAM based.

Changes required for MPU configuration service.

Added documentation.
2019-07-27 18:20:05 +12:00
Michael Keller
f6870e4189
MPU configuration service (#8595)
MPU configuration service
2019-07-27 16:06:40 +12:00
Bruce Luckcuck
50ce338390 Correct IMU gyro input to be based on sample loop time rather than actual delta time
The current calculation accumulates gyro data between IMU updates based on the actual time delta betwwn samples. The problem with this is that loop time jitter or delays will decrease the accuracy of the gyro rotational input into the attitude calculation. The sensor samples based on a hardware driven clock that matches the `gyro.targetLooptime`. The sensor captures samples at these intervals regardless of when we read them so the calculation should be based on the duration between samples rather then the duration between processing loops.

Will improve the accuracy of the IMU attitude estimate - particularly in cases of higher CPU load and increased looptime jitter. Bench testing shows reduced drift. Also flight tested and behaved as expected.
2019-07-26 16:32:03 -04:00
jflyper
79b11b9c61 Set DShot DMA buffer attribute to FAST_RAM_ZERO_INIT
The buffer was originally a part of motorDmaOutput_s structure which resided in the FAST_RAM_ZERO_INIT(DTCM RAM). The buffer was separated as a part of the motor refactor #8534, and wasn’t properly attributed.

In the future, DMA buffer coherence will be maintained by MPU and the DShot buffer will be moved there to save the scarce DTCM resource.
2019-07-26 18:02:09 +09:00
Michael Keller
7a84a5cf73
Add uint32 support to the MODE_ARRAY CLI parameter type (#8556)
Add uint32 support to the MODE_ARRAY CLI parameter type
2019-07-25 23:52:48 +12:00
Michael Keller
fc739459fc
Fix BMP388 driver for build without USE_EXTI (#8600)
Fix BMP388 driver for build without USE_EXTI
2019-07-25 08:08:03 +12:00
Michael Keller
ba50e1efcc
Added idle interrupt callback to UART driver (#8599)
Added idle interrupt callback to UART driver
2019-07-25 08:07:37 +12:00
Michael Keller
f059d2f00e
Fix incorrect VREF calibration (#8594)
Fix incorrect VREF calibration
2019-07-25 08:00:44 +12:00
Michael Keller
cd50b35d9f
Set the filesystem timestamps of Blackbox files using the local… (#8570)
Set the filesystem timestamps of Blackbox files using the local timezone
2019-07-25 07:44:31 +12:00
John Polstra
5293b05517 Add a comment explaining the use of local time for FAT timestamps. 2019-07-24 10:20:31 -07:00
Bruce Luckcuck
0b055108bc Add uint32 support to the MODE_ARRAY CLI parameter type 2019-07-24 08:57:25 -04:00
jflyper
7225aadb7d Move MAX_MPU_REGIONS into STM32H7.mk where EXST is visible 2019-07-24 17:16:34 +09:00
jflyper
9d7cfb1e79 Fix incorrect Vref calibration
The formula used to compute VREF from VREFINT and VREFINTCAL was incorrect.

Also, as correct formulae for VREF and TEMPSENSOR incorporate lots of
MCU dependent variables and constants, a new driver level service was
added to convert ADC values to VREF voltage or temperature.
2019-07-24 11:40:45 +09:00
jflyper
c8252fabdd Introduce memProtXXX MPU configuration service 2019-07-24 11:32:11 +09:00
jflyper
772af15edd Fix BMP388 driver for build without USE_EXTI 2019-07-23 10:17:56 +09:00
Miguel.Alvarez
38013a8253 Added idle interrupt callback to UART driver 2019-07-22 15:55:49 -05:00
Michael Keller
0f230c42a1
Allow resorting to fake gyro if USE_FAKE_GYRO is defined (#8579)
Allow resorting to fake gyro if USE_FAKE_GYRO is defined
2019-07-22 02:29:57 +12:00
jflyper
79452fff85 [F1] Update boot loader request related 2019-07-18 12:22:20 +09:00
jflyper
b90ed88f2e Bypass calibration for GYRO_FAKE 2019-07-17 23:36:54 +09:00
Michael Keller
d8b74db2dc
Enabled support for targets supporting RTC6705 on hardware and… (#8542)
Enabled support for targets supporting RTC6705 on hardware and software SPI.
2019-07-18 00:15:40 +12:00
jflyper
a78238e0f2 Allow resorting to fake gyro if USE_FAKE_GYRO is defined 2019-07-17 14:03:24 +09:00
jflyper
542146c702 Motor code refactor (Phase 1) 2019-07-17 01:33:39 +09:00
mikeller
fd0c7f385d Fixed build on SPRACINGH7EXTREME. 2019-07-16 23:26:10 +12:00
mikeller
60d53be152 Enabled support for targets supporting RTC6705 on hardware and software SPI. 2019-07-16 00:09:39 +12:00
Michael Keller
f4bb75180e
Refactored SD card initialisation to contain SD card detection… (#8574)
Refactored SD card initialisation to contain SD card detection initialisation.
2019-07-15 22:15:41 +12:00
Michael Keller
2a0877290e
SPRACINGH7NANO - First betaflight STM32H750 400Mhz 20x20 mount… (#8537)
SPRACINGH7NANO - First betaflight STM32H750 400Mhz 20x20 mount FC.
2019-07-14 17:15:54 +12:00
Michael Keller
b1c8f3e515
SPRacingH7EXTREME - First betaflight STM32H750 400Mhz FC. (#8536)
SPRacingH7EXTREME - First betaflight STM32H750 400Mhz FC.
2019-07-14 17:14:43 +12:00
mikeller
da93c07432 Refactored SD card initialisation to contain SD card detection initialisation. 2019-07-14 17:09:35 +12:00
Michael Keller
7e6a890e47
Fix use of sdcard.cardDetectPin before it is initialised. (#8557)
Fix use of sdcard.cardDetectPin before it is initialised.
2019-07-14 14:38:10 +12:00
Dominic Clifton
a0d8b57fd4 SPRACINGH7EXTREME - First STM32H750 betaflight target.
SPRACINGH7EXTREME - Disable requirement for custom gyro alignment and
dual gyro.

Requires custom gyro rotation code to be merged first, see:

https://github.com/betaflight/betaflight/pull/7845
https://github.com/betaflight/betaflight/pull/8474

SPRACINGH7EXTREME - Add boards documentation and images.

Add SPRacingH7EXTREME to the list of official targets.

SPRACINGH7EXTREME - Add unified target config.

Note: untested as no unified target exists for STM32H750+EXST yet.

SPRACINGH7EXTREME - Use correct gyro settings now that #8474 is merged.

SPRACINGH7EXTREME - Combine target files.

SPRACINGH7EXTREME - Update unified target config.
2019-07-14 14:04:27 +12:00
Dominic Clifton
33f761d6a3 SPRACINGH7NANO - First betaflight STM32H750 400Mhz 20x20 mount FC.
Website: http://seriouslypro.com/spracingh7nano
Shop: https://shop.seriouslypro.com/sp-racing-h7-nano

SPRACINGH7NANO - Add boards documentation and images.

SPRACINGH7NANO - Add unified target config.

Note: untested as no unified target exists for STM32H750+EXST yet.

SPRACINGH7NANO - Combine target files.

SPRACINGH7NANO - Update unified target config.
2019-07-14 14:00:47 +12:00
Michael Keller
f095d648f5
COLIBRI_RACE: BST GPS fix (#8555)
COLIBRI_RACE: BST GPS fix
2019-07-14 02:05:18 +12:00
Michael Keller
bcaf13c2e5
[H7] Migration to FW V1.4.0 library (#8546)
[H7] Migration to FW V1.4.0 library
2019-07-14 01:24:26 +12: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
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
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
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