Expose raw steering angles to connected apps over OpenBikeControl
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 35/100
Research direction
Start with lib/bluetooth/devices/gyroscope/gyroscope_steering.dart and lib/bluetooth/devices/steering_device.dart to trace how the calibrated angle reaches the BLE and network senders, obc_ble_emulator.dart and obc_mdns_emulator.dart. Review the OpenBikeControl protocol and its tests or documentation, then determine how an optional continuous angle stream can coexist with existing button actions. Done means connected apps can receive signed angles and updates, with units and behavior documented.
Written by the indexing model from the issue text.
Description
Feature request
Please provide a way for connected apps to retrieve or subscribe to raw steering angles in degrees, in addition to the existing steer-left / steer-right button actions.
Use case
I am integrating BikeControl with VoxelVelo, a Minecraft cycling mod. I want the virtual bike's handlebar angle to closely follow the physical handlebar angle: for example, a 10-degree turn should request approximately 10 degrees of steering, rather than become a held steering button that eventually reaches full lock.
Current behavior
From the current source:
GyroscopeSteeringalready exposes a calibratedsteeringAnglein degrees locally, but_applyPWMSteeringconverts it into left/right button states after crossing the configured threshold.SteeringDevicedefines the shared angle interface and sign convention for phone steering, Sterzo and Rizer.- The OpenBikeControl BLE and network senders encode actions as pressed (
1) or released (0), so the receiving app cannot recover the actual angle or distinguish small and large turns in the same direction.
Reducing sensitivity on the receiving side can make this gentler, but cannot reproduce the measured angle once that information has been discarded.
Proposed behavior
Expose a continuous signed angle stream over BLE and network, ideally as an optional OpenBikeControl protocol extension that apps can discover or opt into. A separate documented interface would also be useful if a protocol extension needs more discussion.
It would help to document:
- Units, precision/range and left/right sign convention.
- The calibrated angle relative to neutral, before button thresholding; optionally the uncalibrated/raw sensor angle too.
- Updates when the angle changes, including return to zero, calibration/reset and device disconnection.
- Availability for all devices implementing
SteeringDevice, where supported.
Existing digital steering actions should remain available for apps that rely on them. The main request is access to the measured angle so receiving apps can implement proportional steering themselves.
Suggested placement of PWM steering
_applyPWMSteering should probably only run in the OpenBikeControl instance shortly before simulating key presses, rather than in the steering device itself. The steering device and shared internal data flow could preserve the measured angle in degrees until the output decides how to consume it.
That would let angle-aware consumers receive the continuous angle, while outputs that need left/right key presses could apply PWM steering at that final step. It would also avoid losing angle information early in the pipeline.
- Dominant language
- Dart
- Stars
- 620
- Forks
- 75
- Avg merge
- 8h 55m
- Merged PRs (30d)
- 21
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from OpenBikeControl/bikecontrol
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
OpenBikeControl/bikecontrol#404 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
OpenBikeControl/bikecontrol#401 · 2 comments ·
Maintainers usually reply within 1 day
-
Difficulty 4/5 1-2 days Newbie friendliness 54/100
OpenBikeControl/bikecontrol#417 ·
Maintainers usually reply within 1 day
-
Difficulty 3/5 1-2 days Newbie friendliness 38/100
OpenBikeControl/bikecontrol#413 · 5 comments ·
Maintainers usually reply within 1 day
-
Difficulty 5/5 Over a week Newbie friendliness 43/100
OpenBikeControl/bikecontrol#411 ·
Maintainers usually reply within 1 day
All issues in OpenBikeControl/bikecontrol
Similar issues
-
[Packages] [flutter_shaders] InkWell shader golden test fails on Flutter stable and Master channelsOpenfrom: manual-qa
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day
-
README highlightsOpendocumentation
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
patarapolw/lingua_srs#22 ·
-
interruptRestart fails with "Tool <name> not found" for namespaced tools (ns/tool)Possibly taken @esrakadah claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
genkit-ai/genkit-dart#657 ·
Maintainers usually reply within 1 day
-
area/ci-build bug
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
DarkFlippers/qUnleashed#423 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100