BLEConstants

Constants and helper functions for BLE operations specific to Electric Unicycles.

Contains:

  • BLE Service and Characteristic UUIDs for various EUC manufacturers

  • Manufacturer identifiers

  • Connection state enumeration

  • Default timeout and MTU values

  • Frame header and footer magic bytes for protocol detection

Types

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
const val DEFAULT_MTU_SIZE: Int = 23
Link copied to clipboard
const val DEFAULT_SCAN_TIMEOUT_MS: Long = 10000
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
const val MANUFACTURER_GOTWAY: Int = 71
Link copied to clipboard
const val MANUFACTURER_INMOTION: Int = 73
Link copied to clipboard
const val MANUFACTURER_KINGSONG: Int = 75
Link copied to clipboard
Link copied to clipboard
const val MANUFACTURER_NINEBOT: Int = 78
Link copied to clipboard
const val MANUFACTURER_NOSFET: Int = 79
Link copied to clipboard
const val MANUFACTURER_VETERAN: Int = 86
Link copied to clipboard
const val MAX_BYTE_VALUE: Int = 255
Link copied to clipboard
const val MAX_MTU_SIZE: Int = 517
Link copied to clipboard
const val MAX_PERCENTAGE: Int = 100
Link copied to clipboard
Link copied to clipboard
const val MIN_BATTERY_VOLTAGE_V: Double = 50.0
Link copied to clipboard
const val MIN_BYTE_VALUE: Int = 0
Link copied to clipboard
const val MIN_PERCENTAGE: Int = 0
Link copied to clipboard
const val MIN_READY_VOLTAGE_V: Double = 30.0
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
const val POLLING_INTERVAL_FAST_MS: Long = 1000
Link copied to clipboard
Link copied to clipboard
const val RECONNECT_BASE_DELAY_MS: Long = 1000
Link copied to clipboard
const val RECONNECT_JITTER_MAX_MS: Long = 500
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
const val VOLTAGE_CURRENT_SCALE: Double = 100.0
Link copied to clipboard
const val VOLTAGE_SCALE_1000: Double = 1000.0

Functions

Link copied to clipboard