EUCData

data class EUCData(val frameType: String = "BASE", val speed: Double, val voltage: Double, val current: Double, val temperature: Double, val batteryLevel: Int, val distance: Double, val power: Double, val pwm: Double? = null, val timestamp: Long, val rawData: ByteArray, val manufacturer: String, val model: String, val serialNumber: String? = null, val firmwareVersion: String? = null, val isCharging: Boolean, val rideTime: Long, val cellVoltages: List<Double>? = null, val motorTemperature: Double? = null, val totalDistance: Double? = null, val pedalsMode: Int? = null, val alarmMode: Int? = null, val rollAngleMode: Int? = null, val usesMiles: Boolean? = null, val autoPowerOffMinutes: Int? = null, val tiltBackSpeed: Int? = null, val ledMode: Int? = null, val lightMode: Int? = null, val alertFlags: Int? = null, val wheelAlarm: Boolean? = null, val topSpeed: Double? = null, val fanStatus: Int? = null, val chargingStatus: Int? = null, val mosfetTemperature: Double? = null, val boardTemperature: Double? = null, val imuTemperature: Double? = null, val tirePressureKpa: Double? = null, val cpuLoad: Int? = null, val speedLimit: Double? = null, val alarm1Speed: Int? = null, val alarm2Speed: Int? = null, val alarm3Speed: Int? = null, val wheelMaxSpeed: Int? = null, val wheelDistance: Double? = null, val angle: Double? = null, val phaseCurrent: Double? = null, val roll: Double? = null, val torque: Double? = null, val mode: String? = null, val totalRideTimeSeconds: Long? = null, val totalPowerOnTimeSeconds: Long? = null, val dynamicSpeedLimit: Double? = null, val rideModeOffroad: Boolean? = null, val pedalSensitivityPercent: Int? = null, val pedalMountingAngleTenths: Int? = null, val speakerVolumePercent: Int? = null, val speakerMuted: Boolean? = null, val avasEnabled: Boolean? = null, val daytimeRunningLight: Boolean? = null)(source)

Represents real-time telemetry data from an Electric Unicycle.

Physical measurements use metric units regardless of the wheel's display preference: speed in km/h, distance in km, voltage in V, current in A, temperature in °C, power in W, time durations in seconds, angles in degrees, torque in N·m, and tire pressure in kPa. usesMiles reports a wheel setting only; it does not change the units of these values.

Some protocol settings are encoded integers whose meaning or mode mapping varies by manufacturer/firmware. Those fields are identified as protocol-specific below rather than assigning a possibly misleading shared interpretation. Unsupported or unavailable optional measurements are null.

Parameters

frameType

Internal protocol frame identifier.

speed

Current signed speed in km/h.

voltage

Battery-pack voltage in V.

current

Battery current in A; sign convention can depend on the protocol.

temperature

Primary wheel temperature in °C; the physical sensor represented varies by protocol.

batteryLevel

Estimated or reported state of charge, in percent (0..100).

distance

Current trip distance in km where reported. Legacy Ninebot telemetry only supplies an odometer, which is exposed in both distance and totalDistance.

power

Battery power in W, reported or derived from voltage and current.

pwm

PWM duty cycle in percent where available.

timestamp

Unix epoch timestamp in milliseconds.

rawData

Raw BLE frame bytes used to produce this value.

manufacturer

Manufacturer name.

model

Device model name.

serialNumber

Device serial number, if available.

firmwareVersion

Device firmware version, if available.

isCharging

Normalized charging state.

rideTime

Elapsed ride/session time in seconds; may be estimated when the wheel does not report it.

cellVoltages

Individual battery-cell voltages in V.

motorTemperature

Motor temperature in °C.

totalDistance

Lifetime/odometer distance in km.

pedalsMode

Protocol-specific pedals-mode code; mapping is not uniform across manufacturers.

alarmMode

Protocol-specific alarm-mode code.

rollAngleMode

Protocol-specific roll-angle-mode code.

usesMiles

True when the wheel reports imperial display mode, false for metric, or null when unknown. Metric units are still used for decoded physical measurements.

autoPowerOffMinutes

Auto-power-off delay in minutes (whole minutes, truncated). Protocols that encode this as a live countdown expose the time still remaining before the wheel auto-sleeps rather than a fixed configured delay, so the value can decrease frame to frame (Gotway/Begode do this and report seconds, truncated here to minutes).

tiltBackSpeed

Configured tilt-back speed threshold in km/h where its unit is defined by the protocol; otherwise the protocol's encoded integer is preserved.

ledMode

Protocol-specific LED mode code.

lightMode

Protocol-specific front-light mode code (for example, Begode 0=off, 1=on, 2=strobe).

alertFlags

Protocol-specific alert bit field.

wheelAlarm

Normalized wheel alarm state, if available.

topSpeed

Session top speed in km/h.

fanStatus

Protocol-specific fan status code; interpretation can vary.

chargingStatus

Protocol-specific charging status code; use isCharging for the normalized state.

mosfetTemperature

MOSFET temperature in °C.

boardTemperature

Controller/board temperature in °C.

imuTemperature

IMU temperature in °C.

tirePressureKpa

Tire pressure in kPa.

cpuLoad

CPU load in percent where available.

speedLimit

Speed limit in km/h. KingSong reports the configured max-speed/tilt-back setting here (also in wheelMaxSpeed); InMotion and Ninebot may report a runtime limit.

alarm1Speed

Alarm 1 speed threshold in km/h.

alarm2Speed

Alarm 2 speed threshold in km/h.

alarm3Speed

Alarm 3 speed threshold in km/h.

wheelMaxSpeed

Configured maximum speed in km/h, as REPORTED by the wheel (never the last value written): the value io.github.tritbool.euc.ble.protocols.CommandType.SET_SPEED_LIMIT sets. Filled by every protocol that reports it: KingSong (settings frame), Gotway/ExtremeBull and Leaperkim/Nosfet (tiltback), Ninebot Z (speed-limit report), InMotion V9/P6 (status page tiltback). Null while the wheel has not reported it. Clients should read this field rather than brand-specific ones.

wheelDistance

KingSong-reported trip distance in km; null until that value is received.

angle

Pitch angle in degrees.

phaseCurrent

Motor phase current in A.

roll

Roll angle in degrees.

torque

Estimated torque in N·m.

mode

Protocol-reported ride state/name; values can vary by manufacturer.

totalRideTimeSeconds

Cumulative lifetime ride time in seconds.

totalPowerOnTimeSeconds

Cumulative lifetime powered-on time in seconds.

dynamicSpeedLimit

KingSong F6 runtime speed ceiling in km/h, independent of the configured speedLimit. Null until received; the reason for a reduction is not reported here.

rideModeOffroad

InMotion V9/P6: true while the offroad/classic ride mode is active, from the status page polled alongside realtime. Null while the wheel has not answered one.

pedalSensitivityPercent

InMotion V9/P6: pedal sensitivity percent of the ACTIVE ride mode, from the status page. Null while the wheel has not answered one.

pedalMountingAngleTenths

InMotion V9: pedal mounting angle in tenths of a degree, from the status page. Null while the wheel has not answered one.

speakerVolumePercent

InMotion V9: voice/speaker volume percent, from the status page. Null while the wheel has not answered one.

speakerMuted

InMotion V9: true while the speaker is switched off, from the status page.

avasEnabled

InMotion V9: AVAS wave-sound switch, from the status page.

daytimeRunningLight

InMotion V9: daytime running light switch, from the status page.

Constructors

Link copied to clipboard
constructor(frameType: String = "BASE", speed: Double, voltage: Double, current: Double, temperature: Double, batteryLevel: Int, distance: Double, power: Double, pwm: Double? = null, timestamp: Long, rawData: ByteArray, manufacturer: String, model: String, serialNumber: String? = null, firmwareVersion: String? = null, isCharging: Boolean, rideTime: Long, cellVoltages: List<Double>? = null, motorTemperature: Double? = null, totalDistance: Double? = null, pedalsMode: Int? = null, alarmMode: Int? = null, rollAngleMode: Int? = null, usesMiles: Boolean? = null, autoPowerOffMinutes: Int? = null, tiltBackSpeed: Int? = null, ledMode: Int? = null, lightMode: Int? = null, alertFlags: Int? = null, wheelAlarm: Boolean? = null, topSpeed: Double? = null, fanStatus: Int? = null, chargingStatus: Int? = null, mosfetTemperature: Double? = null, boardTemperature: Double? = null, imuTemperature: Double? = null, tirePressureKpa: Double? = null, cpuLoad: Int? = null, speedLimit: Double? = null, alarm1Speed: Int? = null, alarm2Speed: Int? = null, alarm3Speed: Int? = null, wheelMaxSpeed: Int? = null, wheelDistance: Double? = null, angle: Double? = null, phaseCurrent: Double? = null, roll: Double? = null, torque: Double? = null, mode: String? = null, totalRideTimeSeconds: Long? = null, totalPowerOnTimeSeconds: Long? = null, dynamicSpeedLimit: Double? = null, rideModeOffroad: Boolean? = null, pedalSensitivityPercent: Int? = null, pedalMountingAngleTenths: Int? = null, speakerVolumePercent: Int? = null, speakerMuted: Boolean? = null, avasEnabled: Boolean? = null, daytimeRunningLight: Boolean? = null)

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val cpuLoad: Int?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val ledMode: Int?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val mode: String?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val pwm: Double?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val roll: Double?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int