Files
swiftcontrol/lib/bluetooth/devices/steering_device.dart
Jonas Bark 071d4969c5 feat(steering): show the steering gauge for Elite Sterzo and Rizer
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-02 22:05:00 +02:00

21 lines
857 B
Dart

import 'package:flutter/foundation.dart';
import 'package:bike_control/utils/keymap/buttons.dart';
/// A device that reports a steering angle and drives steerLeft/steerRight —
/// used to render the shared SteeringGauge (phone steering, Elite Sterzo, Rizer).
abstract interface class SteeringDevice {
/// Live calibrated steering angle in degrees, in the gauge's convention:
/// positive ⇒ steering LEFT, negative ⇒ steering RIGHT (as phone steering
/// reports it). Devices whose physical angle is the other way round negate it.
ValueListenable<double> get steeringAngle;
/// True once the device has finished its initial calibration.
ValueListenable<bool> get steeringCalibrated;
/// Dead-zone threshold in degrees.
double get steeringThreshold;
ControllerButton get steerLeftButton;
ControllerButton get steerRightButton;
}