Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cedric hugo/feature/Add CoreIMU #1092

Merged
merged 6 commits into from
Nov 16, 2022
Merged

Conversation

HPezz
Copy link
Contributor

@HPezz HPezz commented Oct 28, 2022

Add CoreIMU driver, which includes :

  • CoreLMS6DSOX : process communication between MCU and LSM6DSOX to get acceleration and angular speed data
  • CoreAccelerometer & CoreGyroscope : take LMS6DSOX as dependancy and get their related data, respectively acceleration in mg and angular speed in dps

Next step : Adding CoreMagnetometer when hardware will allow it (see #1114).

@codecov
Copy link

codecov bot commented Oct 28, 2022

Codecov Report

Merging #1092 (647c2b4) into develop (bbd431e) will decrease coverage by 0.00%.
The diff coverage is 95.89%.

❗ Current head 647c2b4 differs from pull request most recent head 47b1961. Consider uploading reports for the commit 47b1961 to get more accurate results

@@             Coverage Diff             @@
##           develop    #1092      +/-   ##
===========================================
- Coverage    96.04%   96.03%   -0.01%     
===========================================
  Files          133      138       +5     
  Lines         3182     3256      +74     
===========================================
+ Hits          3056     3127      +71     
- Misses         126      129       +3     
Impacted Files Coverage Δ
drivers/CoreIMU/source/CoreLSM6DSOX.cpp 95.38% <95.38%> (ø)
drivers/CoreIMU/include/CoreAccelerometer.h 100.00% <100.00%> (ø)
drivers/CoreIMU/include/CoreGyroscope.h 100.00% <100.00%> (ø)
drivers/CoreIMU/source/CoreAccelerometer.cpp 100.00% <100.00%> (ø)
drivers/CoreIMU/source/CoreGyroscope.cpp 100.00% <100.00%> (ø)
libs/LogKit/include/LogKit.h 100.00% <0.00%> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@github-actions
Copy link

github-actions bot commented Oct 28, 2022

File comparision analysis report

🔖 Info

  • base: develop / 66d092f + mbed-os-6.15.1+fixes+gcc-11-support + -std=c++20
  • head: cedric-hugo/feature/Add-CoreIMU / 66d092f + mbed-os-6.15.1+fixes+gcc-11-support + -std=c++20
  • toolchain: GNU Arm Embedded Toolchain 10.3-2021.10 - 10.3.1 20210824
  • enable_log_debug: ON
Target Flash Used (%) Flash Available (%) Static RAM (%)
bootloader 181964 (69%) 80180 (30%) 37520 (7%)
os 451828 (28%) 1112844 (71%) 86728 (16%)
Click to show memory sections
| -          |      Hex |     Bytes |  KiB |
|------------|---------:|----------:|-----:|
| Flash      | 0x200000 | 2 097 152 | 2048 |
| SRAM       |  0x80000 |   524 288 |  512 |
| Bootloader |  0x40000 |   262 144 |  256 |
| Header     |   0x1000 |     4 096 |    4 |
| OS         | 0x17E000 | 1 564 672 | 1528 |
| Tail       |   0x1000 |     4 096 |    4 |
| Scratch    |  0x40000 |   262 144 |  256 |

📝 Summary

Click to show summary
  • ✔️ - existing target
  • ✨ - new target
  • ⚰️ - deleted target
  • ✅ - files are the same
  • ❌ - files are different
Target Status .bin .map Total Flash (base/head) Total Flash Δ Static RAM (base/head) Static RAM Δ
LekaOS ✔️ 451828 (21%) ø 86728 (16%) ø
bootloader ✔️ 181964 (8%) ø 37520 (7%) ø
functional_ut_boost_ut ✔️ 396128 (18%) ø 27152 (5%) ø
functional_ut_file_manager ✔️ 385864 (18%) ø 27400 (5%) ø
functional_ut_imu - - 381260 (18%) - 27120 (5%) -
functional_ut_io_expander ✔️ 371832 (17%) ø 27120 (5%) ø
functional_ut_qdac ✔️ 373080 (17%) ø 27120 (5%) ø
spike_lk_accel_gyro - - 93984 (4%) - 18472 (3%) -
spike_lk_audio ✔️ 135196 (6%) ø 21048 (4%) ø
spike_lk_behavior_kit ✔️ 198316 (9%) ø 54600 (10%) ø
spike_lk_ble ✔️ 236716 (11%) ø 34920 (6%) ø
spike_lk_bluetooth ✔️ 92364 (4%) ø 18128 (3%) ø
spike_lk_cg_animations ✔️ 152328 (7%) ø 53128 (10%) ø
spike_lk_color_kit ✔️ 88416 (4%) ø 20280 (3%) ø
spike_lk_command_kit ✔️ 202844 (9%) ø 57936 (11%) ø
spike_lk_config_kit ✔️ 138932 (6%) ø 21040 (4%) ø
spike_lk_coreled ✔️ 87980 (4%) ø 20168 (3%) ø
spike_lk_core_touch_sensor ✔️ 92820 (4%) ø 18736 (3%) ø
spike_lk_event_queue ✔️ 84152 (4%) ø 18808 (3%) ø
spike_lk_file_manager_kit ✔️ 154048 (7%) ø 21400 (4%) ø
spike_lk_file_reception ✔️ 331308 (15%) ø 34136 (6%) ø
spike_lk_flash_memory ✔️ 86776 (4%) ø 18120 (3%) ø
spike_lk_fs ✔️ 173976 (8%) ø 47976 (9%) ø
spike_lk_lcd ✔️ 171916 (8%) ø 53352 (10%) ø
spike_lk_led_kit ✔️ 115772 (5%) ø 21088 (4%) ø
spike_lk_log_kit ✔️ 84776 (4%) ø 19312 (3%) ø
spike_lk_motors ✔️ 86072 (4%) ø 18152 (3%) ø
spike_lk_qdac ✔️ 91572 (4%) ø 18680 (3%) ø
spike_lk_reinforcer ✔️ 112252 (5%) ø 21088 (4%) ø
spike_lk_rfid ✔️ 84764 (4%) ø 18088 (3%) ø
spike_lk_sensors_battery ✔️ 87120 (4%) ø 19184 (3%) ø
spike_lk_sensors_light ✔️ 84072 (4%) ø 18120 (3%) ø
spike_lk_sensors_microphone ✔️ 84760 (4%) ø 18120 (3%) ø
spike_lk_sensors_temperature_humidity ✔️ 90400 (4%) ø 18096 (3%) ø
spike_lk_sensors_touch ✔️ 91672 (4%) ø 18360 (3%) ø
spike_lk_serial_number ✔️ 136252 (6%) ø 20960 (3%) ø
spike_lk_ticker_timeout ✔️ 82712 (3%) ø 18136 (3%) ø
spike_lk_update_process_app_base ✔️ 147980 (7%) ø 21968 (4%) ø
spike_lk_update_process_app_update ✔️ 100392 (4%) ø 19144 (3%) ø
spike_lk_watchdog_isr ✔️ 88068 (4%) ø 20024 (3%) ø
spike_lk_wifi ✔️ 130832 (6%) ø 21432 (4%) ø
spike_mbed_blinky ✔️ 57616 (2%) ø 11496 (2%) ø
spike_mbed_watchdog_ticker_vs_thread ✔️ 84176 (4%) ø 18984 (3%) ø
spike_stl_cxxsupport ✔️ 83488 (3%) ø 18208 (3%) ø

🗺️ Map files diff output

Click to show diff list
functional_ut_imu (click to expand)

Flash used: 381260&nbsp;(18%) / total: 2097152
SRAM used: 27120&nbsp;(5%) / total: 524288
spike_lk_accel_gyro (click to expand)

Flash used: 93984&nbsp;(4%) / total: 2097152
SRAM used: 18472&nbsp;(3%) / total: 524288

@github-actions
Copy link

github-actions bot commented Oct 28, 2022

File comparision analysis report

🔖 Info

  • base: develop / 66d092f + mbed-os-6.15.1+fixes+gcc-11-support + -std=c++20
  • head: cedric-hugo/feature/Add-CoreIMU / 66d092f + mbed-os-6.15.1+fixes+gcc-11-support + -std=c++20
  • toolchain: GNU Arm Embedded Toolchain 10.3-2021.10 - 10.3.1 20210824
  • enable_log_debug: OFF
Target Flash Used (%) Flash Available (%) Static RAM (%)
bootloader 169508 (64%) 92636 (35%) 30920 (5%)
os 410792 (26%) 1153880 (73%) 79608 (15%)
Click to show memory sections
| -          |      Hex |     Bytes |  KiB |
|------------|---------:|----------:|-----:|
| Flash      | 0x200000 | 2 097 152 | 2048 |
| SRAM       |  0x80000 |   524 288 |  512 |
| Bootloader |  0x40000 |   262 144 |  256 |
| Header     |   0x1000 |     4 096 |    4 |
| OS         | 0x17E000 | 1 564 672 | 1528 |
| Tail       |   0x1000 |     4 096 |    4 |
| Scratch    |  0x40000 |   262 144 |  256 |

📝 Summary

Click to show summary
  • ✔️ - existing target
  • ✨ - new target
  • ⚰️ - deleted target
  • ✅ - files are the same
  • ❌ - files are different
Target Status .bin .map Total Flash (base/head) Total Flash Δ Static RAM (base/head) Static RAM Δ
LekaOS ✔️ 410792 (19%) ø 79608 (15%) ø
bootloader ✔️ 169508 (8%) ø 30920 (5%) ø
functional_ut_boost_ut ✔️ 384496 (18%) ø 20424 (3%) ø
functional_ut_file_manager ✔️ 373280 (17%) ø 20664 (3%) ø
functional_ut_imu - - 369644 (17%) - 20392 (3%) -
functional_ut_io_expander ✔️ 360200 (17%) ø 20392 (3%) ø
functional_ut_qdac ✔️ 361448 (17%) ø 20392 (3%) ø
spike_lk_accel_gyro - - 71184 (3%) - 11808 (2%) -
spike_lk_audio ✔️ 125076 (5%) ø 14568 (2%) ø
spike_lk_behavior_kit ✔️ 189752 (9%) ø 48120 (9%) ø
spike_lk_ble ✔️ 228768 (10%) ø 28200 (5%) ø
spike_lk_bluetooth ✔️ 82948 (3%) ø 11544 (2%) ø
spike_lk_cg_animations ✔️ 144696 (6%) ø 46528 (8%) ø
spike_lk_color_kit ✔️ 65776 (3%) ø 13744 (2%) ø
spike_lk_command_kit ✔️ 192520 (9%) ø 50944 (9%) ø
spike_lk_config_kit ✔️ 126956 (6%) ø 14312 (2%) ø
spike_lk_coreled ✔️ 76164 (3%) ø 13688 (2%) ø
spike_lk_core_touch_sensor ✔️ 80228 (3%) ø 12256 (2%) ø
spike_lk_event_queue ✔️ 74800 (3%) ø 12072 (2%) ø
spike_lk_file_manager_kit ✔️ 139016 (6%) ø 14416 (2%) ø
spike_lk_file_reception ✔️ 327112 (15%) ø 27576 (5%) ø
spike_lk_flash_memory ✔️ 63880 (3%) ø 11448 (2%) ø
spike_lk_fs ✔️ 174616 (8%) ø 47888 (9%) ø
spike_lk_lcd ✔️ 162236 (7%) ø 46616 (8%) ø
spike_lk_led_kit ✔️ 103992 (4%) ø 14608 (2%) ø
spike_lk_log_kit ✔️ 63288 (3%) ø 12256 (2%) ø
spike_lk_motors ✔️ 62600 (2%) ø 11488 (2%) ø
spike_lk_qdac ✔️ 78628 (3%) ø 11816 (2%) ø
spike_lk_reinforcer ✔️ 103480 (4%) ø 14608 (2%) ø
spike_lk_rfid ✔️ 80920 (3%) ø 11520 (2%) ø
spike_lk_sensors_battery ✔️ 78196 (3%) ø 12568 (2%) ø
spike_lk_sensors_light ✔️ 60056 (2%) ø 11440 (2%) ø
spike_lk_sensors_microphone ✔️ 72496 (3%) ø 11504 (2%) ø
spike_lk_sensors_temperature_humidity ✔️ 67048 (3%) ø 11424 (2%) ø
spike_lk_sensors_touch ✔️ 68600 (3%) ø 11432 (2%) ø
spike_lk_serial_number ✔️ 114244 (5%) ø 14056 (2%) ø
spike_lk_ticker_timeout ✔️ 69052 (3%) ø 11632 (2%) ø
spike_lk_update_process_app_base ✔️ 126092 (6%) ø 15296 (2%) ø
spike_lk_update_process_app_update ✔️ 77632 (3%) ø 12352 (2%) ø
spike_lk_watchdog_isr ✔️ 82032 (3%) ø 13288 (2%) ø
spike_lk_wifi ✔️ 116392 (5%) ø 14808 (2%) ø
spike_mbed_blinky ✔️ 58032 (2%) ø 11400 (2%) ø
spike_mbed_watchdog_ticker_vs_thread ✔️ 63208 (3%) ø 12448 (2%) ø
spike_stl_cxxsupport ✔️ 58456 (2%) ø 11400 (2%) ø

🗺️ Map files diff output

Click to show diff list
functional_ut_imu (click to expand)

Flash used: 369644&nbsp;(17%) / total: 2097152
SRAM used: 20392&nbsp;(3%) / total: 524288
spike_lk_accel_gyro (click to expand)

Flash used: 71184&nbsp;(3%) / total: 2097152
SRAM used: 11808&nbsp;(2%) / total: 524288

@HPezz HPezz force-pushed the cedric-hugo/feature/Add-CoreIMU branch 4 times, most recently from 57551af to 902cf1e Compare November 3, 2022 11:15
@HPezz HPezz self-assigned this Nov 3, 2022
@HPezz HPezz added the 01 - type: task Something to do label Nov 3, 2022
@HPezz HPezz added this to the Future Release milestone Nov 3, 2022
@HPezz HPezz force-pushed the cedric-hugo/feature/Add-CoreIMU branch from 902cf1e to c851851 Compare November 3, 2022 13:43
Copy link
Member

@ladislas ladislas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

First review, much better than yesterday! 👍

Did you investigate the ODR/fifo/data read we were talking about?

drivers/CoreIMU/include/CoreIMULSM6DSOX.h Outdated Show resolved Hide resolved
drivers/CoreIMU/include/CoreIMULSM6DSOX.h Outdated Show resolved Hide resolved
drivers/CoreIMU/CMakeLists.txt Show resolved Hide resolved
drivers/CoreIMU/include/CoreAccelerometer.h Outdated Show resolved Hide resolved
drivers/CoreIMU/include/CoreGyroscope.h Outdated Show resolved Hide resolved
drivers/CoreIMU/source/CoreAccelerometer.cpp Outdated Show resolved Hide resolved
drivers/CoreIMU/source/CoreGyroscope.cpp Outdated Show resolved Hide resolved
spikes/CMakeLists.txt Outdated Show resolved Hide resolved
spikes/lk_imu_app/main.cpp Outdated Show resolved Hide resolved
spikes/lk_imu_app/main.cpp Outdated Show resolved Hide resolved
Copy link
Member

@YannLocatelli YannLocatelli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your work!

drivers/CoreIMU/source/CoreLSM6DSOX.cpp Outdated Show resolved Hide resolved
drivers/CoreIMU/include/CoreLSM6DSOX.h Outdated Show resolved Hide resolved
drivers/CoreIMU/include/CoreLSM6DSOX.h Outdated Show resolved Hide resolved
drivers/CoreIMU/include/CoreLSM6DSOX.h Outdated Show resolved Hide resolved
drivers/CoreIMU/include/CoreLSM6DSOX.h Outdated Show resolved Hide resolved
drivers/CoreIMU/source/CoreLSM6DSOX.cpp Outdated Show resolved Hide resolved
drivers/CoreIMU/include/CoreLSM6DSOX.h Outdated Show resolved Hide resolved
drivers/CoreIMU/include/CoreLSM6DSOX.h Outdated Show resolved Hide resolved
drivers/CoreIMU/include/CoreAccelerometer.h Show resolved Hide resolved
drivers/CoreIMU/CMakeLists.txt Show resolved Hide resolved
@HPezz HPezz force-pushed the cedric-hugo/feature/Add-CoreIMU branch from c851851 to 575ba3d Compare November 4, 2022 17:52
Copy link
Member

@ladislas ladislas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

deuxième passage :) quelques retours mais c'est beaucoup mieux!

drivers/CoreIMU/include/CoreAccelerometer.h Outdated Show resolved Hide resolved
drivers/CoreIMU/include/CoreGyroscope.h Show resolved Hide resolved
drivers/CoreIMU/include/CoreGyroscope.h Outdated Show resolved Hide resolved
drivers/CoreIMU/include/CoreLSM6DSOX.h Outdated Show resolved Hide resolved
drivers/CoreIMU/include/CoreLSM6DSOX.h Outdated Show resolved Hide resolved
drivers/CoreIMU/tests/CoreLSM6DSOX_test.cpp Outdated Show resolved Hide resolved
spikes/lk_imu_app/main.cpp Outdated Show resolved Hide resolved
spikes/lk_imu_app/main.cpp Outdated Show resolved Hide resolved
spikes/lk_imu_app/main.cpp Outdated Show resolved Hide resolved
spikes/lk_imu_app/CMakeLists.txt Outdated Show resolved Hide resolved
@HPezz HPezz force-pushed the cedric-hugo/feature/Add-CoreIMU branch 7 times, most recently from b269203 to 9f57f7f Compare November 9, 2022 16:53
tests/functional/CMakeLists.txt Outdated Show resolved Hide resolved
drivers/CoreIMU/include/CoreLSM6DSOX.h Outdated Show resolved Hide resolved
drivers/CoreIMU/include/CoreLSM6DSOX.h Outdated Show resolved Hide resolved
drivers/CoreIMU/include/interface/LSM6DSOX.h Show resolved Hide resolved
drivers/CoreIMU/include/interface/LSM6DSOX.h Outdated Show resolved Hide resolved
@HPezz HPezz force-pushed the cedric-hugo/feature/Add-CoreIMU branch 5 times, most recently from 2f522f5 to a742451 Compare November 10, 2022 15:35
@HPezz HPezz force-pushed the cedric-hugo/feature/Add-CoreIMU branch 2 times, most recently from 647c2b4 to 3eff285 Compare November 10, 2022 15:43
Copy link
Member

@ladislas ladislas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent work! 👍

Copy link
Member

@YannLocatelli YannLocatelli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suggest to give some credit to Cedric and Camelia. Please add them as co-authors.

tests/functional/tests/imu/suite_lsm6dsox.cpp Outdated Show resolved Hide resolved
tests/functional/tests/imu/suite_lsm6dsox.cpp Show resolved Hide resolved
drivers/CoreIMU/source/CoreLSM6DSOX.cpp Show resolved Hide resolved
drivers/CoreIMU/tests/CoreLSM6DSOX_test.cpp Outdated Show resolved Hide resolved
drivers/CoreIMU/source/CoreLSM6DSOX.cpp Outdated Show resolved Hide resolved
drivers/CoreIMU/CMakeLists.txt Show resolved Hide resolved
@HPezz HPezz force-pushed the cedric-hugo/feature/Add-CoreIMU branch 2 times, most recently from 79ad0a7 to 389c207 Compare November 16, 2022 14:11
HPezz and others added 6 commits November 16, 2022 22:24
Co-authored-by: CedricDia <diavorini.cedric.dev@gmail.com>
Co-authored-by: CameliaB2 <camelia.bennamane@gmail.com>
Co-authored-by: CedricDia <diavorini.cedric.dev@gmail.com>
Co-authored-by: CameliaB2 <camelia.bennamane@gmail.com>
Co-authored-by: CedricDia <diavorini.cedric.dev@gmail.com>
Co-authored-by: CameliaB2 <camelia.bennamane@gmail.com>
Co-authored-by: CedricDia <diavorini.cedric.dev@gmail.com>
Co-authored-by: CameliaB2 <camelia.bennamane@gmail.com>
Co-authored-by: CedricDia <diavorini.cedric.dev@gmail.com>
Co-authored-by: CameliaB2 <camelia.bennamane@gmail.com>
Co-authored-by: CedricDia <diavorini.cedric.dev@gmail.com>
Co-authored-by: CameliaB2 <camelia.bennamane@gmail.com>
@ladislas ladislas force-pushed the cedric-hugo/feature/Add-CoreIMU branch from 389c207 to 47b1961 Compare November 16, 2022 21:39
@ladislas ladislas merged commit 66d092f into develop Nov 16, 2022
@ladislas ladislas deleted the cedric-hugo/feature/Add-CoreIMU branch November 16, 2022 21:42
@sonarcloud
Copy link

sonarcloud bot commented Nov 16, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

92.4% 92.4% Coverage
0.0% 0.0% Duplication

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
01 - type: task Something to do
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants