- basicMath: math constants, conversion factors, bitwise operators,
fastSqrt
,fastInvSqrt
,fastSin
andfastCos
- matrix: handling of matrix objects and matrix operations
- numMethods: common numerical methods to solve linear systems, perform Gauss-Newton sphere approximation and solve discrete-time algebraic Riccati equation
- timer: user-configurable timers
- queue: queue structure
- list: linked list
- quaternion: quaternion operations and conversion to Euler angles
- PID: PID controller with several anti-windup options (aero-specific, integral-clamping, back-calculation)
- button: interrupt-based button object with debounce and multiple press types detection
- LPHashTable: linear-probing hash-table object with auto-resize capability
- LKHashTable: dynamic linked hash-table object (based on list)
- IIRFilters: simple discrete-time IIR filters, with on-the-fly conversion continuous -> discrete of derivative, integrator, 2nd order low-pass, high-pass, band-pass and band-stop filters
- commonTypes: collection of common type definitions
- User must define
ADVUTILS_USE_STATIC_ALLOCATION
and/orADVUTILS_USE_DYNAMIC_ALLOCATION
to select wheter to use static and/or dynamic memory management.list
,LPHashTable
andLKHashTable
are available only withADVUTILS_USE_DYNAMIC_ALLOCATION
- Functions that use static allocation are defined by
Static
suffix - To automatically use thread-safe FreeRTOS-specific implementation of dynamic memory management functions (
malloc
,calloc
andfree
) user can addset(ADVUtils_DYN_MEM_MGMT "USE_FREERTOS" CACHE STRING "" FORCE)
beforeadd_subdirectory()
in project CMakeLists. This will automatically add the following defines to ADVUtils compilation:ADVUTILS_MEMORY_MGMT_HEADER="FreeRTOS.h"
ADVUTILS_MALLOC=pvPortMalloc
ADVUTILS_CALLOC=pvPortCalloc
ADVUTILS_FREE=vPortFree
target_link_libraries(ADVUtils freertos_kernel)
- If
ADVUTILS_MEMORY_MGMT_HEADER
is not defined, the library will usestdlib
version ofmalloc
,calloc
andfree
- User can use another different implementation of
malloc
,calloc
andfree
by defining the following four macros:ADVUTILS_MEMORY_MGMT_HEADER
ADVUTILS_MALLOC
ADVUTILS_CALLOC
ADVUTILS_FREE
- User can select to use faster math functions from
basicMath
by addingUSE_FAST_MATH
to compile definitions