Skip to content

Commit

Permalink
🔀 Merge branch 'ladislas/feature/ahrs-fusion' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
ladislas committed Feb 7, 2023
2 parents 533502c + 574ee02 commit 41f3e6c
Show file tree
Hide file tree
Showing 18 changed files with 1,568 additions and 24 deletions.
2 changes: 2 additions & 0 deletions .clang-tidy
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,8 @@ CheckOptions:
value: true
- key: readability-magic-numbers.IgnoredIntegerValues
value: "1;2;3;4;10;100;1000;60;80;3600;9600;57600;115200;128;255;1000000"
- key: readability-magic-numbers.IgnoredFloatingPointValues
value: "1;2;3;4;10;100;1000;"
- key: readability-identifier-length.IgnoredVariableNames
value: "^(fs|c|ms|fh|t|bd|s|hz|id|[abcijkxyz])$"
- key: readability-identifier-length.IgnoredParameterNames
Expand Down
6 changes: 4 additions & 2 deletions spikes/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
# Copyright 2020 APF France handicap
# SPDX-License-Identifier: Apache-2.0

add_subdirectory(${SPIKES_DIR}/lk_accel_gyro)
add_subdirectory(${SPIKES_DIR}/lk_audio)
add_subdirectory(${SPIKES_DIR}/lk_behavior_kit)
add_subdirectory(${SPIKES_DIR}/lk_ble)
Expand All @@ -28,6 +27,8 @@ add_subdirectory(${SPIKES_DIR}/lk_qdac)
add_subdirectory(${SPIKES_DIR}/lk_reinforcer)
add_subdirectory(${SPIKES_DIR}/lk_rfid)
add_subdirectory(${SPIKES_DIR}/lk_sensors_battery)
add_subdirectory(${SPIKES_DIR}/lk_sensors_imu_lsm6dsox)
add_subdirectory(${SPIKES_DIR}/lk_sensors_imu_lsm6dsox_fusion_calibration)
add_subdirectory(${SPIKES_DIR}/lk_sensors_light)
add_subdirectory(${SPIKES_DIR}/lk_sensors_microphone)
add_subdirectory(${SPIKES_DIR}/lk_sensors_temperature_humidity)
Expand All @@ -47,7 +48,6 @@ add_subdirectory(${SPIKES_DIR}/stl_cxxsupport)

add_custom_target(spikes_leka)
add_dependencies(spikes_leka
spike_lk_accel_gyro
spike_lk_ble
spike_lk_bluetooth
spike_lk_cg_animations
Expand All @@ -69,6 +69,8 @@ add_dependencies(spikes_leka
spike_lk_reinforcer
spike_lk_rfid
spike_lk_sensors_battery
spike_lk_sensors_imu_lsm6dsox
spike_lk_sensors_imu_lsm6dsox_fusion_calibration
spike_lk_sensors_light
spike_lk_sensors_microphone
spike_lk_sensors_temperature_humidity
Expand Down
22 changes: 0 additions & 22 deletions spikes/lk_accel_gyro/CMakeLists.txt

This file was deleted.

22 changes: 22 additions & 0 deletions spikes/lk_sensors_imu_lsm6dsox/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Leka - LekaOS
# Copyright 2022 APF France handicap
# SPDX-License-Identifier: Apache-2.0

add_mbed_executable(spike_lk_sensors_imu_lsm6dsox)

target_include_directories(spike_lk_sensors_imu_lsm6dsox
PRIVATE
.
)

target_sources(spike_lk_sensors_imu_lsm6dsox
PRIVATE
main.cpp
)

target_link_libraries(spike_lk_sensors_imu_lsm6dsox
CoreIMU
CoreI2C
)

target_link_custom_leka_targets(spike_lk_sensors_imu_lsm6dsox)
File renamed without changes.
25 changes: 25 additions & 0 deletions spikes/lk_sensors_imu_lsm6dsox_fusion_calibration/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Leka - LekaOS
# Copyright 2023 APF France handicap
# SPDX-License-Identifier: Apache-2.0

add_mbed_executable(spike_lk_sensors_imu_lsm6dsox_fusion_calibration)

add_subdirectory(fusion)

target_include_directories(spike_lk_sensors_imu_lsm6dsox_fusion_calibration
PRIVATE
.
)

target_sources(spike_lk_sensors_imu_lsm6dsox_fusion_calibration
PRIVATE
main.cpp
)

target_link_libraries(spike_lk_sensors_imu_lsm6dsox_fusion_calibration
CoreIMU
CoreI2C
Fusion
)

target_link_custom_leka_targets(spike_lk_sensors_imu_lsm6dsox_fusion_calibration)
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# ? Note the following code has been heavily inspired from:
# ? https://github.com/xioTechnologies/Fusion/blob/main/Examples/Advanced
# ? For more information, see https://github.com/xioTechnologies/Fusion

file(GLOB_RECURSE files "*.c")

add_library(Fusion ${files})

if(UNIX AND NOT APPLE)
target_link_libraries(Fusion m) # link math library for Linux
endif()
31 changes: 31 additions & 0 deletions spikes/lk_sensors_imu_lsm6dsox_fusion_calibration/fusion/Fusion.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
/**
* @file Fusion.h
* @author Seb Madgwick
* @brief Main header file for the Fusion library. This is the only file that
* needs to be included when using the library.
*/

#ifndef FUSION_H
#define FUSION_H

//------------------------------------------------------------------------------
// Includes

#ifdef __cplusplus
extern "C" {
#endif

#include "FusionAhrs.h"
#include "FusionAxes.h"
#include "FusionCalibration.h"
#include "FusionCompass.h"
#include "FusionMath.h"
#include "FusionOffset.h"

#ifdef __cplusplus
}
#endif

#endif
//------------------------------------------------------------------------------
// End of file
Loading

0 comments on commit 41f3e6c

Please sign in to comment.