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

hugo/feature/Update MotionKit Rotation to Fusion #1314

Merged
merged 7 commits into from
Mar 9, 2023

Conversation

HPezz
Copy link
Contributor

@HPezz HPezz commented Mar 6, 2023

  • 🏗️ ((interface)): Add IMUKit interface
  • ⬆️ (IMUKit): IMUKit derive from interface
  • ✨ (IMUKit): Add onEulerAnglesReady function
  • ✨ (RotationControl): Replace PID by ControlRotation
  • ♻️ (MotionKit): Refactor MotionKit

@HPezz HPezz requested review from ladislas and YannLocatelli and removed request for ladislas March 6, 2023 09:40
@HPezz HPezz self-assigned this Mar 6, 2023
@HPezz HPezz added the 01 - type: task Something to do label Mar 6, 2023
@HPezz HPezz added this to the v1.4.0 milestone Mar 6, 2023
@github-actions
Copy link

github-actions bot commented Mar 6, 2023

🔖 Version comparison

Version Same as filename Same as os_version
os 1.3.0+1678356526 ✔️ ✔️
firmware
(bootloader + os)
1.3.0+1678356526 ✔️ ✔️

@HPezz HPezz force-pushed the hugo/feature/Update-MotionKit-Rotation-to-Fusion branch from 3088d4a to 9bd7ea9 Compare March 6, 2023 09:56
@github-actions
Copy link

github-actions bot commented Mar 6, 2023

📈 Changes Impact Analysis Report

📌 Info

  • toolchain: GNU Arm Embedded Toolchain 10.3-2021.10 - 10.3.1 20210824
  • enable_log_debug: OFF
base head
branch develop hugo/feature/Update-MotionKit-Rotation-to-Fusion
sha 7f0ccbd 4cf6ce9
mbed mbed-os@master+fixes+gcc-11-support mbed-os@master+fixes+gcc-11-support
-std -std=c++20 -std=c++20

🤖 Firmware impact analysis

Target Flash Used (base/head) Flash Used Δ Flash Available (base/head) Static RAM (base/head) Static RAM Δ
bootloader 170888 (65%) ø 91256 (34%)
91256 (34%)
30960 (5%) ø
os 445880 (28%)
446056 (28%)
📈
+176 (+0%)
1118792 (71%)
1118616 (71%)
83880 (15%)
83648 (15%)
📉
-232 (0%)
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 |

🔬 Detailed impact analysis

Click to show detailed analysis for all targets
  • ✔️ - 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 ✔️ 445880 (21%)
446056 (21%)
📈
+176 (+0%)
83880 (15%)
83648 (15%)
📉
-232 (0%)
bootloader ✔️ 170888 (8%) ø 30960 (5%) ø
functional_ut_boost_ut ✔️ 394140 (18%) ø 20456 (3%) ø
functional_ut_core_imu ✔️ 377656 (18%) ø 20968 (3%) ø
functional_ut_deep_sleep_core_buffered_serial ✔️ 360600 (17%) ø 20440 (3%) ø
functional_ut_deep_sleep_core_motor ✔️ 364540 (17%) ø 20480 (3%) ø
functional_ut_deep_sleep_core_pwm ✔️ 366676 (17%) ø 20480 (3%) ø
functional_ut_deep_sleep_log_kit ✔️ 352568 (16%) ø 20408 (3%) ø
functional_ut_deep_sleep_mbed_hal ✔️ 354344 (16%) ø 20408 (3%) ø
functional_ut_file_manager ✔️ 376272 (17%) ø 20696 (3%) ø
functional_ut_firmware_kit ✔️ 367084 (17%) ø 20688 (3%) ø
functional_ut_imu_kit ✔️ 381348 (18%)
381572 (18%)
📈
+224 (+0%)
21144 (4%) ø
functional_ut_io_expander ✔️ 359576 (17%) ø 20424 (3%) ø
functional_ut_qdac ✔️ 360744 (17%) ø 20424 (3%) ø
spike_lk_audio ✔️ 127092 (6%) ø 14592 (2%) ø
spike_lk_behavior_kit ✔️ 189440 (9%) ø 48096 (9%) ø
spike_lk_ble ✔️ 229600 (10%) ø 28472 (5%) ø
spike_lk_bluetooth ✔️ 82948 (3%) ø 11544 (2%) ø
spike_lk_cg_animations ✔️ 145976 (6%) ø 46528 (8%) ø
spike_lk_color_kit ✔️ 65840 (3%) ø 13744 (2%) ø
spike_lk_command_kit ✔️ 220552 (10%)
220712 (10%)
📈
+160 (+0%)
52872 (10%)
52640 (10%)
📉
-232 (0%)
spike_lk_config_kit ✔️ 127324 (6%) ø 14360 (2%) ø
spike_lk_coreled ✔️ 76292 (3%) ø 13688 (2%) ø
spike_lk_core_touch_sensor ✔️ 80508 (3%) ø 12248 (2%) ø
spike_lk_event_queue ✔️ 74800 (3%) ø 12072 (2%) ø
spike_lk_file_manager_kit ✔️ 139528 (6%) ø 14440 (2%) ø
spike_lk_file_reception ✔️ 336000 (16%) ø 27792 (5%) ø
spike_lk_flash_memory ✔️ 63880 (3%) ø 11448 (2%) ø
spike_lk_fs ✔️ 175668 (8%) ø 47928 (9%) ø
spike_lk_imu_kit ✔️ 98700 (4%)
98860 (4%)
📈
+160 (+0%)
13016 (2%)
13032 (2%)
📈
+16 (+0%)
spike_lk_lcd ✔️ 163352 (7%) ø 46680 (8%) ø
spike_lk_led_kit ✔️ 103424 (4%) ø 14528 (2%) ø
spike_lk_log_kit ✔️ 63288 (3%) ø 12256 (2%) ø
spike_lk_motion_kit ✔️ 111972 (5%)
111204 (5%)
📉
-768 (0%)
15408 (2%)
15168 (2%)
📉
-240 (-1%)
spike_lk_motors ✔️ 62864 (2%) ø 11488 (2%) ø
spike_lk_qdac ✔️ 78852 (3%) ø 11808 (2%) ø
spike_lk_reinforcer ✔️ 217768 (10%)
217944 (10%)
📈
+176 (+0%)
50064 (9%)
49824 (9%)
📉
-240 (0%)
spike_lk_rfid ✔️ 79084 (3%) ø 11504 (2%) ø
spike_lk_sensors_battery ✔️ 78388 (3%) ø 12600 (2%) ø
spike_lk_sensors_imu_lsm6dsox ✔️ 89468 (4%) ø 12824 (2%) ø
spike_lk_sensors_imu_lsm6dsox_fusion_calibration ✔️ 97916 (4%) ø 12952 (2%) ø
spike_lk_sensors_light ✔️ 60056 (2%) ø 11440 (2%) ø
spike_lk_sensors_microphone ✔️ 72496 (3%) ø 11504 (2%) ø
spike_lk_sensors_temperature_humidity ✔️ 67272 (3%) ø 11424 (2%) ø
spike_lk_serial_number ✔️ 133084 (6%) ø 14304 (2%) ø
spike_lk_ticker_timeout ✔️ 69052 (3%) ø 11632 (2%) ø
spike_lk_touch_sensor_kit ✔️ 87896 (4%) ø 12824 (2%) ø
spike_lk_update_process_app_base ✔️ 145620 (6%) ø 15576 (2%) ø
spike_lk_update_process_app_update ✔️ 77632 (3%) ø 12352 (2%) ø
spike_lk_watchdog_isr ✔️ 80196 (3%) ø 13288 (2%) ø
spike_lk_wifi ✔️ 116544 (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

LekaOS (click to expand)
--- build_artifacts/base_ref-build-enable_log_debug-OFF/LekaOS-map.txt	2023-03-09 10:14:11.651113860 +0000
+++ build_artifacts/head_ref-build-enable_log_debug-OFF/LekaOS-map.txt	2023-03-09 10:14:12.019110334 +0000
@@ -1,55 +1,55 @@
 | Module                     |           .text |       .data |          .bss |
 |----------------------------|-----------------|-------------|---------------|
-| [fill]                     |       658(+658) |     10(+10) |     250(+250) |
+| [fill]                     |       688(+688) |     10(+10) |     254(+254) |
 | [lib]/ActivityKit.a        |   10590(+10590) |       0(+0) |         0(+0) |
 | [lib]/BLEKit.a             |     1476(+1476) |       0(+0) |         0(+0) |
 | [lib]/BatteryKit.a         |       324(+324) |       0(+0) |         0(+0) |
 | [lib]/BehaviorKit.a        |     1652(+1652) |   460(+460) |         0(+0) |
 | [lib]/ColorKit.a           |       864(+864) |       0(+0) |         0(+0) |
 | [lib]/CommandKit.a         |     1120(+1120) |       0(+0) |         0(+0) |
 | [lib]/CoreBattery.a        |       544(+544) |       0(+0) |         0(+0) |
 | [lib]/CoreBufferedSerial.a |       196(+196) |       0(+0) |         0(+0) |
 | [lib]/CoreEventFlags.a     |       138(+138) |       0(+0) |         0(+0) |
 | [lib]/CoreEventQueue.a     |         44(+44) |       0(+0) |         0(+0) |
 | [lib]/CoreFlashMemory.a    |       546(+546) |       0(+0) |         0(+0) |
 | [lib]/CoreI2C.a            |         36(+36) |       0(+0) |         0(+0) |
 | [lib]/CoreIMU.a            |     6810(+6810) |       0(+0) |         0(+0) |
 | [lib]/CoreInterruptIn.a    |       118(+118) |       0(+0) |         0(+0) |
 | [lib]/CoreMCU.a            |         16(+16) |       0(+0) |         0(+0) |
 | [lib]/CoreMotor.a          |       176(+176) |       0(+0) |         0(+0) |
 | [lib]/CoreMutex.a          |           8(+8) |       0(+0) |         0(+0) |
 | [lib]/CorePwm.a            |         60(+60) |       0(+0) |         0(+0) |
 | [lib]/CoreQSPI.a           |       160(+160) |       0(+0) |         0(+0) |
 | [lib]/CoreRFIDReader.a     |       580(+580) |       0(+0) |         0(+0) |
 | [lib]/CoreSPI.a            |         28(+28) |       0(+0) |         0(+0) |
 | [lib]/CoreSTM32Hal.a       |       930(+930) |       0(+0) |         0(+0) |
 | [lib]/CoreTimeout.a        |       204(+204) |       0(+0) |         0(+0) |
 | [lib]/CoreVideo.a          |     7954(+7954) |       1(+1) | 30800(+30800) |
 | [lib]/CriticalSection.a    |           8(+8) |       0(+0) |         0(+0) |
 | [lib]/EventLoopKit.a       |       348(+348) |       0(+0) |         0(+0) |
 | [lib]/FileManagerKit.a     |     1786(+1786) |       0(+0) |         0(+0) |
 | [lib]/FirmwareKit.a        |       944(+944) |       0(+0) |         0(+0) |
 | [lib]/Fusion.a             |     2036(+2036) |       0(+0) |         0(+0) |
 | [lib]/HelloWorld.a         |         94(+94) |       0(+0) |         0(+0) |
-| [lib]/IMUKit.a             |       768(+768) |       0(+0) |     164(+164) |
+| [lib]/IMUKit.a             |       876(+876) |       0(+0) |     164(+164) |
 | [lib]/LedKit.a             |   19050(+19050) |       0(+0) |       20(+20) |
-| [lib]/MotionKit.a          |       838(+838) |       0(+0) |         0(+0) |
+| [lib]/MotionKit.a          |       848(+848) |       0(+0) |         0(+0) |
 | [lib]/RFIDKit.a            |     1054(+1054) |       0(+0) |         8(+8) |
 | [lib]/ReinforcerKit.a      |     1242(+1242) |   460(+460) |         0(+0) |
 | [lib]/SerialNumberKit.a    |       584(+584) |       0(+0) |         0(+0) |
 | [lib]/Utils.a              |         34(+34) |       0(+0) |         0(+0) |
 | [lib]/VideoKit.a           |       700(+700) |       0(+0) |       36(+36) |
 | [lib]/bootutil.a           |     1362(+1362) |     12(+12) |     132(+132) |
 | [lib]/c.a                  |   49944(+49944) | 2572(+2572) |       97(+97) |
 | [lib]/gcc.a                |     7688(+7688) |       0(+0) |         0(+0) |
 | [lib]/m.a                  |     5368(+5368) |       0(+0) |         0(+0) |
 | [lib]/mbed-os-static.a     | 180206(+180206) |   773(+773) | 19667(+19667) |
 | [lib]/misc                 |       188(+188) |       4(+4) |       28(+28) |
 | [lib]/nosys.a              |         32(+32) |       0(+0) |         0(+0) |
 | [lib]/stdc++.a             |   11964(+11964) |     16(+16) |     204(+204) |
 | __/__                      |       108(+108) |       0(+0) |         0(+0) |
-| main.cpp.obj               |   78470(+78470) |   108(+108) | 27730(+27730) |
-| Subtotals                  | 400048(+400048) | 4416(+4416) | 79136(+79136) |
-Total Static RAM memory (data + bss): 83552(+83552) bytes
-Total Flash memory (text + data): 404464(+404464) bytes
+| main.cpp.obj               |   78450(+78450) |   108(+108) | 27494(+27494) |
+| Subtotals                  | 400176(+400176) | 4416(+4416) | 78904(+78904) |
+Total Static RAM memory (data + bss): 83320(+83320) bytes
+Total Flash memory (text + data): 404592(+404592) bytes
 
Flash used: 446056 (21%) / total: 2097152
SRAM used: 83648 (15%) / total: 524288
functional_ut_imu_kit (click to expand)
--- build_artifacts/base_ref-build-enable_log_debug-OFF/functional_ut_imu_kit-map.txt	2023-03-09 10:14:18.019049720 +0000
+++ build_artifacts/head_ref-build-enable_log_debug-OFF/functional_ut_imu_kit-map.txt	2023-03-09 10:14:18.295046825 +0000
@@ -1,22 +1,22 @@
 | Module                  |           .text |       .data |          .bss |
 |-------------------------|-----------------|-------------|---------------|
-| [fill]                  |       200(+200) |     16(+16) |       45(+45) |
+| [fill]                  |       198(+198) |     16(+16) |       45(+45) |
 | [lib]/CoreEventQueue.a  |         76(+76) |       0(+0) |         0(+0) |
 | [lib]/CoreI2C.a         |         88(+88) |       0(+0) |         0(+0) |
 | [lib]/CoreIMU.a         |     6880(+6880) |       0(+0) |         0(+0) |
 | [lib]/CoreInterruptIn.a |       222(+222) |       0(+0) |         0(+0) |
 | [lib]/Fusion.a          |     2036(+2036) |       0(+0) |         0(+0) |
-| [lib]/IMUKit.a          |       742(+742) |       0(+0) |     164(+164) |
+| [lib]/IMUKit.a          |       920(+920) |       0(+0) |     164(+164) |
 | [lib]/c.a               |   73772(+73772) | 2574(+2574) |       97(+97) |
 | [lib]/gcc.a             |     7956(+7956) |       0(+0) |         0(+0) |
 | [lib]/m.a               |     4804(+4804) |       0(+0) |         0(+0) |
 | [lib]/mbed-os-static.a  |   59044(+59044) |   460(+460) | 10751(+10751) |
 | [lib]/misc              |       188(+188) |       4(+4) |       28(+28) |
 | [lib]/nosys.a           |         32(+32) |       0(+0) |         0(+0) |
 | [lib]/stdc++.a          | 173924(+173924) |   145(+145) |   5720(+5720) |
 | __/__                   |     1938(+1938) |       1(+1) |     817(+817) |
-| suite_imu_kit.cpp.obj   |     2802(+2802) |       0(+0) |         2(+2) |
-| Subtotals               | 334704(+334704) | 3200(+3200) | 17624(+17624) |
+| suite_imu_kit.cpp.obj   |     2818(+2818) |       0(+0) |         2(+2) |
+| Subtotals               | 334896(+334896) | 3200(+3200) | 17624(+17624) |
 Total Static RAM memory (data + bss): 20824(+20824) bytes
-Total Flash memory (text + data): 337904(+337904) bytes
+Total Flash memory (text + data): 338096(+338096) bytes
 
Flash used: 381572 (18%) / total: 2097152
SRAM used: 21144 (4%) / total: 524288
spike_lk_command_kit (click to expand)
--- build_artifacts/base_ref-build-enable_log_debug-OFF/spike_lk_command_kit-map.txt	2023-03-09 10:14:22.191005964 +0000
+++ build_artifacts/head_ref-build-enable_log_debug-OFF/spike_lk_command_kit-map.txt	2023-03-09 10:14:22.419003573 +0000
@@ -1,40 +1,40 @@
 | Module                  |           .text |       .data |          .bss |
 |-------------------------|-----------------|-------------|---------------|
-| [fill]                  |       272(+272) |       5(+5) |       40(+40) |
+| [fill]                  |       290(+290) |       5(+5) |       44(+44) |
 | [lib]/ColorKit.a        |       864(+864) |       0(+0) |         0(+0) |
 | [lib]/CommandKit.a      |     1152(+1152) |       0(+0) |         0(+0) |
 | [lib]/CoreEventFlags.a  |       138(+138) |       0(+0) |         0(+0) |
 | [lib]/CoreEventQueue.a  |       126(+126) |       0(+0) |         0(+0) |
 | [lib]/CoreI2C.a         |         36(+36) |       0(+0) |         0(+0) |
 | [lib]/CoreIMU.a         |     6810(+6810) |       0(+0) |         0(+0) |
 | [lib]/CoreInterruptIn.a |       136(+136) |       0(+0) |         0(+0) |
 | [lib]/CoreMotor.a       |       176(+176) |       0(+0) |         0(+0) |
 | [lib]/CorePwm.a         |         60(+60) |       0(+0) |         0(+0) |
 | [lib]/CoreSPI.a         |         28(+28) |       0(+0) |         0(+0) |
 | [lib]/CoreSTM32Hal.a    |       930(+930) |       0(+0) |         0(+0) |
 | [lib]/CoreTimeout.a     |       204(+204) |       0(+0) |         0(+0) |
 | [lib]/CoreVideo.a       |     7954(+7954) |       1(+1) | 30800(+30800) |
 | [lib]/CriticalSection.a |           8(+8) |       0(+0) |         0(+0) |
 | [lib]/EventLoopKit.a    |       348(+348) |       0(+0) |         0(+0) |
 | [lib]/FileManagerKit.a  |     1228(+1228) |       0(+0) |         0(+0) |
 | [lib]/Fusion.a          |     2036(+2036) |       0(+0) |         0(+0) |
 | [lib]/HelloWorld.a      |         94(+94) |       0(+0) |         0(+0) |
-| [lib]/IMUKit.a          |       768(+768) |       0(+0) |     164(+164) |
+| [lib]/IMUKit.a          |       876(+876) |       0(+0) |     164(+164) |
 | [lib]/LedKit.a          |   19050(+19050) |       0(+0) |       20(+20) |
-| [lib]/MotionKit.a       |       838(+838) |       0(+0) |         0(+0) |
+| [lib]/MotionKit.a       |       848(+848) |       0(+0) |         0(+0) |
 | [lib]/ReinforcerKit.a   |     1726(+1726) |   460(+460) |         0(+0) |
 | [lib]/Utils.a           |         34(+34) |       0(+0) |         0(+0) |
 | [lib]/VideoKit.a        |       884(+884) |       0(+0) |       36(+36) |
 | [lib]/c.a               |   42000(+42000) | 2572(+2572) |       97(+97) |
 | [lib]/gcc.a             |     7688(+7688) |       0(+0) |         0(+0) |
 | [lib]/m.a               |     5008(+5008) |       0(+0) |         0(+0) |
 | [lib]/mbed-os-static.a  |   74512(+74512) |   464(+464) | 10827(+10827) |
 | [lib]/misc              |       188(+188) |       4(+4) |       28(+28) |
 | [lib]/nosys.a           |         32(+32) |       0(+0) |         0(+0) |
 | [lib]/stdc++.a          |   10296(+10296) |     16(+16) |     204(+204) |
 | __/__                   |       108(+108) |       0(+0) |         0(+0) |
-| main.cpp.obj            |     5324(+5324) |   278(+278) |   6536(+6536) |
-| Subtotals               | 191056(+191056) | 3800(+3800) | 48752(+48752) |
-Total Static RAM memory (data + bss): 52552(+52552) bytes
-Total Flash memory (text + data): 194856(+194856) bytes
+| main.cpp.obj            |     5316(+5316) |   278(+278) |   6300(+6300) |
+| Subtotals               | 191184(+191184) | 3800(+3800) | 48520(+48520) |
+Total Static RAM memory (data + bss): 52320(+52320) bytes
+Total Flash memory (text + data): 194984(+194984) bytes
 
Flash used: 220712 (10%) / total: 2097152
SRAM used: 52640 (10%) / total: 524288
spike_lk_imu_kit (click to expand)
--- build_artifacts/base_ref-build-enable_log_debug-OFF/spike_lk_imu_kit-map.txt	2023-03-09 10:14:25.738969706 +0000
+++ build_artifacts/head_ref-build-enable_log_debug-OFF/spike_lk_imu_kit-map.txt	2023-03-09 10:14:25.902968035 +0000
@@ -1,22 +1,22 @@
 | Module                  |         .text |       .data |        .bss |
 |-------------------------|---------------|-------------|-------------|
-| [fill]                  |     186(+186) |       8(+8) |     38(+38) |
+| [fill]                  |     140(+140) |       8(+8) |     34(+34) |
 | [lib]/CoreEventQueue.a  |     126(+126) |       0(+0) |       0(+0) |
 | [lib]/CoreI2C.a         |       36(+36) |       0(+0) |       0(+0) |
 | [lib]/CoreIMU.a         |   6810(+6810) |       0(+0) |       0(+0) |
 | [lib]/CoreInterruptIn.a |     222(+222) |       0(+0) |       0(+0) |
 | [lib]/Fusion.a          |   2036(+2036) |       0(+0) |       0(+0) |
 | [lib]/HelloWorld.a      |       94(+94) |       0(+0) |       0(+0) |
-| [lib]/IMUKit.a          |     766(+766) |       0(+0) |   164(+164) |
+| [lib]/IMUKit.a          |     876(+876) |       0(+0) |   164(+164) |
 | [lib]/c.a               | 26028(+26028) | 2472(+2472) |     58(+58) |
 | [lib]/gcc.a             |   7624(+7624) |       0(+0) |       0(+0) |
 | [lib]/m.a               |   4804(+4804) |       0(+0) |       0(+0) |
 | [lib]/mbed-os-static.a  | 35916(+35916) |   444(+444) | 8660(+8660) |
 | [lib]/misc              |     188(+188) |       4(+4) |     28(+28) |
 | [lib]/nosys.a           |       32(+32) |       0(+0) |       0(+0) |
 | [lib]/stdc++.a          |   4116(+4116) |       8(+8) |     28(+28) |
-| main.cpp.obj            |     520(+520) |       0(+0) |   808(+808) |
-| Subtotals               | 89504(+89504) | 2936(+2936) | 9784(+9784) |
-Total Static RAM memory (data + bss): 12720(+12720) bytes
-Total Flash memory (text + data): 92440(+92440) bytes
+| main.cpp.obj            |     584(+584) |       0(+0) |   828(+828) |
+| Subtotals               | 89632(+89632) | 2936(+2936) | 9800(+9800) |
+Total Static RAM memory (data + bss): 12736(+12736) bytes
+Total Flash memory (text + data): 92568(+92568) bytes
 
Flash used: 98860 (4%) / total: 2097152
SRAM used: 13032 (2%) / total: 524288
spike_lk_motion_kit (click to expand)
--- build_artifacts/base_ref-build-enable_log_debug-OFF/spike_lk_motion_kit-map.txt	2023-03-09 10:14:27.266954140 +0000
+++ build_artifacts/head_ref-build-enable_log_debug-OFF/spike_lk_motion_kit-map.txt	2023-03-09 10:14:27.434952429 +0000
@@ -1,31 +1,29 @@
 | Module                     |           .text |       .data |          .bss |
 |----------------------------|-----------------|-------------|---------------|
-| [fill]                     |       158(+158) |       8(+8) |       34(+34) |
+| [fill]                     |       162(+162) |       8(+8) |       34(+34) |
 | [lib]/CoreBufferedSerial.a |       196(+196) |       0(+0) |         0(+0) |
-| [lib]/CoreEventFlags.a     |       138(+138) |       0(+0) |         0(+0) |
 | [lib]/CoreEventQueue.a     |         76(+76) |       0(+0) |         0(+0) |
 | [lib]/CoreI2C.a            |         36(+36) |       0(+0) |         0(+0) |
 | [lib]/CoreIMU.a            |     6810(+6810) |       0(+0) |         0(+0) |
 | [lib]/CoreInterruptIn.a    |       222(+222) |       0(+0) |         0(+0) |
 | [lib]/CoreMotor.a          |       176(+176) |       0(+0) |         0(+0) |
 | [lib]/CorePwm.a            |         60(+60) |       0(+0) |         0(+0) |
 | [lib]/CoreRFIDReader.a     |       616(+616) |       0(+0) |         0(+0) |
 | [lib]/CoreTimeout.a        |       204(+204) |       0(+0) |         0(+0) |
-| [lib]/EventLoopKit.a       |       348(+348) |       0(+0) |         0(+0) |
 | [lib]/Fusion.a             |     2036(+2036) |       0(+0) |         0(+0) |
 | [lib]/HelloWorld.a         |         94(+94) |       0(+0) |         0(+0) |
-| [lib]/IMUKit.a             |       768(+768) |       0(+0) |     164(+164) |
-| [lib]/MotionKit.a          |       884(+884) |       0(+0) |         0(+0) |
+| [lib]/IMUKit.a             |       876(+876) |       0(+0) |     164(+164) |
+| [lib]/MotionKit.a          |       848(+848) |       0(+0) |         0(+0) |
 | [lib]/RFIDKit.a            |     1046(+1046) |       0(+0) |         8(+8) |
 | [lib]/c.a                  |   26128(+26128) | 2472(+2472) |       58(+58) |
 | [lib]/gcc.a                |     7688(+7688) |       0(+0) |         0(+0) |
 | [lib]/m.a                  |     4804(+4804) |       0(+0) |         0(+0) |
-| [lib]/mbed-os-static.a     |   42372(+42372) |   444(+444) |   8772(+8772) |
+| [lib]/mbed-os-static.a     |   42182(+42182) |   444(+444) |   8772(+8772) |
 | [lib]/misc                 |       188(+188) |       4(+4) |       28(+28) |
 | [lib]/nosys.a              |         32(+32) |       0(+0) |         0(+0) |
 | [lib]/stdc++.a             |     4116(+4116) |       8(+8) |       28(+28) |
-| main.cpp.obj               |     1956(+1956) |       0(+0) |   3084(+3084) |
-| Subtotals                  | 101152(+101152) | 2936(+2936) | 12176(+12176) |
-Total Static RAM memory (data + bss): 15112(+15112) bytes
-Total Flash memory (text + data): 104088(+104088) bytes
+| main.cpp.obj               |     1852(+1852) |       0(+0) |   2844(+2844) |
+| Subtotals                  | 100448(+100448) | 2936(+2936) | 11936(+11936) |
+Total Static RAM memory (data + bss): 14872(+14872) bytes
+Total Flash memory (text + data): 103384(+103384) bytes
 
Flash used: 111204 (5%) / total: 2097152
SRAM used: 15168 (2%) / total: 524288
spike_lk_reinforcer (click to expand)
--- build_artifacts/base_ref-build-enable_log_debug-OFF/spike_lk_reinforcer-map.txt	2023-03-09 10:14:28.386942731 +0000
+++ build_artifacts/head_ref-build-enable_log_debug-OFF/spike_lk_reinforcer-map.txt	2023-03-09 10:14:28.610940449 +0000
@@ -1,37 +1,37 @@
 | Module                  |           .text |       .data |          .bss |
 |-------------------------|-----------------|-------------|---------------|
-| [fill]                  |       274(+274) |       3(+3) |       48(+48) |
+| [fill]                  |       288(+288) |       3(+3) |       44(+44) |
 | [lib]/ColorKit.a        |       864(+864) |       0(+0) |         0(+0) |
 | [lib]/CoreEventFlags.a  |       138(+138) |       0(+0) |         0(+0) |
 | [lib]/CoreEventQueue.a  |       126(+126) |       0(+0) |         0(+0) |
 | [lib]/CoreI2C.a         |         36(+36) |       0(+0) |         0(+0) |
 | [lib]/CoreIMU.a         |     6810(+6810) |       0(+0) |         0(+0) |
 | [lib]/CoreInterruptIn.a |       136(+136) |       0(+0) |         0(+0) |
 | [lib]/CoreMotor.a       |       176(+176) |       0(+0) |         0(+0) |
 | [lib]/CorePwm.a         |         60(+60) |       0(+0) |         0(+0) |
 | [lib]/CoreSPI.a         |         28(+28) |       0(+0) |         0(+0) |
 | [lib]/CoreSTM32Hal.a    |       930(+930) |       0(+0) |         0(+0) |
 | [lib]/CoreTimeout.a     |       204(+204) |       0(+0) |         0(+0) |
 | [lib]/CoreVideo.a       |     7954(+7954) |       1(+1) | 30800(+30800) |
 | [lib]/EventLoopKit.a    |       348(+348) |       0(+0) |         0(+0) |
 | [lib]/FileManagerKit.a  |     1228(+1228) |       0(+0) |         0(+0) |
 | [lib]/Fusion.a          |     2036(+2036) |       0(+0) |         0(+0) |
 | [lib]/HelloWorld.a      |         94(+94) |       0(+0) |         0(+0) |
-| [lib]/IMUKit.a          |       768(+768) |       0(+0) |     164(+164) |
+| [lib]/IMUKit.a          |       876(+876) |       0(+0) |     164(+164) |
 | [lib]/LedKit.a          |   19050(+19050) |       0(+0) |       20(+20) |
-| [lib]/MotionKit.a       |       838(+838) |       0(+0) |         0(+0) |
+| [lib]/MotionKit.a       |       848(+848) |       0(+0) |         0(+0) |
 | [lib]/ReinforcerKit.a   |     1696(+1696) |   460(+460) |         0(+0) |
 | [lib]/VideoKit.a        |       884(+884) |       0(+0) |       36(+36) |
 | [lib]/c.a               |   42000(+42000) | 2572(+2572) |       97(+97) |
 | [lib]/gcc.a             |     7688(+7688) |       0(+0) |         0(+0) |
 | [lib]/m.a               |     5008(+5008) |       0(+0) |         0(+0) |
 | [lib]/mbed-os-static.a  |   74512(+74512) |   464(+464) | 10827(+10827) |
 | [lib]/misc              |       188(+188) |       4(+4) |       28(+28) |
 | [lib]/nosys.a           |         32(+32) |       0(+0) |         0(+0) |
 | [lib]/stdc++.a          |   10296(+10296) |     16(+16) |     204(+204) |
 | __/__                   |       108(+108) |       0(+0) |         0(+0) |
-| main.cpp.obj            |     4242(+4242) |       8(+8) |   3992(+3992) |
-| Subtotals               | 188752(+188752) | 3528(+3528) | 46216(+46216) |
-Total Static RAM memory (data + bss): 49744(+49744) bytes
-Total Flash memory (text + data): 192280(+192280) bytes
+| main.cpp.obj            |     4238(+4238) |       8(+8) |   3756(+3756) |
+| Subtotals               | 188880(+188880) | 3528(+3528) | 45976(+45976) |
+Total Static RAM memory (data + bss): 49504(+49504) bytes
+Total Flash memory (text + data): 192408(+192408) bytes
 
Flash used: 217944 (10%) / total: 2097152
SRAM used: 49824 (9%) / total: 524288

@codecov
Copy link

codecov bot commented Mar 6, 2023

Codecov Report

Merging #1314 (4cf6ce9) into develop (7f0ccbd) will decrease coverage by 0.01%.
The diff coverage is 100.00%.

@@             Coverage Diff             @@
##           develop    #1314      +/-   ##
===========================================
- Coverage    98.73%   98.73%   -0.01%     
===========================================
  Files          145      145              
  Lines         3729     3726       -3     
===========================================
- Hits          3682     3679       -3     
  Misses          47       47              
Impacted Files Coverage Δ
libs/IMUKit/include/IMUKit.hpp 100.00% <ø> (ø)
libs/ReinforcerKit/include/ReinforcerKit.h 100.00% <ø> (ø)
libs/IMUKit/source/IMUKit.cpp 100.00% <100.00%> (ø)
libs/MotionKit/include/MotionKit.hpp 100.00% <100.00%> (ø)
libs/MotionKit/include/RotationControl.hpp 100.00% <100.00%> (ø)
libs/MotionKit/source/MotionKit.cpp 100.00% <100.00%> (ø)
libs/MotionKit/source/RotationControl.cpp 100.00% <100.00%> (ø)
libs/ReinforcerKit/source/ReinforcerKit.cpp 100.00% <100.00%> (ø)

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

@HPezz HPezz force-pushed the hugo/feature/Update-MotionKit-Rotation-to-Fusion branch from 9bd7ea9 to f60a856 Compare March 6, 2023 10:51
@github-actions
Copy link

github-actions bot commented Mar 6, 2023

📈 Changes Impact Analysis Report

📌 Info

  • toolchain: GNU Arm Embedded Toolchain 10.3-2021.10 - 10.3.1 20210824
  • enable_log_debug: ON
base head
branch develop hugo/feature/Update-MotionKit-Rotation-to-Fusion
sha 7f0ccbd 4cf6ce9
mbed mbed-os@master+fixes+gcc-11-support mbed-os@master+fixes+gcc-11-support
-std -std=c++20 -std=c++20

🤖 Firmware impact analysis

Target Flash Used (base/head) Flash Used Δ Flash Available (base/head) Static RAM (base/head) Static RAM Δ
bootloader 183692 (70%) ø 78452 (29%)
78452 (29%)
41664 (7%) ø
os 507436 (32%)
507612 (32%)
📈
+176 (+0%)
1057236 (67%)
1057060 (67%)
95104 (18%)
94872 (18%)
📉
-232 (0%)
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 |

🔬 Detailed impact analysis

Click to show detailed analysis for all targets
  • ✔️ - 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 ✔️ 507436 (24%)
507612 (24%)
📈
+176 (+0%)
95104 (18%)
94872 (18%)
📉
-232 (0%)
bootloader ✔️ 183692 (8%) ø 41664 (7%) ø
functional_ut_boost_ut ✔️ 409276 (19%) ø 30608 (5%) ø
functional_ut_core_imu ✔️ 385140 (18%) ø 31120 (5%) ø
functional_ut_deep_sleep_core_buffered_serial ✔️ 368332 (17%) ø 30560 (5%) ø
functional_ut_deep_sleep_core_motor ✔️ 376140 (17%) ø 30632 (5%) ø
functional_ut_deep_sleep_core_pwm ✔️ 378356 (18%) ø 30632 (5%) ø
functional_ut_deep_sleep_log_kit ✔️ 365268 (17%) ø 30976 (5%) ø
functional_ut_deep_sleep_mbed_hal ✔️ 366712 (17%) ø 30560 (5%) ø
functional_ut_file_manager ✔️ 388092 (18%) ø 30856 (5%) ø
functional_ut_firmware_kit ✔️ 379116 (18%) ø 30848 (5%) ø
functional_ut_imu_kit ✔️ 388896 (18%)
389120 (18%)
📈
+224 (+0%)
31296 (5%) ø
functional_ut_io_expander ✔️ 371176 (17%) ø 30576 (5%) ø
functional_ut_qdac ✔️ 372344 (17%) ø 30576 (5%) ø
spike_lk_audio ✔️ 137724 (6%) ø 25168 (4%) ø
spike_lk_behavior_kit ✔️ 198500 (9%) ø 58672 (11%) ø
spike_lk_ble ✔️ 237980 (11%) ø 39416 (7%) ø
spike_lk_bluetooth ✔️ 92364 (4%) ø 22224 (4%) ø
spike_lk_cg_animations ✔️ 153672 (7%) ø 57224 (10%) ø
spike_lk_color_kit ✔️ 88544 (4%) ø 24376 (4%) ø
spike_lk_command_kit ✔️ 229972 (10%)
230068 (10%)
📈
+96 (+0%)
63960 (12%)
63728 (12%)
📉
-232 (0%)
spike_lk_config_kit ✔️ 139780 (6%) ø 25184 (4%) ø
spike_lk_coreled ✔️ 88108 (4%) ø 24264 (4%) ø
spike_lk_core_touch_sensor ✔️ 93164 (4%) ø 22824 (4%) ø
spike_lk_event_queue ✔️ 84152 (4%) ø 22904 (4%) ø
spike_lk_file_manager_kit ✔️ 154560 (7%) ø 25520 (4%) ø
spike_lk_file_reception ✔️ 339964 (16%) ø 38448 (7%) ø
spike_lk_flash_memory ✔️ 86776 (4%) ø 22216 (4%) ø
spike_lk_fs ✔️ 178228 (8%) ø 57536 (10%) ø
spike_lk_imu_kit ✔️ 107280 (5%)
107504 (5%)
📈
+224 (+0%)
23728 (4%)
23744 (4%)
📈
+16 (+0%)
spike_lk_lcd ✔️ 173500 (8%) ø 57520 (10%) ø
spike_lk_led_kit ✔️ 115204 (5%) ø 25104 (4%) ø
spike_lk_log_kit ✔️ 84776 (4%) ø 23408 (4%) ø
spike_lk_motion_kit ✔️ 117008 (5%)
116240 (5%)
📉
-768 (0%)
25952 (4%)
25712 (4%)
📉
-240 (0%)
spike_lk_motors ✔️ 86336 (4%) ø 22248 (4%) ø
spike_lk_qdac ✔️ 91796 (4%) ø 22768 (4%) ø
spike_lk_reinforcer ✔️ 225428 (10%)
225588 (10%)
📈
+160 (+0%)
60640 (11%)
60400 (11%)
📉
-240 (0%)
spike_lk_rfid ✔️ 84216 (4%) ø 22184 (4%) ø
spike_lk_sensors_battery ✔️ 87376 (4%) ø 23312 (4%) ø
spike_lk_sensors_imu_lsm6dsox ✔️ 98624 (4%) ø 23536 (4%) ø
spike_lk_sensors_imu_lsm6dsox_fusion_calibration ✔️ 105064 (5%) ø 23104 (4%) ø
spike_lk_sensors_light ✔️ 84072 (4%) ø 22216 (4%) ø
spike_lk_sensors_microphone ✔️ 84824 (4%) ø 22216 (4%) ø
spike_lk_sensors_temperature_humidity ✔️ 90616 (4%) ø 22192 (4%) ø
spike_lk_serial_number ✔️ 145028 (6%) ø 25256 (4%) ø
spike_lk_ticker_timeout ✔️ 82712 (3%) ø 22232 (4%) ø
spike_lk_touch_sensor_kit ✔️ 96668 (4%) ø 23392 (4%) ø
spike_lk_update_process_app_base ✔️ 157932 (7%) ø 26288 (5%) ø
spike_lk_update_process_app_update ✔️ 100456 (4%) ø 23240 (4%) ø
spike_lk_watchdog_isr ✔️ 87520 (4%) ø 24136 (4%) ø
spike_lk_wifi ✔️ 130984 (6%) ø 25528 (4%) ø
spike_mbed_blinky ✔️ 57616 (2%) ø 11496 (2%) ø
spike_mbed_watchdog_ticker_vs_thread ✔️ 84176 (4%) ø 23080 (4%) ø
spike_stl_cxxsupport ✔️ 83488 (3%) ø 22304 (4%) ø

🗺️ Map files diff output

LekaOS (click to expand)
--- build_artifacts/base_ref-build-enable_log_debug-ON/LekaOS-map.txt	2023-03-09 10:13:08.766385526 +0000
+++ build_artifacts/head_ref-build-enable_log_debug-ON/LekaOS-map.txt	2023-03-09 10:13:09.138383778 +0000
@@ -1,55 +1,55 @@
 | Module                     |           .text |       .data |          .bss |
 |----------------------------|-----------------|-------------|---------------|
-| [fill]                     |       624(+624) |     10(+10) |     271(+271) |
+| [fill]                     |       654(+654) |     10(+10) |     275(+275) |
 | [lib]/ActivityKit.a        |   10590(+10590) |       0(+0) |         0(+0) |
 | [lib]/BLEKit.a             |     1476(+1476) |       0(+0) |         0(+0) |
 | [lib]/BatteryKit.a         |       324(+324) |       0(+0) |         0(+0) |
 | [lib]/BehaviorKit.a        |     1652(+1652) |   460(+460) |         0(+0) |
 | [lib]/ColorKit.a           |       864(+864) |       0(+0) |         0(+0) |
 | [lib]/CommandKit.a         |     1120(+1120) |       0(+0) |         0(+0) |
 | [lib]/CoreBattery.a        |       544(+544) |       0(+0) |         0(+0) |
 | [lib]/CoreBufferedSerial.a |       196(+196) |       0(+0) |         0(+0) |
 | [lib]/CoreEventFlags.a     |       138(+138) |       0(+0) |         0(+0) |
 | [lib]/CoreEventQueue.a     |         44(+44) |       0(+0) |         0(+0) |
 | [lib]/CoreFlashMemory.a    |       546(+546) |       0(+0) |         0(+0) |
 | [lib]/CoreI2C.a            |         36(+36) |       0(+0) |         0(+0) |
 | [lib]/CoreIMU.a            |     6810(+6810) |       0(+0) |         0(+0) |
 | [lib]/CoreInterruptIn.a    |       118(+118) |       0(+0) |         0(+0) |
 | [lib]/CoreMCU.a            |         16(+16) |       0(+0) |         0(+0) |
 | [lib]/CoreMotor.a          |       176(+176) |       0(+0) |         0(+0) |
 | [lib]/CoreMutex.a          |           8(+8) |       0(+0) |         0(+0) |
 | [lib]/CorePwm.a            |         60(+60) |       0(+0) |         0(+0) |
 | [lib]/CoreQSPI.a           |       160(+160) |       0(+0) |         0(+0) |
 | [lib]/CoreRFIDReader.a     |       580(+580) |       0(+0) |         0(+0) |
 | [lib]/CoreSPI.a            |         28(+28) |       0(+0) |         0(+0) |
 | [lib]/CoreSTM32Hal.a       |       930(+930) |       0(+0) |         0(+0) |
 | [lib]/CoreTimeout.a        |       204(+204) |       0(+0) |         0(+0) |
 | [lib]/CoreVideo.a          |     7954(+7954) |       1(+1) | 30800(+30800) |
 | [lib]/CriticalSection.a    |           8(+8) |       0(+0) |         0(+0) |
 | [lib]/EventLoopKit.a       |       348(+348) |       0(+0) |         0(+0) |
 | [lib]/FileManagerKit.a     |     2294(+2294) |       0(+0) |         0(+0) |
 | [lib]/FirmwareKit.a        |       944(+944) |       0(+0) |         0(+0) |
 | [lib]/Fusion.a             |     2036(+2036) |       0(+0) |         0(+0) |
 | [lib]/HelloWorld.a         |         94(+94) |       0(+0) |         0(+0) |
-| [lib]/IMUKit.a             |       768(+768) |       0(+0) |     164(+164) |
+| [lib]/IMUKit.a             |       876(+876) |       0(+0) |     164(+164) |
 | [lib]/LedKit.a             |   19050(+19050) |       0(+0) |       20(+20) |
-| [lib]/MotionKit.a          |       838(+838) |       0(+0) |         0(+0) |
+| [lib]/MotionKit.a          |       848(+848) |       0(+0) |         0(+0) |
 | [lib]/RFIDKit.a            |     1054(+1054) |       0(+0) |         8(+8) |
 | [lib]/ReinforcerKit.a      |     1242(+1242) |   460(+460) |         0(+0) |
 | [lib]/SerialNumberKit.a    |       584(+584) |       0(+0) |         0(+0) |
 | [lib]/Utils.a              |         34(+34) |       0(+0) |         0(+0) |
 | [lib]/VideoKit.a           |       686(+686) |       0(+0) |       36(+36) |
 | [lib]/bootutil.a           |     1362(+1362) |     12(+12) |     132(+132) |
 | [lib]/c.a                  |   48840(+48840) | 2572(+2572) |       97(+97) |
 | [lib]/gcc.a                |     7688(+7688) |       0(+0) |         0(+0) |
 | [lib]/m.a                  |     5368(+5368) |       0(+0) |         0(+0) |
 | [lib]/mbed-os-static.a     | 181458(+181458) |   773(+773) | 19755(+19755) |
 | [lib]/misc                 |       188(+188) |       4(+4) |       28(+28) |
 | [lib]/nosys.a              |         32(+32) |       0(+0) |         0(+0) |
 | [lib]/stdc++.a             |   12012(+12012) |     16(+16) |     204(+204) |
 | __/__                      |       108(+108) |       0(+0) |         0(+0) |
-| main.cpp.obj               | 138742(+138742) |   108(+108) | 38837(+38837) |
-| Subtotals                  | 460976(+460976) | 4416(+4416) | 90352(+90352) |
-Total Static RAM memory (data + bss): 94768(+94768) bytes
-Total Flash memory (text + data): 465392(+465392) bytes
+| main.cpp.obj               | 138722(+138722) |   108(+108) | 38601(+38601) |
+| Subtotals                  | 461104(+461104) | 4416(+4416) | 90120(+90120) |
+Total Static RAM memory (data + bss): 94536(+94536) bytes
+Total Flash memory (text + data): 465520(+465520) bytes
 
Flash used: 507612&nbsp;(24%) / total: 2097152
SRAM used: 94872&nbsp;(18%) / total: 524288
functional_ut_imu_kit (click to expand)
--- build_artifacts/base_ref-build-enable_log_debug-ON/functional_ut_imu_kit-map.txt	2023-03-09 10:13:15.350354207 +0000
+++ build_artifacts/head_ref-build-enable_log_debug-ON/functional_ut_imu_kit-map.txt	2023-03-09 10:13:15.638352791 +0000
@@ -1,23 +1,23 @@
 | Module                  |           .text |       .data |          .bss |
 |-------------------------|-----------------|-------------|---------------|
-| [fill]                  |       208(+208) |     16(+16) |       49(+49) |
+| [fill]                  |       206(+206) |     16(+16) |       49(+49) |
 | [lib]/CoreEventQueue.a  |         44(+44) |       0(+0) |         0(+0) |
 | [lib]/CoreI2C.a         |         88(+88) |       0(+0) |         0(+0) |
 | [lib]/CoreIMU.a         |     6880(+6880) |       0(+0) |         0(+0) |
 | [lib]/CoreInterruptIn.a |       222(+222) |       0(+0) |         0(+0) |
 | [lib]/CriticalSection.a |           8(+8) |       0(+0) |         0(+0) |
 | [lib]/Fusion.a          |     2036(+2036) |       0(+0) |         0(+0) |
-| [lib]/IMUKit.a          |       742(+742) |       0(+0) |     164(+164) |
+| [lib]/IMUKit.a          |       920(+920) |       0(+0) |     164(+164) |
 | [lib]/c.a               |   72544(+72544) | 2574(+2574) |       97(+97) |
 | [lib]/gcc.a             |     7956(+7956) |       0(+0) |         0(+0) |
 | [lib]/m.a               |     5176(+5176) |       0(+0) |         0(+0) |
 | [lib]/mbed-os-static.a  |   63024(+63024) |   460(+460) | 10875(+10875) |
 | [lib]/misc              |       188(+188) |       4(+4) |       28(+28) |
 | [lib]/nosys.a           |         32(+32) |       0(+0) |         0(+0) |
 | [lib]/stdc++.a          | 174492(+174492) |   145(+145) |   5720(+5720) |
 | __/__                   |     3988(+3988) |       1(+1) | 10841(+10841) |
-| suite_imu_kit.cpp.obj   |     3292(+3292) |       0(+0) |         2(+2) |
-| Subtotals               | 340920(+340920) | 3200(+3200) | 27776(+27776) |
+| suite_imu_kit.cpp.obj   |     3308(+3308) |       0(+0) |         2(+2) |
+| Subtotals               | 341112(+341112) | 3200(+3200) | 27776(+27776) |
 Total Static RAM memory (data + bss): 30976(+30976) bytes
-Total Flash memory (text + data): 344120(+344120) bytes
+Total Flash memory (text + data): 344312(+344312) bytes
 
Flash used: 389120&nbsp;(18%) / total: 2097152
SRAM used: 31296&nbsp;(5%) / total: 524288
spike_lk_command_kit (click to expand)
--- build_artifacts/base_ref-build-enable_log_debug-ON/spike_lk_command_kit-map.txt	2023-03-09 10:13:19.730332674 +0000
+++ build_artifacts/head_ref-build-enable_log_debug-ON/spike_lk_command_kit-map.txt	2023-03-09 10:13:19.962331534 +0000
@@ -1,40 +1,40 @@
 | Module                  |           .text |       .data |          .bss |
 |-------------------------|-----------------|-------------|---------------|
-| [fill]                  |       328(+328) |       5(+5) |       44(+44) |
+| [fill]                  |       294(+294) |       5(+5) |       48(+48) |
 | [lib]/ColorKit.a        |       864(+864) |       0(+0) |         0(+0) |
 | [lib]/CommandKit.a      |     1152(+1152) |       0(+0) |         0(+0) |
 | [lib]/CoreEventFlags.a  |       138(+138) |       0(+0) |         0(+0) |
 | [lib]/CoreEventQueue.a  |         94(+94) |       0(+0) |         0(+0) |
 | [lib]/CoreI2C.a         |         36(+36) |       0(+0) |         0(+0) |
 | [lib]/CoreIMU.a         |     6810(+6810) |       0(+0) |         0(+0) |
 | [lib]/CoreInterruptIn.a |       136(+136) |       0(+0) |         0(+0) |
 | [lib]/CoreMotor.a       |       176(+176) |       0(+0) |         0(+0) |
 | [lib]/CorePwm.a         |         60(+60) |       0(+0) |         0(+0) |
 | [lib]/CoreSPI.a         |         28(+28) |       0(+0) |         0(+0) |
 | [lib]/CoreSTM32Hal.a    |       930(+930) |       0(+0) |         0(+0) |
 | [lib]/CoreTimeout.a     |       204(+204) |       0(+0) |         0(+0) |
 | [lib]/CoreVideo.a       |     7954(+7954) |       1(+1) | 30800(+30800) |
 | [lib]/CriticalSection.a |           8(+8) |       0(+0) |         0(+0) |
 | [lib]/EventLoopKit.a    |       348(+348) |       0(+0) |         0(+0) |
 | [lib]/FileManagerKit.a  |     1736(+1736) |       0(+0) |         0(+0) |
 | [lib]/Fusion.a          |     2036(+2036) |       0(+0) |         0(+0) |
 | [lib]/HelloWorld.a      |         94(+94) |       0(+0) |         0(+0) |
-| [lib]/IMUKit.a          |       768(+768) |       0(+0) |     164(+164) |
+| [lib]/IMUKit.a          |       876(+876) |       0(+0) |     164(+164) |
 | [lib]/LedKit.a          |   19050(+19050) |       0(+0) |       20(+20) |
-| [lib]/MotionKit.a       |       838(+838) |       0(+0) |         0(+0) |
+| [lib]/MotionKit.a       |       848(+848) |       0(+0) |         0(+0) |
 | [lib]/ReinforcerKit.a   |     1726(+1726) |   460(+460) |         0(+0) |
 | [lib]/Utils.a           |         34(+34) |       0(+0) |         0(+0) |
 | [lib]/VideoKit.a        |       870(+870) |       0(+0) |       36(+36) |
 | [lib]/c.a               |   40920(+40920) | 2572(+2572) |       97(+97) |
 | [lib]/gcc.a             |     7688(+7688) |       0(+0) |         0(+0) |
 | [lib]/m.a               |     5368(+5368) |       0(+0) |         0(+0) |
 | [lib]/mbed-os-static.a  |   78492(+78492) |   464(+464) | 10951(+10951) |
 | [lib]/misc              |       188(+188) |       4(+4) |       28(+28) |
 | [lib]/nosys.a           |         32(+32) |       0(+0) |         0(+0) |
 | [lib]/stdc++.a          |   10716(+10716) |     16(+16) |     204(+204) |
 | __/__                   |       108(+108) |       0(+0) |         0(+0) |
-| main.cpp.obj            |     8758(+8758) |   278(+278) | 17488(+17488) |
-| Subtotals               | 198688(+198688) | 3800(+3800) | 59832(+59832) |
-Total Static RAM memory (data + bss): 63632(+63632) bytes
-Total Flash memory (text + data): 202488(+202488) bytes
+| main.cpp.obj            |     8738(+8738) |   278(+278) | 17252(+17252) |
+| Subtotals               | 198752(+198752) | 3800(+3800) | 59600(+59600) |
+Total Static RAM memory (data + bss): 63400(+63400) bytes
+Total Flash memory (text + data): 202552(+202552) bytes
 
Flash used: 230068&nbsp;(10%) / total: 2097152
SRAM used: 63728&nbsp;(12%) / total: 524288
spike_lk_imu_kit (click to expand)
--- build_artifacts/base_ref-build-enable_log_debug-ON/spike_lk_imu_kit-map.txt	2023-03-09 10:13:23.494313646 +0000
+++ build_artifacts/head_ref-build-enable_log_debug-ON/spike_lk_imu_kit-map.txt	2023-03-09 10:13:23.666312753 +0000
@@ -1,23 +1,23 @@
 | Module                  |         .text |       .data |          .bss |
 |-------------------------|---------------|-------------|---------------|
-| [fill]                  |     172(+172) |       8(+8) |       42(+42) |
+| [fill]                  |     190(+190) |       8(+8) |       38(+38) |
 | [lib]/CoreEventQueue.a  |       94(+94) |       0(+0) |         0(+0) |
 | [lib]/CoreI2C.a         |       36(+36) |       0(+0) |         0(+0) |
 | [lib]/CoreIMU.a         |   6810(+6810) |       0(+0) |         0(+0) |
 | [lib]/CoreInterruptIn.a |     222(+222) |       0(+0) |         0(+0) |
 | [lib]/CriticalSection.a |         8(+8) |       0(+0) |         0(+0) |
 | [lib]/Fusion.a          |   2036(+2036) |       0(+0) |         0(+0) |
 | [lib]/HelloWorld.a      |       94(+94) |       0(+0) |         0(+0) |
-| [lib]/IMUKit.a          |     766(+766) |       0(+0) |     164(+164) |
+| [lib]/IMUKit.a          |     876(+876) |       0(+0) |     164(+164) |
 | [lib]/c.a               | 24948(+24948) | 2472(+2472) |       58(+58) |
 | [lib]/gcc.a             |   7688(+7688) |       0(+0) |         0(+0) |
 | [lib]/m.a               |   5164(+5164) |       0(+0) |         0(+0) |
 | [lib]/mbed-os-static.a  | 39896(+39896) |   444(+444) |   8784(+8784) |
 | [lib]/misc              |     188(+188) |       4(+4) |       28(+28) |
 | [lib]/nosys.a           |       32(+32) |       0(+0) |         0(+0) |
 | [lib]/stdc++.a          |   5424(+5424) |       8(+8) |       44(+44) |
-| main.cpp.obj            |   2662(+2662) |       0(+0) | 11376(+11376) |
-| Subtotals               | 96240(+96240) | 2936(+2936) | 20496(+20496) |
-Total Static RAM memory (data + bss): 23432(+23432) bytes
-Total Flash memory (text + data): 99176(+99176) bytes
+| main.cpp.obj            |   2726(+2726) |       0(+0) | 11396(+11396) |
+| Subtotals               | 96432(+96432) | 2936(+2936) | 20512(+20512) |
+Total Static RAM memory (data + bss): 23448(+23448) bytes
+Total Flash memory (text + data): 99368(+99368) bytes
 
Flash used: 107504&nbsp;(5%) / total: 2097152
SRAM used: 23744&nbsp;(4%) / total: 524288
spike_lk_motion_kit (click to expand)
--- build_artifacts/base_ref-build-enable_log_debug-ON/spike_lk_motion_kit-map.txt	2023-03-09 10:13:25.098305316 +0000
+++ build_artifacts/head_ref-build-enable_log_debug-ON/spike_lk_motion_kit-map.txt	2023-03-09 10:13:25.274304402 +0000
@@ -1,32 +1,30 @@
 | Module                     |           .text |       .data |          .bss |
 |----------------------------|-----------------|-------------|---------------|
-| [fill]                     |       188(+188) |       8(+8) |       34(+34) |
+| [fill]                     |       204(+204) |       8(+8) |       34(+34) |
 | [lib]/CoreBufferedSerial.a |       196(+196) |       0(+0) |         0(+0) |
-| [lib]/CoreEventFlags.a     |       138(+138) |       0(+0) |         0(+0) |
 | [lib]/CoreEventQueue.a     |         44(+44) |       0(+0) |         0(+0) |
 | [lib]/CoreI2C.a            |         36(+36) |       0(+0) |         0(+0) |
 | [lib]/CoreIMU.a            |     6810(+6810) |       0(+0) |         0(+0) |
 | [lib]/CoreInterruptIn.a    |       222(+222) |       0(+0) |         0(+0) |
 | [lib]/CoreMotor.a          |       176(+176) |       0(+0) |         0(+0) |
 | [lib]/CorePwm.a            |         60(+60) |       0(+0) |         0(+0) |
 | [lib]/CoreRFIDReader.a     |       616(+616) |       0(+0) |         0(+0) |
 | [lib]/CoreTimeout.a        |       204(+204) |       0(+0) |         0(+0) |
 | [lib]/CriticalSection.a    |           8(+8) |       0(+0) |         0(+0) |
-| [lib]/EventLoopKit.a       |       348(+348) |       0(+0) |         0(+0) |
 | [lib]/Fusion.a             |     2036(+2036) |       0(+0) |         0(+0) |
 | [lib]/HelloWorld.a         |         94(+94) |       0(+0) |         0(+0) |
-| [lib]/IMUKit.a             |       768(+768) |       0(+0) |     164(+164) |
-| [lib]/MotionKit.a          |       884(+884) |       0(+0) |         0(+0) |
+| [lib]/IMUKit.a             |       876(+876) |       0(+0) |     164(+164) |
+| [lib]/MotionKit.a          |       848(+848) |       0(+0) |         0(+0) |
 | [lib]/RFIDKit.a            |     1046(+1046) |       0(+0) |         8(+8) |
 | [lib]/c.a                  |   25048(+25048) | 2472(+2472) |       58(+58) |
 | [lib]/gcc.a                |     7688(+7688) |       0(+0) |         0(+0) |
 | [lib]/m.a                  |     5164(+5164) |       0(+0) |         0(+0) |
-| [lib]/mbed-os-static.a     |   42828(+42828) |   444(+444) |   8860(+8860) |
+| [lib]/mbed-os-static.a     |   42638(+42638) |   444(+444) |   8860(+8860) |
 | [lib]/misc                 |       188(+188) |       4(+4) |       28(+28) |
 | [lib]/nosys.a              |         32(+32) |       0(+0) |         0(+0) |
 | [lib]/stdc++.a             |     5424(+5424) |       8(+8) |       44(+44) |
-| main.cpp.obj               |     4250(+4250) |       0(+0) | 13524(+13524) |
-| Subtotals                  | 104496(+104496) | 2936(+2936) | 22720(+22720) |
-Total Static RAM memory (data + bss): 25656(+25656) bytes
-Total Flash memory (text + data): 107432(+107432) bytes
+| main.cpp.obj               |     4134(+4134) |       0(+0) | 13284(+13284) |
+| Subtotals                  | 103792(+103792) | 2936(+2936) | 22480(+22480) |
+Total Static RAM memory (data + bss): 25416(+25416) bytes
+Total Flash memory (text + data): 106728(+106728) bytes
 
Flash used: 116240&nbsp;(5%) / total: 2097152
SRAM used: 25712&nbsp;(4%) / total: 524288
spike_lk_reinforcer (click to expand)
--- build_artifacts/base_ref-build-enable_log_debug-ON/spike_lk_reinforcer-map.txt	2023-03-09 10:13:26.282299168 +0000
+++ build_artifacts/head_ref-build-enable_log_debug-ON/spike_lk_reinforcer-map.txt	2023-03-09 10:13:26.514297963 +0000
@@ -1,38 +1,38 @@
 | Module                  |           .text |       .data |          .bss |
 |-------------------------|-----------------|-------------|---------------|
-| [fill]                  |       272(+272) |       3(+3) |       52(+52) |
+| [fill]                  |       306(+306) |       3(+3) |       48(+48) |
 | [lib]/ColorKit.a        |       864(+864) |       0(+0) |         0(+0) |
 | [lib]/CoreEventFlags.a  |       138(+138) |       0(+0) |         0(+0) |
 | [lib]/CoreEventQueue.a  |         94(+94) |       0(+0) |         0(+0) |
 | [lib]/CoreI2C.a         |         36(+36) |       0(+0) |         0(+0) |
 | [lib]/CoreIMU.a         |     6810(+6810) |       0(+0) |         0(+0) |
 | [lib]/CoreInterruptIn.a |       136(+136) |       0(+0) |         0(+0) |
 | [lib]/CoreMotor.a       |       176(+176) |       0(+0) |         0(+0) |
 | [lib]/CorePwm.a         |         60(+60) |       0(+0) |         0(+0) |
 | [lib]/CoreSPI.a         |         28(+28) |       0(+0) |         0(+0) |
 | [lib]/CoreSTM32Hal.a    |       930(+930) |       0(+0) |         0(+0) |
 | [lib]/CoreTimeout.a     |       204(+204) |       0(+0) |         0(+0) |
 | [lib]/CoreVideo.a       |     7954(+7954) |       1(+1) | 30800(+30800) |
 | [lib]/CriticalSection.a |           8(+8) |       0(+0) |         0(+0) |
 | [lib]/EventLoopKit.a    |       348(+348) |       0(+0) |         0(+0) |
 | [lib]/FileManagerKit.a  |     1736(+1736) |       0(+0) |         0(+0) |
 | [lib]/Fusion.a          |     2036(+2036) |       0(+0) |         0(+0) |
 | [lib]/HelloWorld.a      |         94(+94) |       0(+0) |         0(+0) |
-| [lib]/IMUKit.a          |       768(+768) |       0(+0) |     164(+164) |
+| [lib]/IMUKit.a          |       876(+876) |       0(+0) |     164(+164) |
 | [lib]/LedKit.a          |   19050(+19050) |       0(+0) |       20(+20) |
-| [lib]/MotionKit.a       |       838(+838) |       0(+0) |         0(+0) |
+| [lib]/MotionKit.a       |       848(+848) |       0(+0) |         0(+0) |
 | [lib]/ReinforcerKit.a   |     1696(+1696) |   460(+460) |         0(+0) |
 | [lib]/VideoKit.a        |       884(+884) |       0(+0) |       36(+36) |
 | [lib]/c.a               |   40920(+40920) | 2572(+2572) |       97(+97) |
 | [lib]/gcc.a             |     7688(+7688) |       0(+0) |         0(+0) |
 | [lib]/m.a               |     5368(+5368) |       0(+0) |         0(+0) |
 | [lib]/mbed-os-static.a  |   78492(+78492) |   464(+464) | 10951(+10951) |
 | [lib]/misc              |       188(+188) |       4(+4) |       28(+28) |
 | [lib]/nosys.a           |         32(+32) |       0(+0) |         0(+0) |
 | [lib]/stdc++.a          |   10716(+10716) |     16(+16) |     204(+204) |
 | __/__                   |       108(+108) |       0(+0) |         0(+0) |
-| main.cpp.obj            |     6304(+6304) |       8(+8) | 14432(+14432) |
-| Subtotals               | 194976(+194976) | 3528(+3528) | 56784(+56784) |
-Total Static RAM memory (data + bss): 60312(+60312) bytes
-Total Flash memory (text + data): 198504(+198504) bytes
+| main.cpp.obj            |     6280(+6280) |       8(+8) | 14196(+14196) |
+| Subtotals               | 195104(+195104) | 3528(+3528) | 56544(+56544) |
+Total Static RAM memory (data + bss): 60072(+60072) bytes
+Total Flash memory (text + data): 198632(+198632) bytes
 
Flash used: 225588&nbsp;(10%) / total: 2097152
SRAM used: 60400&nbsp;(11%) / total: 524288

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.

Phew, that was massive

Some use case are not cleared yet to me, what is the future of MotionKit, what actually happens when a control follow another one, is RotationControl a controller or a control system?

There is also some suggestions~

@@ -85,13 +82,17 @@ TEST_F(ReinforcerkitTest, playBlinkGreen)
expectedCallsMovingReinforcer(&led::animation::blink_green);

reinforcerkit.play(ReinforcerKit::Reinforcer::BlinkGreen);

mock_imukit.call_angles_ready_callback(angles);
Copy link
Member

Choose a reason for hiding this comment

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

Well reading these tests before implementation, I am surprise to see that it's IMUKit that drive the control (and not MotionKit itself). Should it be? I don't know, just notify that tests might bring some confusion by themselves.

libs/ReinforcerKit/tests/ReinforcerKit_test.cpp Outdated Show resolved Hide resolved
Comment on lines +18 to +19
MotionKit(interface::Motor &motor_left, interface::Motor &motor_right, interface::IMUKit &imu_kit,
interface::Timeout &timeout)
Copy link
Member

Choose a reason for hiding this comment

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

https://github.com/leka/LekaOS/pull/1292/files#r1123885091

What is the futur definition of MotionKit? Is it just a kind of ControlKit handling a bunch of "Control", with 2 methods start and stop with eventually an enum to select them?

Another question is for timeout, does each "Control" should include them or is it handled by MotionKit/ControlKit?

Copy link
Member

Choose a reason for hiding this comment

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

Some reflexion

IMUKit supports the process of control. Since it is suggested to move out IMUKit from MotionKit, you kinda lose the control of processes.

What ensure you that the callback are freed before using another control? For example,

  • 2 controls A and B use imukit (MotionKit does not know that).
  • A is start by MotionKit, A register a callback in imukit.onEulerAnglesReady.
  • Then B is start by MotionKit, A is requested to stop then B register its callback in imukit.onEulerAnglesReady. Different possibilities can happen
    1. A stop does not reset callback in imukit.onEulerAnglesReady
    2. A stop reset callback imukit.onEulerAnglesReady before B register its own
    3. A stop reset callback imukit.onEulerAnglesReady after B register its own (deferred process using EventQueue in A)

I am not sure of the behavior of callback if it is removed during a process (case i) but a scenario like case iii can happen and that can be source of confusion.

Copy link
Member

Choose a reason for hiding this comment

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

in the future, MotionKit will not depend on IMUKit -- the controls will depend on what they need, including IMUKit, Motors if needed

Controls will be like "dynamic" motion behaviors.

when a control starts, it will register the needed callback to IMUKit, replacing the old one.

when stopping from MotionKit, the callback is to be removed.

Copy link
Member

Choose a reason for hiding this comment

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

in the future, MotionKit will not depend on IMUKit -- the controls will depend on what they need, including IMUKit, Motors if needed

I know that MotionKit should not depend on IMUKit and I agree with that. Now consider MotionKit is responsible of Motion of the robot, what ensure that when MotionKit is asked to be stopped the robot effectively stopped? What if a Control still calling in IMUKit callback a new speed in motors (we forget to remove the callback at stop in the Control file for instance)?

Since it is not a problematic in this PR, we can resolve this conversation here, just keep it in mind when the next refactor of MotionKit will come.

Copy link
Member

Choose a reason for hiding this comment

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

Now consider MotionKit is responsible of Motion of the robot, what ensure that when MotionKit is asked to be stopped the robot effectively stopped? What if a Control still calling in IMUKit callback a new speed in motors (we forget to remove the callback at stop in the Control file for instance)?

Welcome to callback hell! :)

This is the kind of issue that can arise when callbacks are not used well.

It's true for a callback but it's also true for other dependencies.

Lets take an example with ExampleControl: (it's an example, some things might not exist yet/at all)

  • it depends on IMUKit for sensor data
  • it depends on two motors for motion
  • it also depends on LedKit so also change the color while moving
  • it depends on BatteryKit to change the intensity and motor speed depending of the battery level

There's no reason for MotionKit to depend on all those things to make sure that:

  • IMUKit callback as been set to an empty std::function
  • the two motors are really stopped
  • leds are turned off
  • BatteryKit callback has also been removed

it's a bit like not using Smart Pointers: if you use raw C pointers and , you need to make sure you clean up after yourself.

Following the TDD methodology, this is what we should be doing:

  • specify how ExampleControl will work
  • specify it's dependencies
  • review specifications as a team to spot this kind of issues and add a specific task or checklist to make sure we don't forget
  • write the tests needed to enforce that on stop() the dependencies are really cleared/turned off
  • have the tests fail
  • implement stop() to pass the tests

There's no simple way to do that "automatically" without complex engineering.

it's something that might be possible to do with concepts and templates. Surely an amazing engineering experience but I'm not sure it's worth the time and effort right now.

Again, we master all our code. We don't depend on something opaque and don't know what it does, nor do we provide these libraries as public API for outside users.

libs/MotionKit/include/MotionKit.hpp Outdated Show resolved Hide resolved
libs/MotionKit/source/MotionKit.cpp Outdated Show resolved Hide resolved
}

void MotionKit::executeSpeed(float speed, Rotation direction)
void MotionKit::setMotorsSpeedAndDirection(float speed, Rotation direction)
Copy link
Member

Choose a reason for hiding this comment

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

I was a bit confused with motors out of the Control but it is make sense with some definition.

There are 2 different notions: Control (system) and Controller.

  • Controller is, in broad term, the computation part of a Control (system). It is a PID for instance.
  • Control (system) is composed of a Controller with Actuators and Sensors.

Below a diagram to explain difference between both

Screenshot 2023-03-06 at 1 38 20 PM

Copy link
Member

Choose a reason for hiding this comment

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

Now if RotationControl is a control system then yes, motors should be included in it.

If RotationControl is a controller, an algorithm (e.g. PID) then motors and IMU can be set out of it and MotionKit is the control system.

Copy link
Member

Choose a reason for hiding this comment

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

as explained above and discussed previously with @HPezz, motors + IMUKit will be moved to Control in the future.

libs/MotionKit/source/MotionKit.cpp Outdated Show resolved Hide resolved
libs/MotionKit/source/RotationControl.cpp Outdated Show resolved Hide resolved
libs/MotionKit/tests/RotationControl_test.cpp Outdated Show resolved Hide resolved
libs/MotionKit/tests/RotationControl_test.cpp Outdated Show resolved Hide resolved
@HPezz HPezz force-pushed the hugo/feature/Update-MotionKit-Rotation-to-Fusion branch 2 times, most recently from ead1e0d to 9f9fa0c Compare March 6, 2023 14:15
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.

setTarget are not the same in MotionKit and RotationControl + a suggestion of refactor

libs/MotionKit/include/MotionKit.hpp Outdated Show resolved Hide resolved
libs/MotionKit/source/RotationControl.cpp Outdated Show resolved Hide resolved
libs/MotionKit/include/RotationControl.hpp Outdated Show resolved Hide resolved
Comment on lines +18 to +19
MotionKit(interface::Motor &motor_left, interface::Motor &motor_right, interface::IMUKit &imu_kit,
interface::Timeout &timeout)
Copy link
Member

Choose a reason for hiding this comment

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

in the future, MotionKit will not depend on IMUKit -- the controls will depend on what they need, including IMUKit, Motors if needed

I know that MotionKit should not depend on IMUKit and I agree with that. Now consider MotionKit is responsible of Motion of the robot, what ensure that when MotionKit is asked to be stopped the robot effectively stopped? What if a Control still calling in IMUKit callback a new speed in motors (we forget to remove the callback at stop in the Control file for instance)?

Since it is not a problematic in this PR, we can resolve this conversation here, just keep it in mind when the next refactor of MotionKit will come.

@HPezz HPezz force-pushed the hugo/feature/Update-MotionKit-Rotation-to-Fusion branch from b3f6b91 to 4cf6ce9 Compare March 9, 2023 09:59
@sonarqubecloud
Copy link

sonarqubecloud bot commented Mar 9, 2023

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

100.0% 100.0% Coverage
0.0% 0.0% Duplication

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.

LGTM 👍

I've made some comments for the refactor, could start a new story/task to list them so that we don't forget? :)

@ladislas ladislas merged commit c095b87 into develop Mar 9, 2023
@ladislas ladislas deleted the hugo/feature/Update-MotionKit-Rotation-to-Fusion branch March 9, 2023 11:10
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.

[Story] - IMU - Get correct orientation for every robots Reinforcer - No perfect 1080° rotation
3 participants