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

32 commits

Author SHA1 Message Date
Petr Ledvina
d447d795f4
Improve unittest build system (#13554)
* unittest - fix duplicate symbols in unittests

Some symbols were declared again
With clang -fcommon, this resulted in allocatin in common segment and
prevented error.
(tentative definitions in C standard).
-fno-common (now default in clang https://reviews.llvm.org/D75056)
causes compilation errors.

Declarations are now marked extern.

* unittest - fix scheduler array size for unittest

Unittest needs extra space for canary

* unittest - fix missing include (needed for clang-16)

* unittest - remove unused varibles

-Werror in clang 15+

* unittest - increase max supported version to clang-16

* unittest - conditionaly disable useless output in unittests

* unittest - C++11 version of STATIC_ASSERT

* unittest - fix initializers for g++

- Change order of initializers to match order in struct
- make valueTable initializion consistent (necessary for C++)
- adapt controlRateConfig

* unittest - adapt scheduler_unitest for g++

scheduler_stubs.c is necessary to initialize task_attributes

* unittest - fix ledstrip unittest

only part of config was zeroed

* unittest - fix g++ warnings

- memcpy when length is known and \0 is not copied
- isError is local stub, no extern
- serialReadStub - don't memcpy into object, use initializer

* cli - cleanup cliGetSettingIndex

- compare only passed bytes (old version may read data after
name)
- input string is const

* unittest - fix ld warning from PG sections

move pg data sections after .rodata. Sections were marked as writable
due to relocation (!?). That marked .text output section
(containing .pg_data) as writable too and linker correctly complained
that executable section is writable.

* unittest - cleanup

* unittest - adapt after code cleanup, add gcc

- remove clang flags that are not necessary now (tested on clang-11
and clang-16)
- add support for gcc ( make test CC=gcc CXX=g++ )
- add suport for different optimization level (detects some code
problems) : make test OPTIMIZE=-O2
- fallback to clang on Linux too

* fixup! unittest - conditionaly disable useless output in unittests
2024-04-22 22:43:24 +02:00
KarateBrot
32480cf002 Implement fast log2 2022-10-15 16:50:10 +02:00
Štěpán Dalecký
4cf54f9ddc Support for GCC10 and some compilation tuning 2022-06-30 01:56:50 +02:00
DusKing1
73c87c0593 fix typos in code comments in common folder 2021-08-16 15:06:07 +08:00
jflyper
f96508ceec Define and use DISCARD 2019-01-21 05:50:01 +09:00
mikeller
37568a7078 Switched to using '_Static_assert'. 2018-08-20 10:50:06 +12:00
mikeller
70ac9423c7 Unified BUILD_BUG_ON and STATIC_ASSERT into STATIC_ASSERT. 2018-08-20 10:50:06 +12:00
mikeller
54dd79ac69 Removed duplicate definition of 'BUILD_BUG_ON'. 2018-08-20 10:50:06 +12: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
Petr Ledvina
5a75737df9 Implement getBoxIdState
packFlightModeFlags is simplified by using it. Base for #5111
2018-02-05 13:10:52 +01:00
Martin Budden
671382234a Enabled switch fallthrough checking by compiler 2017-12-23 19:46:40 +00:00
Martin Budden
81ebdb38b6 Improved accgyro device structure alignment 2017-12-17 16:54:13 +00:00
Martin Budden
6943fb8e56 Split MSP box code into separate module 2017-07-20 13:33:34 +01:00
blckmn
daa0afcd39 Initial making of LEDs configurable 2017-06-17 16:47:38 +10:00
Petr Ledvina
3171fa27ce Simplify timer definitions 2017-04-30 08:47:30 +10:00
Martin Budden
aa561d542b Updates to support parameter groups 2017-03-06 13:48:14 +00:00
Martin Budden
8479ed0022 Starting the process of fixing type downcasting warnings 2016-12-28 09:46:30 +00:00
Martin Budden
ae356d485b Fixed UNUSED #define 2016-11-20 17:26:29 +00:00
Sami Korhonen
573df69935 F7 Fix Ledstrip 2016-10-21 08:51:13 +03:00
Sami Korhonen
1f8805cdf0 squash betaflightF7
Parts and driver boost from @npsm
2016-10-21 08:51:02 +03:00
atomiclama
4afab418fe Refactor to remove duplicate define of UNUSED macro. 2016-10-19 14:52:44 +01:00
Martin Budden
af5c1e3902 Added ARRAYEND and DEBUG_SET utilities 2016-10-13 14:37:43 +01:00
borisbstyle
ddf1f80b48 Revert "Revert "Betaflight led strip resubmit""
This reverts commit 63c7ae18ff.
2016-07-18 09:19:13 +02:00
borisbstyle
63c7ae18ff Revert "Betaflight led strip resubmit" 2016-07-16 11:24:05 +02:00
gaelj
aab0a56068 CF new LED strip port
Requires configurator update.

LED strip Cleanup.
New LED functions:
- GPS (G)
- Battery (L)
- RSSI (S)
- Larson Scanner (O)
- Blink (B)
- Blink on landing (N)

Mode colors and special colors are configurable (mode_color in CLI, MSP_LED_STRIP_MODECOLOR & MSP_SET_LED_STRIP_MODECOLOR)
2016-07-12 19:40:08 +02:00
Martin Budden
ea283ab98c Converted tabs to spaces 2016-07-09 14:39:39 +01:00
Petr Ledvina
9e30e69cee exti_io from Peter Ledvina 2016-06-03 10:44:06 +02:00
Petr Ledvina
48cdf650d9 improve container_of macro 2015-10-12 19:58:06 +01:00
Petr Ledvina
dc5a888633 cpm16 / cmp32 functions
used to compare timestamps with correct wrap. A bit more readable that typecasting in code. Only few uses replaced now
2015-10-12 19:58:05 +01:00
Petr Ledvina
e56f46a756 Move utility macros to common/utils.h 2015-02-23 09:17:05 +01:00
Petr Ledvina
aa7f5c4a1e New timer implementation
This is first part of new softserial code. Main timer code is changed, changes to rest of code are kept to minimum.

macros for BASEPRI based synchronization are added to project (atomic.h)

TIMER_PERIOD fixed in pwm_rx.c
2014-11-07 15:38:26 +01:00