EUCData

data class EUCData(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 temperature2: 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)(source)

Represents real-time telemetry data from an Electric Unicycle.

Contains all decoded data fields from BLE characteristic notifications, including speed, voltage, current, temperature, battery information, and various device-specific settings and status flags.

Parameters

frameType

Internal identifier for the frame format

speed

Current speed in km/h

voltage

Battery voltage in volts

current

Current draw in amps (positive = discharge, negative = charge)

temperature

Temperature in degrees Celsius

batteryLevel

Battery level percentage (0-100)

distance

Current trip distance in kilometers

power

Current power consumption in watts

pwm

PWM duty cycle percentage (0-100), null if unavailable

timestamp

Timestamp in milliseconds

rawData

Raw byte data from the BLE characteristic

manufacturer

Manufacturer name

model

Device model name

serialNumber

Device serial number, null if unavailable

firmwareVersion

Firmware version, null if unavailable

isCharging

Current charging status

rideTime

Total ride time in seconds

cellVoltages

Individual cell voltages, null if unavailable

motorTemperature

Motor temperature in degrees Celsius, null if unavailable

totalDistance

Total distance traveled in kilometers, null if unavailable

pedalsMode

Pedals mode value (legacy-mapped, typically 0..2)

alarmMode

Encoded alarm mode value (firmware-dependent, usually 0..3)

rollAngleMode

Encoded roll-angle mode value (firmware-dependent, usually 0..3)

usesMiles

Whether the device uses miles instead of km/h

autoPowerOffMinutes

Auto power-off time in minutes, null if unavailable

tiltBackSpeed

Tilt-back speed threshold, null if unavailable

ledMode

LED mode setting, null if unavailable

lightMode

Light mode setting, null if unavailable

alertFlags

Alert flags bitmap, null if unavailable

wheelAlarm

Wheel alarm status, null if unavailable

topSpeed

Session top speed in km/h, null if unavailable

fanStatus

Fan on/off status, null if unavailable

chargingStatus

Charging status byte, null if unavailable

temperature2

Secondary temperature (e.g., motor/board), null if unavailable

cpuLoad

CPU load percentage, null if unavailable

speedLimit

Configured speed limit in km/h, null if unavailable

alarm1Speed

Alarm 1 speed threshold, null if unavailable

alarm2Speed

Alarm 2 speed threshold, null if unavailable

alarm3Speed

Alarm 3 speed threshold, null if unavailable

wheelMaxSpeed

Maximum speed setting, null if unavailable

wheelDistance

Trip distance reported by wheel, null if unavailable

angle

Pitch/tilt angle in degrees, null if unavailable

phaseCurrent

Motor phase current in amps, null if unavailable

roll

Roll angle in degrees, null if unavailable

torque

Estimated torque in Nm, null if unavailable

mode

Ride mode string (e.g. "active", "idle", "charging"), null if unavailable

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, temperature2: 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)

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
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
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
val pwm: Double?
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

Functions

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