Skip to content

Reduce IMU BLE payloads in firmware 2.3.0 - #357

Merged
TobiasRoeddiger merged 1 commit into
codex/compact-ppg-blefrom
codex/compact-imu-ble
Oct 4, 2026
Merged

TobiasRoeddiger merged 1 commit into
codex/compact-ppg-blefrom
codex/compact-imu-ble

Conversation

@TobiasRoeddiger

Copy link
Copy Markdown
Member

Reduce IMU BLE samples from 36 to 24 bytes: recover the six original int16 accelerometer/gyroscope counts and retain all three calibrated magnetometer floats. The 2.3.x library restores the exact existing float32 values and units. Nine samples fit in one 244-byte notification, up from six.

Acquisition, timestamps, parsing metadata, SD recording, and .oe files keep their existing formats. Encoding rejects values that cannot be reconstructed losslessly. Depends on OpenEarable/protocol#3; stacked on #355 so the firmware version changes with the transport.

Validation: FOTA build passes; seven transport tests pass, including all 65,536 signed counts, unchanged input/SD bytes, batch boundaries and invalid values. Hardware release validation will follow integration.

@github-actions

github-actions Bot commented Oct 4, 2026

Copy link
Copy Markdown

✅ Unit tests passed

4 passed, 0 failed/error, 0 skipped — view workflow run

Test scenario Platform Result
openearable.unit.sensor_component native_sim/native/64 ✅ passed
openearable.unit.sensor_transport native_sim/native/64 ✅ passed
openearable.unit.ring_buffer native_sim/native/64 ✅ passed
openearable.unit.audio_startup native_sim/native/64 ✅ passed

Download the unit-test-results artifact for full Twister reports and logs.

@github-actions

github-actions Bot commented Oct 4, 2026

Copy link
Copy Markdown

Compiler warnings

The extended-warning build completed successfully.

Application compiler warnings

Show warnings
unicast_server/main.cpp:78:33: warning: 'int usb_enable(usb_dc_status_callback)' is deprecated [-Wdeprecated-declarations]
src/SensorManager/Baro.cpp:93:34: warning: implicit conversion from 'float' to 'double' to match other operand of binary expression [-Wdouble-promotion]

View this workflow run

@github-actions

github-actions Bot commented Oct 4, 2026

Copy link
Copy Markdown

Build output available:
openearable_v2_firmware.zip
openearable_v2_fota.zip

@TobiasRoeddiger
TobiasRoeddiger merged commit dfebddf into codex/compact-ppg-ble Oct 4, 2026
4 checks passed
@github-actions

github-actions Bot commented Oct 4, 2026

Copy link
Copy Markdown

CodeChecker static analysis (advisory)

Note

This report is informational. It does not block merging and does not change code.

At a glance

Scope Result
Findings on lines changed by this PR 0
Findings in the complete codebase 8
Analyzer invocations completed 180
Analyzer invocations failed 0

Findings on changed lines

No non-style findings were reported on lines changed by this PR.

Analyzer coverage

Analyzer Completed Failed
clangsa 90 0
cppcheck 90 0

Complete-codebase summary

Severity: 2 high, 6 low
Reported by analyzer: clangsa: 8

Complete-codebase findings

Each finding includes source context. The > line and carets identify the expression reported by the analyzer.

Show detailed findings with source context (8 of 8)
HIGH — src/audio/audio_datapath.c:1002 — Null pointer passed as 1st argument to memory set function
  1001 | 
> 1002 |             memset(tx_buf, 0, BLK_MULTI_CHAN_SIZE_OCTETS);
       |                    ^^^^^^
  1003 |         }
HIGH — src/audio/sw_codec_select.c:220 — Assigned value is garbage or undefined
  219 | 
> 220 |         meta_out->bytes_per_location = bytes_written;
      |                                        ^^^^^^^^^^^^^
  221 |         meta_out->locations &= meta_in->locations;
LOW — src/audio/audio_system.c:238 — Value stored to 'audio_q_num_used' is never read
  237 |         if (unlikely(++debug_trans_count >= DEBUG_INTERVAL_NUM)) {
> 238 |             audio_q_num_used = k_msgq_num_used_get(&audio_q_in);
      |                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  239 |             LOG_DBG(COLOR_CYAN "IN filled: %d" COLOR_RESET, audio_q_num_used);
LOW — src/audio/audio_system.c:745 — Value stored to 'num_ch' during its initialization is never read
  744 | 
> 745 |     int num_ch = POPCOUNT(locations);
      |         ^^^^^^
  746 | 
LOW — src/audio/le_audio_rx.c:125 — Value stored to 'bad_frame_percentage' during its initialization is never read
  124 |                 rx_stats[location_index].bad_or_empty_frame_cnt;
> 125 |     double bad_frame_percentage =
      |            ^^^^^^^^^^^^^^^^^^^^
  126 |         (total_frames > 0) ? (((double)rx_stats[location_index].bad_or_empty_frame_cnt /
LOW — src/audio/le_audio_rx.c:160 — Value stored to 'ret' is never read
  159 |         /* FIFO buffer is full, swap out oldest frame for a new one */
> 160 |         ret = k_msgq_get(&ble_q_rx, (void *)&stale_buf, K_NO_WAIT);
      |               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  161 |         /* Checking return value of k_msgq_get() is not necessary here,
LOW — src/bluetooth/bt_management/scanning/bt_mgmt_scan.c:58 — Value stored to 'scan_param' during its initialization is never read
  57 | 
> 58 |     struct bt_le_scan_param *scan_param =
     |                              ^^^^^^^^^^
  59 |         BT_LE_SCAN_PARAM(NRF_AUDIO_GATEWAY_SCAN_TYPE, BT_LE_SCAN_OPT_FILTER_DUPLICATE,
LOW — src/modules/audio_sync_timer.c:138 — Value stored to 'cc_get_calls' is never read
  137 | 
> 138 |     cc_get_calls = 0;
      |                    ^
  139 | 

Open the workflow run and download the complete CodeChecker report for a detailed view. Check out codechecker.html/index.html.

@TobiasRoeddiger TobiasRoeddiger mentioned this pull request Oct 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant