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

✨ (config): Config with multiple values #1258

Merged
merged 2 commits into from
Jan 21, 2023

Conversation

YannLocatelli
Copy link
Member

@YannLocatelli YannLocatelli commented Jan 16, 2023

Validation

  • Bootloader
  • Spike lk_config_kit

@YannLocatelli YannLocatelli added the 01 - type: task Something to do label Jan 16, 2023
@YannLocatelli YannLocatelli added this to the Future Release milestone Jan 16, 2023
@YannLocatelli YannLocatelli self-assigned this Jan 16, 2023
@github-actions
Copy link

github-actions bot commented Jan 16, 2023

File comparision analysis report

🔖 Info

Target Flash Used (base/head) Fash Used Δ Flash Available (base/head) Static RAM (base/head) Static RAM Δ
bootloader 183132 (69%)
183068 (69%)
📉
-64 (0%)
79012 (30%)
79076 (30%)
41664 (7%) ø
os 495996 (31%) ø 1068676 (68%)
1068676 (68%)
94328 (17%) ø
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 ✔️ 495996 (23%) ø 94328 (17%) ø
bootloader ✔️ 183132 (8%)
183068 (8%)
📉
-64 (0%)
41664 (7%) ø
functional_ut_boost_ut ✔️ 409276 (19%) ø 30608 (5%) ø
functional_ut_core_imu ✔️ 389476 (18%) ø 30584 (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 ✔️ 386812 (18%) ø 30856 (5%) ø
functional_ut_firmware_kit ✔️ 378420 (18%) ø 30840 (5%) ø
functional_ut_imu_kit ✔️ 391668 (18%) ø 30576 (5%) ø
functional_ut_io_expander ✔️ 371176 (17%) ø 30576 (5%) ø
functional_ut_qdac ✔️ 372344 (17%) ø 30576 (5%) ø
spike_lk_accel_gyro ✔️ 94264 (4%) ø 22560 (4%) ø
spike_lk_audio ✔️ 137172 (6%) ø 25176 (4%) ø
spike_lk_behavior_kit ✔️ 197692 (9%) ø 58656 (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 ✔️ 219788 (10%) ø 63112 (12%) ø
spike_lk_config_kit ✔️ 139308 (6%)
139228 (6%)
📉
-80 (0%)
25136 (4%)
25192 (4%)
📈
+56 (+0%)
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 ✔️ 154432 (7%) ø 25520 (4%) ø
spike_lk_file_reception ✔️ 339964 (16%) ø 38448 (7%) ø
spike_lk_flash_memory ✔️ 86776 (4%) ø 22216 (4%) ø
spike_lk_fs ✔️ 174568 (8%) ø 47992 (9%) ø
spike_lk_imu_kit ✔️ 98144 (4%) ø 22888 (4%) ø
spike_lk_lcd ✔️ 172716 (8%) ø 57496 (10%) ø
spike_lk_led_kit ✔️ 115204 (5%) ø 25104 (4%) ø
spike_lk_log_kit ✔️ 84776 (4%) ø 23408 (4%) ø
spike_lk_motion_kit ✔️ 107144 (5%) ø 24840 (4%) ø
spike_lk_motors ✔️ 86336 (4%) ø 22248 (4%) ø
spike_lk_qdac ✔️ 91796 (4%) ø 22768 (4%) ø
spike_lk_reinforcer ✔️ 215324 (10%) ø 59784 (11%) ø
spike_lk_rfid ✔️ 84216 (4%) ø 22184 (4%) ø
spike_lk_sensors_battery ✔️ 87376 (4%) ø 23312 (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 ✔️ 157244 (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

Click to show diff list
bootloader (click to expand)
--- build_artifacts/base_ref-build-enable_log_debug-ON/bootloader-map.txt	2023-01-21 12:50:29.016200864 +0000
+++ build_artifacts/head_ref-build-enable_log_debug-ON/bootloader-map.txt	2023-01-21 12:50:29.228201777 +0000
@@ -1,28 +1,27 @@
 | Module                  |           .text |       .data |          .bss |
 |-------------------------|-----------------|-------------|---------------|
-| [fill]                  |       178(+178) |       8(+8) |       72(+72) |
-| [lib]/ConfigKit.a       |       284(+284) |       0(+0) |         0(+0) |
+| [fill]                  |       214(+214) |       8(+8) |       73(+73) |
 | [lib]/CoreBattery.a     |       648(+648) |       0(+0) |         0(+0) |
 | [lib]/CoreFlashMemory.a |       546(+546) |       0(+0) |         0(+0) |
 | [lib]/CoreMotor.a       |       176(+176) |       0(+0) |         0(+0) |
 | [lib]/CorePwm.a         |         60(+60) |       0(+0) |         0(+0) |
 | [lib]/CoreQSPI.a        |       160(+160) |       0(+0) |         0(+0) |
 | [lib]/CoreSPI.a         |         28(+28) |       0(+0) |         0(+0) |
 | [lib]/CriticalSection.a |           8(+8) |       0(+0) |         0(+0) |
 | [lib]/FileManagerKit.a  |     1252(+1252) |       0(+0) |         0(+0) |
 | [lib]/FirmwareKit.a     |       906(+906) |       0(+0) |         0(+0) |
 | [lib]/bootutil.a        |     6022(+6022) |     16(+16) | 13816(+13816) |
 | [lib]/c.a               |   42144(+42144) | 2572(+2572) |       97(+97) |
 | [lib]/gcc.a             |     7148(+7148) |       0(+0) |         0(+0) |
 | [lib]/m.a               |       360(+360) |       0(+0) |         0(+0) |
 | [lib]/mbed-os-static.a  |   83650(+83650) |   528(+528) | 11127(+11127) |
 | [lib]/misc              |       188(+188) |       4(+4) |       28(+28) |
 | [lib]/nosys.a           |         32(+32) |       0(+0) |         0(+0) |
 | [lib]/stdc++.a          |   11484(+11484) |     16(+16) |     204(+204) |
 | default_bd.cpp.obj      |       242(+242) |       0(+0) |     568(+568) |
-| main.cpp.obj            |     7004(+7004) |       0(+0) | 12296(+12296) |
+| main.cpp.obj            |     7188(+7188) |       0(+0) | 12295(+12295) |
 | signing_keys.c.obj      |           0(+0) |       0(+0) |         0(+0) |
-| Subtotals               | 162520(+162520) | 3144(+3144) | 38208(+38208) |
+| Subtotals               | 162456(+162456) | 3144(+3144) | 38208(+38208) |
 Total Static RAM memory (data + bss): 41352(+41352) bytes
-Total Flash memory (text + data): 165664(+165664) bytes
+Total Flash memory (text + data): 165600(+165600) bytes
 
Flash used: 183068 (8%) / total: 2097152
SRAM used: 41664 (7%) / total: 524288
spike_lk_config_kit (click to expand)
--- build_artifacts/base_ref-build-enable_log_debug-ON/spike_lk_config_kit-map.txt	2023-01-21 12:50:42.176257982 +0000
+++ build_artifacts/head_ref-build-enable_log_debug-ON/spike_lk_config_kit-map.txt	2023-01-21 12:50:42.424259070 +0000
@@ -1,19 +1,18 @@
 | Module                  |           .text |       .data |          .bss |
 |-------------------------|-----------------|-------------|---------------|
-| [fill]                  |       174(+174) |       8(+8) |       45(+45) |
-| [lib]/ConfigKit.a       |       336(+336) |       0(+0) |         0(+0) |
+| [fill]                  |       174(+174) |       8(+8) |       42(+42) |
 | [lib]/CriticalSection.a |           8(+8) |       0(+0) |         0(+0) |
 | [lib]/FileManagerKit.a  |     1188(+1188) |       0(+0) |         0(+0) |
 | [lib]/HelloWorld.a      |         94(+94) |       0(+0) |         0(+0) |
 | [lib]/c.a               |   40860(+40860) | 2572(+2572) |       97(+97) |
 | [lib]/gcc.a             |     7148(+7148) |       0(+0) |         0(+0) |
 | [lib]/m.a               |       360(+360) |       0(+0) |         0(+0) |
 | [lib]/mbed-os-static.a  |   57722(+57722) |   464(+464) | 10317(+10317) |
 | [lib]/misc              |       188(+188) |       4(+4) |       28(+28) |
 | [lib]/nosys.a           |         32(+32) |       0(+0) |         0(+0) |
 | [lib]/stdc++.a          |   11484(+11484) |     16(+16) |     204(+204) |
-| main.cpp.obj            |     3370(+3370) |       0(+0) | 11069(+11069) |
-| Subtotals               | 122964(+122964) | 3064(+3064) | 21760(+21760) |
-Total Static RAM memory (data + bss): 24824(+24824) bytes
-Total Flash memory (text + data): 126028(+126028) bytes
+| main.cpp.obj            |     3642(+3642) |       0(+0) | 11128(+11128) |
+| Subtotals               | 122900(+122900) | 3064(+3064) | 21816(+21816) |
+Total Static RAM memory (data + bss): 24880(+24880) bytes
+Total Flash memory (text + data): 125964(+125964) bytes
 
Flash used: 139228 (6%) / total: 2097152
SRAM used: 25192 (4%) / total: 524288

@github-actions
Copy link

github-actions bot commented Jan 16, 2023

File comparision analysis report

🔖 Info

Target Flash Used (base/head) Fash Used Δ Flash Available (base/head) Static RAM (base/head) Static RAM Δ
bootloader 170912 (65%)
170784 (65%)
📉
-128 (0%)
91232 (34%)
91360 (34%)
30968 (5%) ø
os 435024 (27%) ø 1129648 (72%)
1129648 (72%)
83112 (15%) ø
Click to show memory sections
| -          |      Hex |     Bytes |  KiB |
|------------|---------:|----------:|-----:|
| Flash      | 0x200000 | 2 097 152 | 2048 |
| SRAM       |  0x80000 |   524 288 |  512 |
| Bootloader |  0x40000 |   262 144 |  256 |
| Header     |   0x1000 |     4 096 |    4 |
| OS         | 0x17E000 | 1 564 672 | 1528 |
| Tail       |   0x1000 |     4 096 |    4 |
| Scratch    |  0x40000 |   262 144 |  256 |

📝 Summary

Click to show summary
  • ✔️ - existing target
  • ✨ - new target
  • ⚰️ - deleted target
  • ✅ - files are the same
  • ❌ - files are different
Target Status .bin .map Total Flash (base/head) Total Flash Δ Static RAM (base/head) Static RAM Δ
LekaOS ✔️ 435024 (20%) ø 83112 (15%) ø
bootloader ✔️ 170912 (8%)
170784 (8%)
📉
-128 (0%)
30968 (5%) ø
functional_ut_boost_ut ✔️ 394140 (18%) ø 20456 (3%) ø
functional_ut_core_imu ✔️ 377348 (17%) ø 20432 (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 ✔️ 374928 (17%) ø 20696 (3%) ø
functional_ut_firmware_kit ✔️ 366972 (17%) ø 20688 (3%) ø
functional_ut_imu_kit ✔️ 382840 (18%) ø 20424 (3%) ø
functional_ut_io_expander ✔️ 359576 (17%) ø 20424 (3%) ø
functional_ut_qdac ✔️ 360744 (17%) ø 20424 (3%) ø
spike_lk_accel_gyro ✔️ 71408 (3%) ø 11800 (2%) ø
spike_lk_audio ✔️ 126988 (6%) ø 14600 (2%) ø
spike_lk_behavior_kit ✔️ 189064 (9%) ø 48080 (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 ✔️ 209528 (9%) ø 52024 (9%) ø
spike_lk_config_kit ✔️ 127332 (6%)
127284 (6%)
📉
-48 (0%)
14312 (2%)
14368 (2%)
📈
+56 (+0%)
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 ✔️ 139400 (6%) ø 14440 (2%) ø
spike_lk_file_reception ✔️ 336000 (16%) ø 27792 (5%) ø
spike_lk_flash_memory ✔️ 63880 (3%) ø 11448 (2%) ø
spike_lk_fs ✔️ 175208 (8%) ø 47904 (9%) ø
spike_lk_imu_kit ✔️ 87980 (4%) ø 12168 (2%) ø
spike_lk_lcd ✔️ 162796 (7%) ø 46664 (8%) ø
spike_lk_led_kit ✔️ 103424 (4%) ø 14528 (2%) ø
spike_lk_log_kit ✔️ 63288 (3%) ø 12256 (2%) ø
spike_lk_motion_kit ✔️ 102172 (4%) ø 14288 (2%) ø
spike_lk_motors ✔️ 62864 (2%) ø 11488 (2%) ø
spike_lk_qdac ✔️ 78852 (3%) ø 11808 (2%) ø
spike_lk_reinforcer ✔️ 206760 (9%) ø 49208 (9%) ø
spike_lk_rfid ✔️ 79084 (3%) ø 11504 (2%) ø
spike_lk_sensors_battery ✔️ 78388 (3%) ø 12600 (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 ✔️ 145452 (6%) ø 15584 (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

Click to show diff list
bootloader (click to expand)
--- build_artifacts/base_ref-build-enable_log_debug-OFF/bootloader-map.txt	2023-01-21 12:48:18.705464947 +0000
+++ build_artifacts/head_ref-build-enable_log_debug-OFF/bootloader-map.txt	2023-01-21 12:48:18.897463208 +0000
@@ -1,26 +1,25 @@
 | Module                  |           .text |       .data |          .bss |
 |-------------------------|-----------------|-------------|---------------|
-| [fill]                  |       242(+242) |       8(+8) |       69(+69) |
-| [lib]/ConfigKit.a       |       284(+284) |       0(+0) |         0(+0) |
+| [fill]                  |       222(+222) |       8(+8) |       70(+70) |
 | [lib]/CoreBattery.a     |       648(+648) |       0(+0) |         0(+0) |
 | [lib]/CoreFlashMemory.a |       546(+546) |       0(+0) |         0(+0) |
 | [lib]/CoreMotor.a       |       176(+176) |       0(+0) |         0(+0) |
 | [lib]/CorePwm.a         |         60(+60) |       0(+0) |         0(+0) |
 | [lib]/CoreQSPI.a        |       160(+160) |       0(+0) |         0(+0) |
 | [lib]/CoreSPI.a         |         28(+28) |       0(+0) |         0(+0) |
 | [lib]/FileManagerKit.a  |     1252(+1252) |       0(+0) |         0(+0) |
 | [lib]/FirmwareKit.a     |       906(+906) |       0(+0) |         0(+0) |
 | [lib]/bootutil.a        |     6022(+6022) |     16(+16) | 13816(+13816) |
 | [lib]/c.a               |   43360(+43360) | 2572(+2572) |       97(+97) |
 | [lib]/gcc.a             |     7148(+7148) |       0(+0) |         0(+0) |
 | [lib]/mbed-os-static.a  |   75078(+75078) |   528(+528) | 11003(+11003) |
 | [lib]/misc              |       188(+188) |       4(+4) |       28(+28) |
 | [lib]/nosys.a           |         32(+32) |       0(+0) |         0(+0) |
 | [lib]/stdc++.a          |   11064(+11064) |     16(+16) |     204(+204) |
 | default_bd.cpp.obj      |       242(+242) |       0(+0) |     568(+568) |
-| main.cpp.obj            |     4508(+4508) |       0(+0) |   1727(+1727) |
+| main.cpp.obj            |     4684(+4684) |       0(+0) |   1726(+1726) |
 | signing_keys.c.obj      |           0(+0) |       0(+0) |         0(+0) |
-| Subtotals               | 151944(+151944) | 3144(+3144) | 27512(+27512) |
+| Subtotals               | 151816(+151816) | 3144(+3144) | 27512(+27512) |
 Total Static RAM memory (data + bss): 30656(+30656) bytes
-Total Flash memory (text + data): 155088(+155088) bytes
+Total Flash memory (text + data): 154960(+154960) bytes
 
Flash used: 170784 (8%) / total: 2097152
SRAM used: 30968 (5%) / total: 524288
spike_lk_config_kit (click to expand)
--- build_artifacts/base_ref-build-enable_log_debug-OFF/spike_lk_config_kit-map.txt	2023-01-21 12:48:29.153366650 +0000
+++ build_artifacts/head_ref-build-enable_log_debug-OFF/spike_lk_config_kit-map.txt	2023-01-21 12:48:29.329365008 +0000
@@ -1,17 +1,16 @@
 | Module                 |           .text |       .data |          .bss |
 |------------------------|-----------------|-------------|---------------|
-| [fill]                 |       152(+152) |       8(+8) |       41(+41) |
-| [lib]/ConfigKit.a      |       336(+336) |       0(+0) |         0(+0) |
+| [fill]                 |       164(+164) |       8(+8) |       38(+38) |
 | [lib]/FileManagerKit.a |     1188(+1188) |       0(+0) |         0(+0) |
 | [lib]/HelloWorld.a     |         94(+94) |       0(+0) |         0(+0) |
 | [lib]/c.a              |   41940(+41940) | 2572(+2572) |       97(+97) |
 | [lib]/gcc.a            |     7084(+7084) |       0(+0) |         0(+0) |
 | [lib]/mbed-os-static.a |   49926(+49926) |   464(+464) | 10193(+10193) |
 | [lib]/misc             |       188(+188) |       4(+4) |       28(+28) |
 | [lib]/nosys.a          |         32(+32) |       0(+0) |         0(+0) |
 | [lib]/stdc++.a         |   10976(+10976) |     16(+16) |     204(+204) |
-| main.cpp.obj           |       792(+792) |       0(+0) |     373(+373) |
-| Subtotals              | 112708(+112708) | 3064(+3064) | 10936(+10936) |
-Total Static RAM memory (data + bss): 14000(+14000) bytes
-Total Flash memory (text + data): 115772(+115772) bytes
+| main.cpp.obj           |     1052(+1052) |       0(+0) |     432(+432) |
+| Subtotals              | 112644(+112644) | 3064(+3064) | 10992(+10992) |
+Total Static RAM memory (data + bss): 14056(+14056) bytes
+Total Flash memory (text + data): 115708(+115708) bytes
 
Flash used: 127284 (6%) / total: 2097152
SRAM used: 14368 (2%) / total: 524288

@codecov
Copy link

codecov bot commented Jan 16, 2023

Codecov Report

Merging #1258 (943b26b) into develop (23b5a93) will decrease coverage by 0.01%.
The diff coverage is 100.00%.

❗ Current head 943b26b differs from pull request most recent head 119ab50. Consider uploading reports for the commit 119ab50 to get more accurate results

@@             Coverage Diff             @@
##           develop    #1258      +/-   ##
===========================================
- Coverage    96.20%   96.20%   -0.01%     
===========================================
  Files          148      148              
  Lines         3719     3716       -3     
===========================================
- Hits          3578     3575       -3     
  Misses         141      141              
Impacted Files Coverage Δ
libs/ConfigKit/include/Config.h 100.00% <100.00%> (ø)
libs/ConfigKit/include/ConfigKit.h 100.00% <100.00%> (ø)

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

@YannLocatelli YannLocatelli force-pushed the yann/feature/config/multiple-values branch 2 times, most recently from 1824d2a to 79ac2fa Compare January 16, 2023 15:42
@YannLocatelli YannLocatelli marked this pull request as ready for review January 16, 2023 15:57
Copy link
Contributor

@HPezz HPezz left a comment

Choose a reason for hiding this comment

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

Nice work

libs/ConfigKit/tests/ConfigComplex_test.cpp Outdated Show resolved Hide resolved
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.

thanks for the PR, very interesting new feature 👍

that being said, as I wrote in the comments, I think it would be better to refactor Config instead of adding a new different type

libs/ConfigKit/include/ConfigComplex.h Outdated Show resolved Hide resolved
libs/ConfigKit/include/ConfigComplex.h Outdated Show resolved Hide resolved
libs/ConfigKit/include/ConfigComplex.h Outdated Show resolved Hide resolved
libs/ConfigKit/include/ConfigComplex.h Outdated Show resolved Hide resolved
@YannLocatelli YannLocatelli force-pushed the yann/feature/config/multiple-values branch 2 times, most recently from a72cffd to d932774 Compare January 19, 2023 12:19
@YannLocatelli YannLocatelli force-pushed the yann/feature/config/multiple-values branch from d932774 to c89dd0e Compare January 19, 2023 12:53
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.

great job merging both! 👍

a few suggestions to make the code even easier to read :)

libs/ConfigKit/include/Config.h Outdated Show resolved Hide resolved
app/bootloader/main.cpp Outdated Show resolved Hide resolved
app/bootloader/main.cpp Outdated Show resolved Hide resolved
Comment on lines 18 to 37
template <std::size_t N>
[[nodiscard]] auto read(Config<N> const &config) const -> std::array<uint8_t, N>
{
if (FileManagerKit::File file {config.path(), "r"}; file.is_open()) {
auto data = std::array<uint8_t, N> {};
file.read(data);

return data;
}

return config.default_value();
}
Copy link
Member

Choose a reason for hiding this comment

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

it's actually possible to have a function with different return types provided it's used in constexpr context

see https://gcc.godbolt.org/z/ren7Pa685

not sure if that would work there though, maybe for future improvements

Copy link
Member Author

Choose a reason for hiding this comment

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

I tried something for read

libs/ConfigKit/include/ConfigKit.h Outdated Show resolved Hide resolved
libs/ConfigKit/include/Config.h Outdated Show resolved Hide resolved
libs/ConfigKit/include/ConfigKit.h Outdated Show resolved Hide resolved
libs/ConfigKit/include/ConfigList.h Outdated Show resolved Hide resolved
@YannLocatelli YannLocatelli force-pushed the yann/feature/config/multiple-values branch 3 times, most recently from 3576dee to 943b26b Compare January 20, 2023 11:54
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 👍 great work!

@YannLocatelli YannLocatelli force-pushed the yann/feature/config/multiple-values branch from 943b26b to 1b47896 Compare January 21, 2023 12:37
@YannLocatelli YannLocatelli force-pushed the yann/feature/config/multiple-values branch from 1b47896 to 119ab50 Compare January 21, 2023 12:39
@github-actions
Copy link

Version comparison

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

@sonarcloud
Copy link

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

@ladislas ladislas merged commit 1eddb70 into develop Jan 21, 2023
@ladislas ladislas deleted the yann/feature/config/multiple-values branch January 21, 2023 22:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
01 - type: task Something to do
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants