Skip to content

Remove legacy BLE telemetry code#92

Merged
zjwhitehead merged 2 commits intomasterfrom
copilot/remove-legacy-telemetry-code
Feb 25, 2026
Merged

Remove legacy BLE telemetry code#92
zjwhitehead merged 2 commits intomasterfrom
copilot/remove-legacy-telemetry-code

Conversation

Copy link
Copy Markdown

Copilot AI commented Feb 21, 2026

Legacy individual BLE characteristics were already default-disabled via DISABLE_LEGACY_BLE_TELEMETRY. This removes the dead code entirely, leaving only the packed binary telemetry path (V1 protocol).

Removed

  • updateBMSTelemetry and updateESCTelemetryBLE — implementations, stubs, and declarations
  • All #ifndef DISABLE_LEGACY_BLE_TELEMETRY guards and their contents in bms_service.cpp / esc_service.cpp
  • 14 legacy BMS UUID defines + 4 legacy ESC UUID defines from ble_ids.h
  • -D DISABLE_LEGACY_BLE_TELEMETRY build flag from platformio.ini
  • Unused ble_utils.h include from bms_service.cpp (was only needed by legacy notify-on-change logic)
  • Call sites in sp140.ino

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Co-authored-by: zjwhitehead <4623792+zjwhitehead@users.noreply.github.com>
Copilot AI changed the title [WIP] Remove legacy telemetry code and references Remove legacy BLE telemetry code Feb 21, 2026
Copilot AI requested a review from zjwhitehead February 21, 2026 21:54
@zjwhitehead zjwhitehead marked this pull request as ready for review February 21, 2026 22:06
@zjwhitehead
Copy link
Copy Markdown
Member

@copilot there aren't any BLE data that we are losing because of this legacy deprecation right? its all still there (even if its in a different format)

Copy link
Copy Markdown
Author

Copilot AI commented Feb 25, 2026

@copilot there aren't any BLE data that we are losing because of this legacy deprecation right? its all still there (even if its in a different format)

Correct — no data is lost. Every field from the legacy individual characteristics is present in the packed V1 structs:

BMS (BLE_BMS_Telemetry_V1): SOC, voltage, current, power, highest/lowest cell voltage, highest/lowest temperature, voltage differential, failure level, charge/discharge MOS states, charging state, cycle count, energy per cycle, timestamp — all there.

ESC (BLE_ESC_Telemetry_V1): voltage, current, all 4 temps (MOS, cap, MCU, motor), eRPM, input PWM, running/selfcheck error bitmasks, timestamp — all there.

The only change is structural: previously each value had its own BLE characteristic UUID that clients could subscribe to individually; now everything is delivered in a single binary-packed notification per update. Same data, more efficient transport.

@zjwhitehead zjwhitehead merged commit 50ef221 into master Feb 25, 2026
8 checks passed
Copilot AI requested a review from zjwhitehead February 25, 2026 21:06
@zjwhitehead zjwhitehead deleted the copilot/remove-legacy-telemetry-code branch February 25, 2026 21:06
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.

2 participants