Skip to content

Add device-command mapping for treadmill inclination overrides and preserve logical selection on lossy feedback - #4947

Open
cagnulein wants to merge 2 commits into
masterfrom
codex/add-backward-compatible-inclination-mapping-extension-3shg4d
Open

Add device-command mapping for treadmill inclination overrides and preserve logical selection on lossy feedback#4947
cagnulein wants to merge 2 commits into
masterfrom
codex/add-backward-compatible-inclination-mapping-extension-3shg4d

Conversation

@cagnulein

Copy link
Copy Markdown
Owner

Motivation

  • Provide an option to control the physical device command value associated with each legacy raw/index row while keeping existing logical inclination override behavior by default.
  • Preserve the logical inclination chosen by the app when some treadmills report lossy or imprecise raw feedback after issuing a mapped outbound command.

Description

  • Introduces outbound-device-command mapping APIs: treadmillInclinationDeviceCommand, treadmillInclinationOverrideForRawFeedback, and updates treadmillInclinationOverrideReverse to return device-command values when configured, and to remember/apply logical selections while awaiting/validating feedback.
  • Adds state fields to treadmill (m_mappedInclination*) to track mapped rows, awaiting feedback and the last reported raw value, and adds parseInclinationOverride to use new feedback-aware mapping.
  • Adds settings keys and defaults for treadmill_inclination_override_device_command_* in qzsettings.h/cpp, increments settings counts, and exposes them in the UI by updating settings-treadmill-inclination-override.qml, settings.qml and settings-catalog.json (new controls and a repeater for raw rows).
  • Replaces legacy calls to the basic override in several device parsers to use the new feedback-aware functions (treadmillInclinationOverrideForRawFeedback / parseInclinationOverride) and adds unit tests (TreadmillInclinationOverrideTest) and test wiring to validate mapping and feedback behavior.

Testing

  • Added Google Test unit tests in tst/Devices/TestTreadmillInclinationOverrides.cpp and header, and registered them in the test project file; test suite exercises legacy reverse mapping, custom device-command mappings, and feedback preservation logic.
  • Ran the test suite including TreadmillInclinationOverrideTest and the updated tests under the test harness; the new tests passed.

Codex Task

@cagnulein

Copy link
Copy Markdown
Owner Author

Alexandra Cambri Acezoe P30

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant