Skip to content

[Tunes] Add missing iOS tiltback ERPM fields #190

Description

@KozakBartosz

What to build

Restore Android/iOS native parity for Refloat Tune Snapshot decoding by adding the missing tiltback_constant_erpm and tiltback_variable_erpm field definitions to the iOS Refloat tune group.

The iOS decoder must expose these values when the board-provided Refloat schema contains them and preserve existing compatibility behavior when an older schema omits them.

Likely files

  • modules/vesc-ble/ios/RefloatConfigModels.swift - iOS REFLOAT_TUNE_GROUPS definition missing both fields.
  • modules/vesc-ble/android/src/main/java/expo/modules/vescble/RefloatConfigModels.kt - parity reference containing the expected IDs, labels, units, and ordering.
  • modules/vesc-ble/ios/RefloatConfigDecoder.swift - existing schema-driven omission and missingFieldIds behavior to verify.
  • modules/vesc-ble/ios/Tests/ - likely location for native decoder/model parity coverage; inspect existing test structure first.

Implementation hints

  • Preserve the field order used by Android: tiltback_constant, tiltback_constant_erpm, tiltback_variable, tiltback_variable_max, tiltback_variable_erpm.
  • Match Android labels and units exactly.
  • Do not make either ERPM field mandatory. RefloatConfigDecoder already skips definitions absent from a board schema and records their IDs in missingFieldIds.
  • Inspect both files linked by the existing @parity annotations before finishing.

Acceptance criteria

  • iOS REFLOAT_TUNE_GROUPS includes tiltback_constant_erpm with label Constant Tiltback ERPM and unit ERPM.
  • iOS REFLOAT_TUNE_GROUPS includes tiltback_variable_erpm with label Variable Tiltback Start ERPM and unit ERPM.
  • iOS field IDs, labels, units, and ordering match Android.
  • Decoding a schema containing these fields exposes both values in the Tune Snapshot.
  • Decoding an older schema without these fields still succeeds and reports them through missingFieldIds.
  • Relevant iOS native tests pass.

Blocked by

None - can start immediately

Related

None

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:iosiOS-only work: platform port and iOS-specific native code. Not cross-platform work that touches iOSarea:nativeTouches native side (modules/vesc-ble, Swift/Kotlin)area:tunesVESC tune read/write flowscomplexity:mediumNeeds care, moderate integration surface. Use sonnet.ready-for-agentFully specified, ready for an AFK agent

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions