🚴
COBI.Bike
  • Introduction
  • Getting up and running
  • Namespaces
    • App
      • Theme
      • Text to Speech
      • Read Later
      • Language
      • Contact
      • Touch Interaction Enabled
      • Hub Location
      • Clock Visible
      • Is Dark
      • Is Hub Connected
    • Parameters
      • Language
      • Context
      • SDK Version
    • Hub
      • Motor Interface Ready
      • Bell Ringing
      • External Interface Action
      • Ambient Light State
    • Battery
      • State
    • Battery Two
      • State
    • Battery Controller
      • Slots
      • State
    • Motor
      • Serialnumber
      • Distance
      • Assistance Indicator
      • Range
      • Supported Drive Modes
      • Drive mode
      • Next Service
      • Power On Time
    • Mobile
      • Location
      • Heading
      • Location Availability
    • Navigation Service
      • Route
      • Eta
      • Distance To Destination
      • Status
      • Control
    • User
      • Temperature Unit
      • Length Unit
    • Bike
      • Type
    • Ride Service
      • Speed
      • User Power
      • User Power Availability
      • Heart Rate
      • Heart Rate Availability
      • Cadence
      • Cadence Availability
    • Tour Service
      • Calories
      • Ascent
      • Riding Distance
      • Riding Duration
      • Average Speed
    • Devkit
      • Override ThumbController Mapping
  • Entities
    • Theme
    • RgbColor
    • TextToSpeechContent
    • ReadLaterItem
    • ContactData
    • ExternalInterfaceAction
    • AmbientLightState
    • BatteryCondition
      • BatteryState
    • BatterySlots
    • ServiceTrigger
    • Location
    • Coordinate
    • Route
    • NavigationStatus
    • NavigationCommand
      • NavigationAction
    • TemperatureUnit
    • MeasurementUnit
    • BikeType
    • Placemark
      • PlacemarkCategory
Powered by GitBook
On this page
  1. Namespaces
  2. Motor

Drive mode

Defines the eBike drive mode of the specific vendor protocol.

In ascending order. Depending on the Supported Drive Modes

const onDriveModeChange = (value: number, timestamp?: Date) => {
    console.log(value, timestamp);
};

COBI.motor.driveMode.read(onDriveModeChange); // Instantly get the current value
COBI.motor.driveMode.subscribe(onDriveModeChange);
COBI.motor.driveMode.unsubscribe(onDriveModeChange);
const onDriveModeChange = (value, timestamp) => {
    console.log(value, timestamp);
};

COBI.motor.driveMode.read(onDriveModeChange); // Instantly get the current value
COBI.motor.driveMode.subscribe(onDriveModeChange);
COBI.motor.driveMode.unsubscribe(onDriveModeChange);
PreviousSupported Drive ModesNextNext Service

Last updated 2 years ago