Class: $.DeviceManager

Inherits:
Toybox.Lang.Object show all

Overview

Instance Member Summary collapse

Instance Method Summary collapse

Instance Attribute Details

var _config as BluetoothLowEnergy.Characteristic or Null

var _configComplete as Lang.Boolean

var _device as BluetoothLowEnergy.Device or Null

var _profileManager as $.ProfileManager

var _sampleInProgress as Lang.Boolean

var _soundService as BluetoothLowEnergy.Service or Null

var _speakerData as BluetoothLowEnergy.Characteristic or Null

Instance Method Details

initialize(bleDelegate as $.ThingyDelegate, profileManager as $.ProfileManager)

Constructor

Parameters:

  • bleDelegate —

    The BLE delegate

  • profileManager —

    The profile manager

playSample(sampleId as Lang.Number) as Void

Play the sample sound

Parameters:

  • sampleId —

    Identifier of the sample

procCharWrite(char as BluetoothLowEnergy.Characteristic, status as BluetoothLowEnergy.Status) as Void

Handle the completion of a write operation on a characteristic

Parameters:

  • char —

    The characteristic that was written

  • status —

    The result of the operation

procConnection(device as BluetoothLowEnergy.Device) as Void

Process a new device connection

Parameters:

  • device —

    The device that was connected

procScanResult(scanResult as BluetoothLowEnergy.ScanResult) as Void

Process scan result

Parameters:

  • scanResult —

    The scan result

start() as Void

Start BLE scanning

startSoundControl() as Void

Start the sound control on the device


Generated Oct 20, 2026, 8:20:52 AM