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

✨ (rc): Update advertising data in BLE with battery and charging status #736

Conversation

YannLocatelli
Copy link
Member

@YannLocatelli YannLocatelli commented Apr 28, 2022

Spike: app/os

Tests obligatoires

  • Dans nRF Connect, les valeurs sur le pannel de droite sont actualisées lorsque le robot change d’état de charge et après une tap sur le robot dans le pannel de gauche. Si les batteries sont au maximum, une des valeurs vaut 0x64 soit 100
  • UT GCC & Clang fonctionnels

@YannLocatelli YannLocatelli self-assigned this Apr 28, 2022
@YannLocatelli YannLocatelli linked an issue Apr 28, 2022 that may be closed by this pull request
@YannLocatelli YannLocatelli linked an issue Apr 28, 2022 that may be closed by this pull request
@github-actions
Copy link

File comparision analysis report

🔖 Info

Target Flash Used (%) Flash Available (%) Static RAM (%)
bootloader 145244 (55%) 116900 (44%) 30048 (5%)
os 314368 (20%) 1250304 (79%) 36952 (7%)
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 ✔️ 314304 (14%)
314368 (14%)
📈
64 (0%)
36952 (7%) ø
bootloader ✔️ 145244 (6%) ø 30048 (5%) ø
certs_emc_ble_bt_lcd_led_motors ✔️ 250688 (11%) ø 29240 (5%) ø
certs_emc_ble_led_motors ✔️ 174568 (8%) ø 24952 (4%) ø
certs_emc_bt_lcd_qspi_rfid_touch_wifi ✔️ 148840 (7%) ø 22528 (4%) ø
certs_emc_lcd_led_motors ✔️ 91928 (4%) ø 16168 (3%) ø
hardware_motors_test_reduction_and_wheels ✔️ 177960 (8%) ø 24360 (4%) ø
spike_lk_behavior_kit ✔️ 149492 (7%) ø 15904 (3%) ø
spike_lk_ble ✔️ 225248 (10%) ø 27808 (5%) ø
spike_lk_bluetooth ✔️ 73256 (3%) ø 11448 (2%) ø
spike_lk_cg_animations ✔️ 144344 (6%) ø 46496 (8%) ø
spike_lk_color_kit ✔️ 65712 (3%) ø 13744 (2%) ø
spike_lk_command_kit ✔️ 151588 (7%) ø 16552 (3%) ø
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 ✔️ 146304 (6%) ø 46080 (8%) ø
spike_lk_led ✔️ 65744 (3%) ø 13392 (2%) ø
spike_lk_led_kit ✔️ 103220 (4%) ø 14664 (2%) ø
spike_lk_log_kit ✔️ 63736 (3%) ø 12256 (2%) ø
spike_lk_motors ✔️ 62528 (2%) ø 11488 (2%) ø
spike_lk_reinforcer ✔️ 101932 (4%) ø 14664 (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 ✔️ 66968 (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-04-28 13:54:54.533903726 +0000
+++ build_artifacts/head_ref-build-enable_log_debug-OFF/LekaOS-map.txt	2022-04-28 13:54:54.933919294 +0000
@@ -1,43 +1,43 @@
 | Module                     |           .text |       .data |          .bss |
 |----------------------------|-----------------|-------------|---------------|
-| [fill]                     |       498(+498) |     17(+17) |     150(+150) |
-| [lib]/BLEKit.a             |     1108(+1108) |       0(+0) |         0(+0) |
-| [lib]/BatteryKit.a         |       324(+324) |       0(+0) |         0(+0) |
+| [fill]                     |       518(+518) |     17(+17) |     150(+150) |
+| [lib]/BLEKit.a             |     1252(+1252) |       0(+0) |         0(+0) |
+| [lib]/BatteryKit.a         |       348(+348) |       0(+0) |         0(+0) |
 | [lib]/BehaviorKit.a        |     2154(+2154) |       0(+0) |         0(+0) |
 | [lib]/ColorKit.a           |       864(+864) |       0(+0) |         0(+0) |
 | [lib]/CommandKit.a         |     1716(+1716) |       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]/CoreTimeout.a        |       204(+204) |       0(+0) |         0(+0) |
 | [lib]/CriticalSection.a    |           8(+8) |       0(+0) |         0(+0) |
 | [lib]/FileManagerKit.a     |     1268(+1268) |       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             |   19174(+19174) |       0(+0) |         0(+0) |
 | [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           |           6(+6) |       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     | 161236(+161236) |   769(+769) | 19647(+19647) |
 | [lib]/misc                 |       188(+188) |       4(+4) |       28(+28) |
 | [lib]/nosys.a              |         32(+32) |       0(+0) |         0(+0) |
 | [lib]/stdc++.a             |     9520(+9520) |     16(+16) |     204(+204) |
-| main.cpp.obj               |   32306(+32306) |   514(+514) | 12454(+12454) |
-| Subtotals                  | 286280(+286280) | 3904(+3904) | 32720(+32720) |
+| main.cpp.obj               |   32182(+32182) |   514(+514) | 12454(+12454) |
+| Subtotals                  | 286344(+286344) | 3904(+3904) | 32720(+32720) |
 Total Static RAM memory (data + bss): 36624(+36624) bytes
-Total Flash memory (text + data): 290184(+290184) bytes
+Total Flash memory (text + data): 290248(+290248) bytes
 
Flash used: 314368 (14%) / total: 2097152
SRAM used: 36952 (7%) / total: 524288
spike_lk_sensors_battery (click to expand)
--- build_artifacts/base_ref-build-enable_log_debug-OFF/spike_lk_sensors_battery-map.txt	2022-04-28 13:55:08.290437753 +0000
+++ build_artifacts/head_ref-build-enable_log_debug-OFF/spike_lk_sensors_battery-map.txt	2022-04-28 13:55:08.494445656 +0000
@@ -1,17 +1,17 @@
 | Module                 |         .text |       .data |        .bss |
 |------------------------|---------------|-------------|-------------|
-| [fill]                 |     174(+174) |       8(+8) |     30(+30) |
-| [lib]/BatteryKit.a     |     360(+360) |       0(+0) |       0(+0) |
+| [fill]                 |     150(+150) |       8(+8) |     30(+30) |
+| [lib]/BatteryKit.a     |     384(+384) |       0(+0) |       0(+0) |
 | [lib]/CoreBattery.a    |     472(+472) |       0(+0) |       0(+0) |
 | [lib]/CoreEventQueue.a |     126(+126) |       0(+0) |       0(+0) |
 | [lib]/c.a              | 26028(+26028) | 2472(+2472) |     58(+58) |
 | [lib]/gcc.a            |   7084(+7084) |       0(+0) |       0(+0) |
 | [lib]/mbed-os-static.a | 30518(+30518) |   444(+444) | 8676(+8676) |
 | [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           |     858(+858) |       0(+0) |   524(+524) |
 | Subtotals              | 69956(+69956) | 2936(+2936) | 9344(+9344) |
 Total Static RAM memory (data + bss): 12280(+12280) bytes
 Total Flash memory (text + data): 72892(+72892) bytes
 

@github-actions
Copy link

File comparision analysis report

🔖 Info

Target Flash Used (%) Flash Available (%) Static RAM (%)
bootloader 145244 (55%) 116900 (44%) 30048 (5%)
os 332988 (21%) 1231684 (78%) 43184 (8%)
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 ✔️ 332988 (15%) ø 43184 (8%) ø
bootloader ✔️ 145244 (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 ✔️ 91928 (4%) ø 16168 (3%) ø
hardware_motors_test_reduction_and_wheels ✔️ 194032 (9%) ø 30384 (5%) ø
spike_lk_behavior_kit ✔️ 158924 (7%) ø 21848 (4%) ø
spike_lk_ble ✔️ 233916 (11%) ø 33864 (6%) ø
spike_lk_bluetooth ✔️ 91192 (4%) ø 17472 (3%) ø
spike_lk_cg_animations ✔️ 152600 (7%) ø 52496 (10%) ø
spike_lk_color_kit ✔️ 88992 (4%) ø 19744 (3%) ø
spike_lk_command_kit ✔️ 163420 (7%) ø 22752 (4%) ø
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 ✔️ 159264 (7%) ø 52152 (9%) ø
spike_lk_led ✔️ 88808 (4%) ø 19400 (3%) ø
spike_lk_led_kit ✔️ 115660 (5%) ø 20608 (3%) ø
spike_lk_log_kit ✔️ 85016 (4%) ø 18512 (3%) ø
spike_lk_motors ✔️ 86576 (4%) ø 17552 (3%) ø
spike_lk_reinforcer ✔️ 111852 (5%) ø 20608 (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 ✔️ 90896 (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-04-28 13:56:13.101914523 +0000
+++ build_artifacts/head_ref-build-enable_log_debug-ON/LekaOS-map.txt	2022-04-28 13:56:13.473918043 +0000
@@ -1,43 +1,43 @@
 | Module                     |           .text |       .data |          .bss |
 |----------------------------|-----------------|-------------|---------------|
-| [fill]                     |       538(+538) |     17(+17) |     158(+158) |
-| [lib]/BLEKit.a             |     1108(+1108) |       0(+0) |         0(+0) |
-| [lib]/BatteryKit.a         |       324(+324) |       0(+0) |         0(+0) |
+| [fill]                     |       494(+494) |     17(+17) |     158(+158) |
+| [lib]/BLEKit.a             |     1252(+1252) |       0(+0) |         0(+0) |
+| [lib]/BatteryKit.a         |       348(+348) |       0(+0) |         0(+0) |
 | [lib]/BehaviorKit.a        |     2154(+2154) |       0(+0) |         0(+0) |
 | [lib]/ColorKit.a           |       864(+864) |       0(+0) |         0(+0) |
 | [lib]/CommandKit.a         |     2216(+2216) |       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]/CoreTimeout.a        |       204(+204) |       0(+0) |         0(+0) |
 | [lib]/CriticalSection.a    |           8(+8) |       0(+0) |         0(+0) |
 | [lib]/FileManagerKit.a     |     1268(+1268) |       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             |   19174(+19174) |       0(+0) |         0(+0) |
 | [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           |           6(+6) |       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     | 161236(+161236) |   769(+769) | 19647(+19647) |
 | [lib]/misc                 |       188(+188) |       4(+4) |       28(+28) |
 | [lib]/nosys.a              |         32(+32) |       0(+0) |         0(+0) |
 | [lib]/stdc++.a             |     9940(+9940) |     16(+16) |     204(+204) |
-| main.cpp.obj               |   46896(+46896) |   514(+514) | 18614(+18614) |
+| main.cpp.obj               |   46772(+46772) |   514(+514) | 18614(+18614) |
 | Subtotals                  | 303320(+303320) | 3904(+3904) | 38952(+38952) |
 Total Static RAM memory (data + bss): 42856(+42856) bytes
 Total Flash memory (text + data): 307224(+307224) bytes
 
spike_lk_sensors_battery (click to expand)
--- build_artifacts/base_ref-build-enable_log_debug-ON/spike_lk_sensors_battery-map.txt	2022-04-28 13:56:26.726044346 +0000
+++ build_artifacts/head_ref-build-enable_log_debug-ON/spike_lk_sensors_battery-map.txt	2022-04-28 13:56:26.934046320 +0000
@@ -1,19 +1,19 @@
 | Module                  |         .text |       .data |          .bss |
 |-------------------------|---------------|-------------|---------------|
-| [fill]                  |     132(+132) |       8(+8) |       30(+30) |
-| [lib]/BatteryKit.a      |     360(+360) |       0(+0) |         0(+0) |
+| [fill]                  |     110(+110) |       8(+8) |       30(+30) |
+| [lib]/BatteryKit.a      |     384(+384) |       0(+0) |         0(+0) |
 | [lib]/CoreBattery.a     |     472(+472) |       0(+0) |         0(+0) |
 | [lib]/CoreEventQueue.a  |       94(+94) |       0(+0) |         0(+0) |
 | [lib]/CriticalSection.a |         8(+8) |       0(+0) |         0(+0) |
 | [lib]/c.a               | 26052(+26052) | 2472(+2472) |       58(+58) |
 | [lib]/gcc.a             |   7148(+7148) |       0(+0) |         0(+0) |
 | [lib]/m.a               |     360(+360) |       0(+0) |         0(+0) |
 | [lib]/mbed-os-static.a  | 34058(+34058) |   444(+444) |   8716(+8716) |
 | [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            |   3132(+3132) |       0(+0) |   6484(+6484) |
+| main.cpp.obj            |   3130(+3130) |       0(+0) |   6484(+6484) |
 | Subtotals               | 77460(+77460) | 2936(+2936) | 15360(+15360) |
 Total Static RAM memory (data + bss): 18296(+18296) bytes
 Total Flash memory (text + data): 80396(+80396) bytes
 

@ladislas
Copy link
Member

ladislas commented May 6, 2022

replaced by #755

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.

BLE - Advertise robot is charging
2 participants