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

79 commits

Author SHA1 Message Date
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
mikeller
0565d1df1a Renamed 'fcTasksInit' to 'tasksInit'. 2019-10-20 23:18:17 +13:00
jflyper
8494d6e634 Add OSD displayPort device configurability 2019-10-18 14:56:19 +09:00
jflyper
adf6fd1764 DMA bit banging Dshot, first cut
F405 working (OMNIBUSF4SD target)
F411 not tested
F722 working, needs testing (OMNINXT7 target)
F74x not working

NOX target (temporary)

bb_dshot with telemetry on f4
bbshot f7 targets and fix crash due to missing debug pins

remove empty line

add empty lines

remove OMNIBUSF4 specific debug pins

add missing comma

add missing comma

Use separate bbTimerHardware array to fix unified targets

eliminate now unneeded timerGetByUsage

don't duplicate timer1 def

Add auto mode, rename dshot_bbshot to dshot_bitbang

remove newline

renamve various files

various changes to address feedback

address feedback

address feedback

add pacer timers to timer show

don't disable telemetry if dshot_bitbang is on or auto

Address feedback, add faster decode implementation based on bit banding, modify dma parameters to reduce required memory bandwidth on half

remove debug output

remove NOINLINE

Protect gpio direction change with critical sections

FIXWS_SAVE_INDEX

add static back in

no forward typedef

address review feedback

disallow proshot1000 with dshot bitbang

Extracted and plumbed up 'dbgPin'.
2019-09-04 16:06:48 +12:00
mikeller
1c8cfbd241 Extended configuration status to accommodate custom defaults. 2019-09-03 09:57:43 +12:00
mikeller
772b249a3f Added support for resetting to custom defaults to MSP. 2019-09-01 14:26:57 +12:00
Johannes Kasberger
6a713a0340 add pull_up to names, change pg config to array of elements, use correct DEFs 2019-08-15 18:59:28 +02:00
Johannes Kasberger
cc9687a2bf Add resource option to configure pin as pullup or pulldown input
all pins are initialized to pullup inputs per default. With resource PULLDOWN 1 PIN it is
possible to reconfigure the pin so it is a PULLDOWN input.

With this it's possible to prevent certain errors on some boards that have multiple pins connected
with an inverter and the pullup flows back via the inverter and pulls other pins low (see #7849)
2019-08-14 22:34:34 +02:00
Michael Keller
1c6949419c
[H7] SDMMC2 support (#8697)
[H7] SDMMC2 support
2019-08-14 23:54:04 +12:00
mikeller
7518ec67f5 Experimental support for on-board custom defaults. 2019-08-11 21:32:01 +12:00
jflyper
a3ee09b434 [H7] Add SDMMC2 support 2019-08-11 10:57:51 +09:00
mikeller
882000ddc6 Changed 'EEPROM_IN_...' to 'CONFIG_IN_...' for clarity. 2019-08-04 16:23:24 +12:00
Bruce Luckcuck
e4c357a02b Prevent calls to presistent object functions for unsupported MCU
Fixes for #8619
2019-07-30 10:00:58 -04:00
jflyper
b33c671e3d Clear reset reason also upon button initiated EEPROM reset 2019-07-28 22:56:39 +09:00
jflyper
542146c702 Motor code refactor (Phase 1) 2019-07-17 01:33:39 +09:00
mikeller
da93c07432 Refactored SD card initialisation to contain SD card detection initialisation. 2019-07-14 17:09:35 +12: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
Michael Keller
6130dc3b9e
Move motorConfig_s and motorDevConfig_s to pg/motor (#8498)
Move motorConfig_s and motorDevConfig_s to pg/motor
2019-06-30 12:59:31 +12:00
jflyper
0e63596abd Move motorConfig_s, motorDevConfig_s and associated PG handling into pg/motor.[ch] 2019-06-29 20:03:54 +09:00
Dominic Clifton
9054cd45bf Move HAL_Init call for F3/F4/F7/H7.
* HAL_Delay() was being used before HAL_Init() was called.
* Brings it in-line with ST examples which follow this call order:
CubeMX generated code goes startup_xxx.s (asm) -> SystemInit(), then
main(), HAL_Init(), SystemClock_Config()

Boot-tested on:
* SPRacingF4NEO
* SPRacingF7DUAL
* SPRacingH7ZERO
2019-06-28 12:33:54 +02:00
Michael Keller
01788322b6
Merge pull request #8462 from mikeller/fix_stats_dispatch
Fixed dispatch initialisation for persistent statistics.
2019-06-25 02:17:31 +12:00
functionpointer
7cb34205b3 [VTX] vtxTable factory flag and full integration of vtxTable (#8380)
Moved vtxtable frequency mode implementation into `vtx_common.c`.
This makes the implementation available for all vtx types and allows
for some code deduplication (see point below)

Removed band and channel tracking from tramp and rtc6705.
The hardware underlying both only support frequency mode and
the tracking is now done in `vtx_common.c` using the new factory flag.

Deleted vtxStringXXX. to continue supporting builds without
`USE_VTX_TABLE`, new infrastructure was created in
`drivers/vtx_table.c`, which loads fixed tables into vtxTableXXX
when built witout `USE_VTX_TABLE`. Individual vtx implementations no
longer need to load any band/channel tables. They only need to load
their individual power tables when built without `USE_VTX_TABLE`.
Additionally this allows for the next point:

Fully integrated vtxTableXXX and removed the old and no longer needed
indirection of frequency and power tables in `vtxDevice_t`.

Removed VTX_SETTINGS_* constants from `vtx_common.h` and replaced them
with the vtxtable equivalent.

rtc6705 implementation now uses power values from vtxtable instead of
using indices directly. It also stops using index 0. This makes it
consistent with other vtx implementations and is more user configurable.
It also cleans up `telemetry\srxl.c` which had to have a special case for rtc6705.

Finally, frequency entries in the vtxtable can now be marked as empty
by setting their frequency to 0. Betaflight will never allow a blocked
channel to be selected. This is useful for vtxtable index mode
(FACTORY flag set) where manufacturer-defined bands can be truncated
to ensure compliance with local laws and regulations.
2019-06-24 12:28:46 +02:00
mikeller
c6c4c3adf9 Fixed dispatch initialisation for persistent statistics. 2019-06-23 19:56:45 +12:00
Steffen Windoffer
41875af760 remove dead i2c overclock code 2019-06-18 16:47:16 +02:00
Dominic Clifton
9c274240d8 Allow SDCARD to be used for config/eeprom storage.
* On boot SPI or SDIO is initialised.
* Filesystem is initialised (including creation of blackbox freespace
file)
* Empty config file is created if it doesn't exist, or read if it does.
* If config is invalid/empty then config file is written to, then read
back and verified.

Enable as follows.

target.h:

target.c:
uint8_t eepromData[EEPROM_SIZE];

Changes:
- Replace boolean init flags with single initFlags variables.
- Avoid unused variable warnings.
2019-06-14 07:58:33 +12:00
Dominic Clifton
45f8168b60 Prevent the system from booting when EEPROM_IN_FLASH is used and the
flash chip is not detected.

This will ensure that the flash config partition will always be present
when requested.
2019-06-13 09:16:29 +02:00
Dominic Clifton
cf1ce1a67b Support load/save configuration to external flash
Fixes to 6a3e7d8e6 as the flash partition code had changed during
the merge to master.
2019-06-13 09:16:29 +02:00
Dominic Clifton
92999681e3 Add flash partitioning system 2019-05-18 21:39:08 +09:00
Dominic Clifton
0dc47f21e9 Prevent flashfs from initializing in absence of a flash device 2019-05-12 22:01:34 +09:00
Michael Keller
a8e9dd94e8
[FLASH] Allow flash initialisation without flashfs support. (#8238)
[FLASH] Allow flash initialisation without flashfs support.
2019-05-11 23:42:21 +12:00
Michael Keller
3054780cee
[H7] Enable SDCard/SDIO using HAL driver (#8227)
[H7] Enable SDCard/SDIO using HAL driver
2019-05-11 23:37:08 +12:00
Michael Keller
ce5411f851
[H7] Enable SPI with resurrected HAL-based driver from v3.1.7 (#8199)
[H7] Enable SPI with resurrected HAL-based driver from v3.1.7
2019-05-11 23:36:27 +12:00
Dominic Clifton
8b131090c0 [H7] - QuadSPI support
- Initial cut

- QuadSPI - Update before flash w25n01g driver QSPI change

- QuadSPI add missing resource names.

- Config and setup code for QSPI bank 2 (doesn't work yet)

- QSPI Support BK2 only using CS pin via software

- Fix inclusion of platform.h

- Fixes per PR comment
2019-05-11 01:59:43 +09:00
jflyper
82c978a828 [H7] Enable SPI with resurrected HAL-based driver from v3.1.7 2019-05-10 10:53:12 +09:00
jflyper
ffb9497d8a [H7] Enable SDCard/SDIO using HAL driver 2019-05-09 21:01:59 +09:00
Dominic Clifton
3b8ce12ffe Allow flash initialisation without flashfs support.
There are reasons to enable flash hardware support other than just
flashfs.  e.g. config storage, debugging, etc.
2019-05-09 14:21:47 +09:00
Michael Keller
011aeb66a6
Moved 'rpm_filter' into 'flight'. (#8186)
Moved 'rpm_filter' into 'flight'.
2019-05-07 00:40:48 +12:00
Michael Keller
d9382ad012
Add new basic feature conditionals (#8175)
Add new basic feature conditionals
2019-05-06 19:07:11 +12:00
Michael Keller
d259831cca
Allow EEPROM reset without power cycling in DEBUG build (#8174)
Allow EEPROM reset without power cycling in DEBUG build
2019-05-06 19:06:54 +12:00
Dominic Clifton
8e5c1dd7a3 RTC6705 resource cleanup. 2019-05-06 01:23:43 +02:00
mikeller
5141bbfa94 Moved 'rpm_filter' into 'flight'. 2019-05-06 00:10:31 +12:00
jflyper
cf219cd8a6 Add and handle USE_TIMER 2019-05-05 19:42:52 +09:00
jflyper
45b7fa8095 Add and handle USE_PWM_OUTPUT 2019-05-05 18:05:13 +09:00
jflyper
7df2828053 Allow EEPROM reset without power cycling in DEBUG build 2019-05-05 15:11:11 +09:00
Thorsten Laux
f1e9c9f19a invert csum in telemetry 2019-05-02 14:18:19 +02:00
Michael Keller
65603e49a2
Merge pull request #7621 from betaflight/bf-allow-compilation-with-no-serial-ports
Allow compilation of the printf code when no serial ports are used.
2019-04-14 21:31:31 +12:00
Michael Keller
5a67eb8c1e
Merge pull request #7626 from hydra/bf-move-memory-section-initialisation
Move memory section initialisation earlier into the init sequence.
2019-04-14 21:26:34 +12:00
Bruce Luckcuck
81c226e769 Periodically try to activate DSHOT telemetry if enabled but not working
If DSHOT telemetry is enabled but one or more ESC's are not supplying valid telemetry packets, then send the DSHOT command to enable telemetry once a second while disarmed until all ESC's are supplying telemetry.

Addresses the issue of the flight controller booting without the ESC's powered. In this case the initial command at boot to enable bidirectional telemetry will be missed by the ESC since they're not powered. If the battery is subsequently plugged in the ESC's will default to bidirectional telemetry disabled.

This change will detect that ESC's are not supplying telemetry and attempt to preiodically enable them.
2019-03-17 17:45:08 -04:00
Hans Christian Olaussen
3597e899c9 Move enabling of caches for F7
Moves cache enabling from SystemInit() to init() as it is not recommended to enable caches before entering main function.
2019-03-10 20:11:26 +01:00