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/Show charging info on Ble connection/disconnection #765

Conversation

HPezz
Copy link
Contributor

@HPezz HPezz commented May 6, 2022

  • 🎨 (sm): Show battery level on BLE even/command received
  • ✅ (tests): Add tests to new transitions

@HPezz HPezz changed the base branch from develop to hugo/feature/Back-to-Idle-on-Ble-connection/disconnection May 6, 2022 15:48
@codecov
Copy link

codecov bot commented May 6, 2022

Codecov Report

Merging #765 (cb78f85) into develop (dd127b7) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff            @@
##           develop     #765   +/-   ##
========================================
  Coverage    93.76%   93.77%           
========================================
  Files          110      110           
  Lines         2423     2426    +3     
========================================
+ Hits          2272     2275    +3     
  Misses         151      151           
Impacted Files Coverage Δ
libs/RobotKit/include/StateMachine.h 100.00% <100.00%> (ø)

📣 Codecov can now indicate which changes are the most critical in Pull Requests. Learn more

@github-actions
Copy link

github-actions bot commented May 6, 2022

File comparision analysis report

🔖 Info

Target Flash Used (%) Flash Available (%) Static RAM (%)
bootloader 145308 (55%) 116836 (44%) 30048 (5%)
os 350136 (22%) 1214536 (77%) 69880 (13%)
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 ✔️ 348168 (16%)
350136 (16%)
📈
1968 (0%)
69624 (13%)
69880 (13%)
📈
256 (0%)
bootloader ✔️ 145308 (6%) ø 30048 (5%) ø
certs_emc_ble_bt_lcd_led_motors ✔️ 250704 (11%) ø 29240 (5%) ø
certs_emc_ble_led_motors ✔️ 174584 (8%) ø 24952 (4%) ø
certs_emc_bt_lcd_qspi_rfid_touch_wifi ✔️ 148840 (7%) ø 22528 (4%) ø
certs_emc_lcd_led_motors ✔️ 92008 (4%) ø 16168 (3%) ø
hardware_motors_test_reduction_and_wheels ✔️ 177976 (8%) ø 24360 (4%) ø
spike_lk_behavior_kit ✔️ 186060 (8%) ø 48064 (9%) ø
spike_lk_ble ✔️ 225248 (10%) ø 27808 (5%) ø
spike_lk_bluetooth ✔️ 73256 (3%) ø 11448 (2%) ø
spike_lk_cg_animations ✔️ 144632 (6%) ø 46528 (8%) ø
spike_lk_color_kit ✔️ 65712 (3%) ø 13744 (2%) ø
spike_lk_command_kit ✔️ 188780 (9%) ø 48704 (9%) ø
spike_lk_config_kit ✔️ 124204 (5%) ø 14312 (2%) ø
spike_lk_coreled ✔️ 76164 (3%) ø 13688 (2%) ø
spike_lk_event_queue ✔️ 74736 (3%) ø 12072 (2%) ø
spike_lk_file_manager_kit ✔️ 103604 (4%) ø 14048 (2%) ø
spike_lk_file_reception ✔️ 326984 (15%) ø 27576 (5%) ø
spike_lk_flash_memory ✔️ 63880 (3%) ø 11448 (2%) ø
spike_lk_lcd ✔️ 158108 (7%) ø 46568 (8%) ø
spike_lk_led ✔️ 65744 (3%) ø 13392 (2%) ø
spike_lk_led_kit ✔️ 103460 (4%) ø 14592 (2%) ø
spike_lk_log_kit ✔️ 63736 (3%) ø 12256 (2%) ø
spike_lk_motors ✔️ 62600 (2%) ø 11488 (2%) ø
spike_lk_reinforcer ✔️ 102620 (4%) ø 14592 (2%) ø
spike_lk_rfid ✔️ 78580 (3%) ø 11504 (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 ✔️ 58904 (2%) ø 11464 (2%) ø
spike_lk_ticker_timeout ✔️ 69052 (3%) ø 11632 (2%) ø
spike_lk_update_process_app_base ✔️ 122788 (5%) ø 15288 (2%) ø
spike_lk_update_process_app_update ✔️ 77632 (3%) ø 12352 (2%) ø
spike_lk_wifi ✔️ 116392 (5%) ø 14808 (2%) ø
spike_mbed_blinky ✔️ 57968 (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
LekaOS (click to expand)
--- build_artifacts/base_ref-build-enable_log_debug-OFF/LekaOS-map.txt	2022-05-07 11:47:31.160518383 +0000
+++ build_artifacts/head_ref-build-enable_log_debug-OFF/LekaOS-map.txt	2022-05-07 11:47:31.616560143 +0000
@@ -1,45 +1,45 @@
 | Module                     |           .text |       .data |          .bss |
 |----------------------------|-----------------|-------------|---------------|
-| [fill]                     |       566(+566) |     20(+20) |     165(+165) |
+| [fill]                     |       556(+556) |     20(+20) |     170(+170) |
 | [lib]/BLEKit.a             |     1148(+1148) |       0(+0) |         0(+0) |
 | [lib]/BatteryKit.a         |       324(+324) |       0(+0) |         0(+0) |
 | [lib]/BehaviorKit.a        |     2214(+2214) |       0(+0) |         0(+0) |
 | [lib]/ColorKit.a           |       864(+864) |       0(+0) |         0(+0) |
 | [lib]/CommandKit.a         |     1756(+1756) |       0(+0) |         0(+0) |
 | [lib]/CoreBattery.a        |       472(+472) |       0(+0) |         0(+0) |
 | [lib]/CoreBufferedSerial.a |         62(+62) |       0(+0) |         0(+0) |
 | [lib]/CoreEventFlags.a     |         94(+94) |       0(+0) |         0(+0) |
 | [lib]/CoreEventQueue.a     |       116(+116) |       0(+0) |         0(+0) |
 | [lib]/CoreFlashMemory.a    |       546(+546) |       0(+0) |         0(+0) |
 | [lib]/CoreMCU.a            |         16(+16) |       0(+0) |         0(+0) |
 | [lib]/CoreMotor.a          |       130(+130) |       0(+0) |         0(+0) |
 | [lib]/CoreMutex.a          |           8(+8) |       0(+0) |         0(+0) |
 | [lib]/CorePwm.a            |         12(+12) |       0(+0) |         0(+0) |
 | [lib]/CoreQSPI.a           |       160(+160) |       0(+0) |         0(+0) |
 | [lib]/CoreRFIDReader.a     |       724(+724) |       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          |     7904(+7904) |       1(+1) | 30800(+30800) |
 | [lib]/CriticalSection.a    |           8(+8) |       0(+0) |         0(+0) |
 | [lib]/FileManagerKit.a     |     1308(+1308) |       0(+0) |         0(+0) |
 | [lib]/FirmwareKit.a        |       172(+172) |       0(+0) |         0(+0) |
 | [lib]/HelloWorld.a         |         94(+94) |       0(+0) |         0(+0) |
 | [lib]/LedKit.a             |   19452(+19452) |       0(+0) |       10(+10) |
 | [lib]/RFIDKit.a            |       816(+816) |       0(+0) |         8(+8) |
 | [lib]/SerialNumberKit.a    |       160(+160) |       0(+0) |         0(+0) |
 | [lib]/Utils.a              |         34(+34) |       0(+0) |         0(+0) |
 | [lib]/VideoKit.a           |       454(+454) |       0(+0) |         0(+0) |
 | [lib]/bootutil.a           |     1282(+1282) |     12(+12) |     132(+132) |
 | [lib]/c.a                  |   43396(+43396) | 2572(+2572) |       97(+97) |
 | [lib]/gcc.a                |     7148(+7148) |       0(+0) |         0(+0) |
 | [lib]/m.a                  |       204(+204) |       0(+0) |         0(+0) |
 | [lib]/mbed-os-static.a     | 170832(+170832) |   769(+769) | 19647(+19647) |
 | [lib]/misc                 |       188(+188) |       4(+4) |       28(+28) |
 | [lib]/nosys.a              |         32(+32) |       0(+0) |         0(+0) |
 | [lib]/stdc++.a             |     9536(+9536) |     16(+16) |     204(+204) |
-| main.cpp.obj               |   37206(+37206) |   534(+534) | 14277(+14277) |
-| Subtotals                  | 310600(+310600) | 3928(+3928) | 65368(+65368) |
-Total Static RAM memory (data + bss): 69296(+69296) bytes
-Total Flash memory (text + data): 314528(+314528) bytes
+| main.cpp.obj               |   39136(+39136) |   534(+534) | 14528(+14528) |
+| Subtotals                  | 312520(+312520) | 3928(+3928) | 65624(+65624) |
+Total Static RAM memory (data + bss): 69552(+69552) bytes
+Total Flash memory (text + data): 316448(+316448) bytes
 
Flash used: 350136&nbsp;(16%) / total: 2097152
SRAM used: 69880&nbsp;(13%) / total: 524288

@github-actions
Copy link

github-actions bot commented May 6, 2022

File comparision analysis report

🔖 Info

Target Flash Used (%) Flash Available (%) Static RAM (%)
bootloader 145308 (55%) 116836 (44%) 30048 (5%)
os 372540 (23%) 1192132 (76%) 76112 (14%)
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 ✔️ 368908 (17%)
372540 (17%)
📈
3632 (0%)
75856 (14%)
76112 (14%)
📈
256 (0%)
bootloader ✔️ 145308 (6%) ø 30048 (5%) ø
certs_emc_ble_bt_lcd_led_motors ✔️ 258248 (12%) ø 35272 (6%) ø
certs_emc_ble_led_motors ✔️ 191600 (9%) ø 30976 (5%) ø
certs_emc_bt_lcd_qspi_rfid_touch_wifi ✔️ 165248 (7%) ø 28680 (5%) ø
certs_emc_lcd_led_motors ✔️ 92008 (4%) ø 16168 (3%) ø
hardware_motors_test_reduction_and_wheels ✔️ 194112 (9%) ø 30384 (5%) ø
spike_lk_behavior_kit ✔️ 195412 (9%) ø 54008 (10%) ø
spike_lk_ble ✔️ 233916 (11%) ø 33864 (6%) ø
spike_lk_bluetooth ✔️ 91192 (4%) ø 17472 (3%) ø
spike_lk_cg_animations ✔️ 152840 (7%) ø 52528 (10%) ø
spike_lk_color_kit ✔️ 88992 (4%) ø 19744 (3%) ø
spike_lk_command_kit ✔️ 200292 (9%) ø 54904 (10%) ø
spike_lk_config_kit ✔️ 136740 (6%) ø 20368 (3%) ø
spike_lk_coreled ✔️ 88556 (4%) ø 19632 (3%) ø
spike_lk_event_queue ✔️ 84664 (4%) ø 18136 (3%) ø
spike_lk_file_manager_kit ✔️ 127820 (6%) ø 20216 (3%) ø
spike_lk_file_reception ✔️ 331692 (15%) ø 33536 (6%) ø
spike_lk_flash_memory ✔️ 87352 (4%) ø 17512 (3%) ø
spike_lk_lcd ✔️ 168364 (8%) ø 52640 (10%) ø
spike_lk_led ✔️ 88808 (4%) ø 19400 (3%) ø
spike_lk_led_kit ✔️ 116060 (5%) ø 20536 (3%) ø
spike_lk_log_kit ✔️ 85016 (4%) ø 18512 (3%) ø
spike_lk_motors ✔️ 86584 (4%) ø 17552 (3%) ø
spike_lk_reinforcer ✔️ 112476 (5%) ø 20536 (3%) ø
spike_lk_rfid ✔️ 85784 (4%) ø 17488 (3%) ø
spike_lk_sensors_battery ✔️ 87600 (4%) ø 18584 (3%) ø
spike_lk_sensors_light ✔️ 84584 (4%) ø 17512 (3%) ø
spike_lk_sensors_microphone ✔️ 85336 (4%) ø 17512 (3%) ø
spike_lk_sensors_temperature_humidity ✔️ 90976 (4%) ø 17496 (3%) ø
spike_lk_sensors_touch ✔️ 92248 (4%) ø 17632 (3%) ø
spike_lk_serial_number ✔️ 82752 (3%) ø 17648 (3%) ø
spike_lk_ticker_timeout ✔️ 83224 (3%) ø 17592 (3%) ø
spike_lk_update_process_app_base ✔️ 145268 (6%) ø 21352 (4%) ø
spike_lk_update_process_app_update ✔️ 100968 (4%) ø 18472 (3%) ø
spike_lk_wifi ✔️ 131280 (6%) ø 20832 (3%) ø
spike_mbed_blinky ✔️ 57968 (2%) ø 11400 (2%) ø
spike_mbed_watchdog_ticker_vs_thread ✔️ 84688 (4%) ø 18448 (3%) ø
spike_stl_cxxsupport ✔️ 84000 (4%) ø 17536 (3%) ø

🗺️ Map files diff output

Click to show diff list
LekaOS (click to expand)
--- build_artifacts/base_ref-build-enable_log_debug-ON/LekaOS-map.txt	2022-05-07 11:47:15.526302289 +0000
+++ build_artifacts/head_ref-build-enable_log_debug-ON/LekaOS-map.txt	2022-05-07 11:47:15.890306833 +0000
@@ -1,45 +1,45 @@
 | Module                     |           .text |       .data |          .bss |
 |----------------------------|-----------------|-------------|---------------|
-| [fill]                     |       536(+536) |     20(+20) |     173(+173) |
+| [fill]                     |       548(+548) |     20(+20) |     178(+178) |
 | [lib]/BLEKit.a             |     1148(+1148) |       0(+0) |         0(+0) |
 | [lib]/BatteryKit.a         |       324(+324) |       0(+0) |         0(+0) |
 | [lib]/BehaviorKit.a        |     2214(+2214) |       0(+0) |         0(+0) |
 | [lib]/ColorKit.a           |       864(+864) |       0(+0) |         0(+0) |
 | [lib]/CommandKit.a         |     2248(+2248) |       0(+0) |         0(+0) |
 | [lib]/CoreBattery.a        |       472(+472) |       0(+0) |         0(+0) |
 | [lib]/CoreBufferedSerial.a |         62(+62) |       0(+0) |         0(+0) |
 | [lib]/CoreEventFlags.a     |         94(+94) |       0(+0) |         0(+0) |
 | [lib]/CoreEventQueue.a     |       116(+116) |       0(+0) |         0(+0) |
 | [lib]/CoreFlashMemory.a    |       546(+546) |       0(+0) |         0(+0) |
 | [lib]/CoreMCU.a            |         16(+16) |       0(+0) |         0(+0) |
 | [lib]/CoreMotor.a          |       130(+130) |       0(+0) |         0(+0) |
 | [lib]/CoreMutex.a          |           8(+8) |       0(+0) |         0(+0) |
 | [lib]/CorePwm.a            |         12(+12) |       0(+0) |         0(+0) |
 | [lib]/CoreQSPI.a           |       160(+160) |       0(+0) |         0(+0) |
 | [lib]/CoreRFIDReader.a     |       724(+724) |       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          |     7904(+7904) |       1(+1) | 30800(+30800) |
 | [lib]/CriticalSection.a    |           8(+8) |       0(+0) |         0(+0) |
 | [lib]/FileManagerKit.a     |     1308(+1308) |       0(+0) |         0(+0) |
 | [lib]/FirmwareKit.a        |       172(+172) |       0(+0) |         0(+0) |
 | [lib]/HelloWorld.a         |         94(+94) |       0(+0) |         0(+0) |
 | [lib]/LedKit.a             |   19452(+19452) |       0(+0) |       10(+10) |
 | [lib]/RFIDKit.a            |     2058(+2058) |       0(+0) |       72(+72) |
 | [lib]/SerialNumberKit.a    |       160(+160) |       0(+0) |         0(+0) |
 | [lib]/Utils.a              |         34(+34) |       0(+0) |         0(+0) |
 | [lib]/VideoKit.a           |       454(+454) |       0(+0) |         0(+0) |
 | [lib]/bootutil.a           |     1282(+1282) |     12(+12) |     132(+132) |
 | [lib]/c.a                  |   43284(+43284) | 2572(+2572) |       97(+97) |
 | [lib]/gcc.a                |     7148(+7148) |       0(+0) |         0(+0) |
 | [lib]/m.a                  |       564(+564) |       0(+0) |         0(+0) |
 | [lib]/mbed-os-static.a     | 170832(+170832) |   769(+769) | 19647(+19647) |
 | [lib]/misc                 |       188(+188) |       4(+4) |       28(+28) |
 | [lib]/nosys.a              |         32(+32) |       0(+0) |         0(+0) |
 | [lib]/stdc++.a             |     9956(+9956) |     16(+16) |     204(+204) |
-| main.cpp.obj               |   53922(+53922) |   534(+534) | 20437(+20437) |
-| Subtotals                  | 329688(+329688) | 3928(+3928) | 71600(+71600) |
-Total Static RAM memory (data + bss): 75528(+75528) bytes
-Total Flash memory (text + data): 333616(+333616) bytes
+| main.cpp.obj               |   57494(+57494) |   534(+534) | 20688(+20688) |
+| Subtotals                  | 333272(+333272) | 3928(+3928) | 71856(+71856) |
+Total Static RAM memory (data + bss): 75784(+75784) bytes
+Total Flash memory (text + data): 337200(+337200) bytes
 
Flash used: 372540&nbsp;(17%) / total: 2097152
SRAM used: 76112&nbsp;(14%) / total: 524288

@HPezz HPezz force-pushed the hugo/feature/Back-to-Idle-on-Ble-connection/disconnection branch from 88264f8 to 3d514c9 Compare May 6, 2022 16:39
@HPezz HPezz force-pushed the hugo/feature/Show-charging-info-on-Ble-connection/disconnection branch from e5353a0 to 89c0e7c Compare May 6, 2022 16:42
@ladislas ladislas force-pushed the hugo/feature/Back-to-Idle-on-Ble-connection/disconnection branch from 3d514c9 to fb114d4 Compare May 7, 2022 08:02
Base automatically changed from hugo/feature/Back-to-Idle-on-Ble-connection/disconnection to develop May 7, 2022 11:24
@ladislas ladislas added the 01 - type: task Something to do label May 7, 2022
@ladislas ladislas added this to the v1.0.0 milestone May 7, 2022
@ladislas ladislas force-pushed the hugo/feature/Show-charging-info-on-Ble-connection/disconnection branch from 89c0e7c to cb78f85 Compare May 7, 2022 11:38
@sonarcloud
Copy link

sonarcloud bot commented May 7, 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

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 👍

@ladislas ladislas merged commit 87163e3 into develop May 9, 2022
@ladislas ladislas deleted the hugo/feature/Show-charging-info-on-Ble-connection/disconnection branch May 9, 2022 09:57
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.

When charging - BLE connection/disconnection or command should show charging state
2 participants