@@ -148,23 +148,23 @@ export class UhkHidDevice {
148148 public async deleteBond ( address : number [ ] ) : Promise < void > {
149149 await this . assertDeviceSupportWirelessUSBCommands ( ) ;
150150
151- this . logService . usb ( '[UhkHidDevice] USB[T]: Delete all bonds' ) ;
151+ this . logService . usbOps ( '[UhkHidDevice] USB[T]: Delete all bonds' ) ;
152152 const buffer = Buffer . from ( [ UsbCommand . UnpairAll , ...address ] ) ;
153153 await this . write ( buffer ) ;
154154 }
155155
156156 public async deleteAllBonds ( ) : Promise < void > {
157157 await this . assertDeviceSupportWirelessUSBCommands ( ) ;
158158
159- this . logService . usb ( '[UhkHidDevice] USB[T]: Delete all bonds' ) ;
159+ this . logService . usbOps ( '[UhkHidDevice] USB[T]: Delete all bonds' ) ;
160160 const buffer = Buffer . from ( [ UsbCommand . UnpairAll , 0 , 0 , 0 , 0 , 0 , 0 ] ) ;
161161 await this . write ( buffer ) ;
162162 }
163163
164164 public async getBleAddress ( ) : Promise < number [ ] > {
165165 await this . assertDeviceSupportWirelessUSBCommands ( ) ;
166166
167- this . logService . usb ( '[UhkHidDevice] USB[T]: get BLE address' ) ;
167+ this . logService . usbOps ( '[UhkHidDevice] USB[T]: get BLE address' ) ;
168168 const buffer = Buffer . from ( [ UsbCommand . GetProperty , DevicePropertyIds . BleAddress ] ) ;
169169 const responseBuffer = await this . write ( buffer ) ;
170170
@@ -180,7 +180,7 @@ export class UhkHidDevice {
180180 public async getPairedRightPairBleAddress ( ) : Promise < number [ ] > {
181181 await this . assertDeviceSupportWirelessUSBCommands ( ) ;
182182
183- this . logService . usb ( '[UhkHidDevice] USB[T]: get paired right pair BLE address' ) ;
183+ this . logService . usbOps ( '[UhkHidDevice] USB[T]: get paired right pair BLE address' ) ;
184184 const buffer = Buffer . from ( [ UsbCommand . GetProperty , DevicePropertyIds . PairedRightPeerBleAddress ] ) ;
185185 const responseBuffer = await this . write ( buffer ) ;
186186
@@ -196,7 +196,7 @@ export class UhkHidDevice {
196196 public async getPairingInfo ( ) : Promise < PairingInfo > {
197197 await this . assertDeviceSupportWirelessUSBCommands ( ) ;
198198
199- this . logService . usb ( '[UhkHidDevice] USB[T]: read pairing info' ) ;
199+ this . logService . usbOps ( '[UhkHidDevice] USB[T]: read pairing info' ) ;
200200 const buffer = Buffer . from ( [ UsbCommand . GetPairingData ] ) ;
201201 const responseBuffer = await this . write ( buffer ) ;
202202 const numbers = convertBufferToIntArray ( responseBuffer ) ;
@@ -216,7 +216,7 @@ export class UhkHidDevice {
216216 public async getPairingStatus ( ) : Promise < PairingStatuses > {
217217 await this . assertDeviceSupportWirelessUSBCommands ( ) ;
218218
219- this . logService . usb ( '[UhkHidDevice] USB[T]: read pairing info' ) ;
219+ this . logService . usbOps ( '[UhkHidDevice] USB[T]: read pairing info' ) ;
220220 const buffer = Buffer . from ( [ UsbCommand . GetProperty , DevicePropertyIds . PairingStatus ] ) ;
221221 const responseBuffer = await this . write ( buffer ) ;
222222
@@ -237,7 +237,7 @@ export class UhkHidDevice {
237237 public async isPairedWith ( address : number [ ] ) : Promise < boolean > {
238238 await this . assertDeviceSupportWirelessUSBCommands ( ) ;
239239
240- this . logService . usb ( '[UhkHidDevice] USB[T]: is paired with' ) ;
240+ this . logService . usbOps ( '[UhkHidDevice] USB[T]: is paired with' ) ;
241241 const buffer = Buffer . from ( [
242242 UsbCommand . IsPaired ,
243243 ...address ,
@@ -252,23 +252,23 @@ export class UhkHidDevice {
252252 public async pairCentral ( ) : Promise < void > {
253253 await this . assertDeviceSupportWirelessUSBCommands ( ) ;
254254
255- this . logService . usb ( '[UhkHidDevice] USB[T]: pair central' ) ;
255+ this . logService . usbOps ( '[UhkHidDevice] USB[T]: pair central' ) ;
256256 const buffer = Buffer . from ( [ UsbCommand . PairCentral ] ) ;
257257 await this . write ( buffer ) ;
258258 }
259259
260260 public async pairPeripheral ( ) : Promise < void > {
261261 await this . assertDeviceSupportWirelessUSBCommands ( ) ;
262262
263- this . logService . usb ( '[UhkHidDevice] USB[T]: pair peripheral' ) ;
263+ this . logService . usbOps ( '[UhkHidDevice] USB[T]: pair peripheral' ) ;
264264 const buffer = Buffer . from ( [ UsbCommand . PairPeripheral ] ) ;
265265 await this . write ( buffer ) ;
266266 }
267267
268268 public async setPairingInfo ( pairId : PairIds , info : PairingInfo ) : Promise < void > {
269269 await this . assertDeviceSupportWirelessUSBCommands ( ) ;
270270
271- this . logService . usb ( '[UhkHidDevice] USB[T]: set pairing info' ) ;
271+ this . logService . usbOps ( '[UhkHidDevice] USB[T]: set pairing info' ) ;
272272 const buffer = Buffer . from ( [
273273 UsbCommand . SetPairingData ,
274274 pairId ,
@@ -283,7 +283,7 @@ export class UhkHidDevice {
283283 public async switchToPairingMode ( ) : Promise < void > {
284284 await this . assertDeviceSupportWirelessUSBCommands ( ) ;
285285
286- this . logService . usb ( '[UhkHidDevice] USB[T]: switch to pairing mode' ) ;
286+ this . logService . usbOps ( '[UhkHidDevice] USB[T]: switch to pairing mode' ) ;
287287 const buffer = Buffer . from ( [ UsbCommand . EnterPairingMode ] ) ;
288288 await this . write ( buffer ) ;
289289 }
@@ -558,7 +558,7 @@ export class UhkHidDevice {
558558 ( timeout & 0xff << 24 ) >> 24
559559 ] ) ;
560560 const data = this . getTransferData ( message , reportId ) ;
561- this . logService . usb ( `[UhkHidDevice] USB[T]: Enumerated device, mode: ${ reenumMode } ` ) ;
561+ this . logService . usbOps ( `[UhkHidDevice] USB[T]: Enumerated device, mode: ${ reenumMode } ` ) ;
562562 this . logService . usb ( '[UhkHidDevice] USB[W]:' , bufferToString ( data ) . substr ( 3 ) ) ;
563563 try {
564564 keyboardDevice . write ( data ) ;
@@ -576,7 +576,7 @@ export class UhkHidDevice {
576576 }
577577 jumped = true ;
578578 } else {
579- this . logService . usb ( '[UhkHidDevice] USB[T]: Enumerated device is not ready yet' ) ;
579+ this . logService . usbOps ( '[UhkHidDevice] USB[T]: Enumerated device is not ready yet' ) ;
580580 }
581581 }
582582 else {
@@ -592,7 +592,7 @@ export class UhkHidDevice {
592592
593593 async sendKbootCommandToModule ( module : ModuleSlotToI2cAddress , command : KbootCommands , maxTry = 1 ) : Promise < any > {
594594 let transfer ;
595- this . logService . usb ( `[UhkHidDevice] USB[T]: Send KbootCommand ${ mapI2cAddressToModuleName ( module ) } ${ KbootCommands [ command ] . toString ( ) } ` ) ;
595+ this . logService . usbOps ( `[UhkHidDevice] USB[T]: Send KbootCommand ${ mapI2cAddressToModuleName ( module ) } ${ KbootCommands [ command ] . toString ( ) } ` ) ;
596596 if ( command === KbootCommands . idle ) {
597597 transfer = Buffer . from ( [ UsbCommand . SendKbootCommandToModule , command ] ) ;
598598 } else {
@@ -678,7 +678,7 @@ export class UhkHidDevice {
678678 return this . _protocolVersions ;
679679 }
680680
681- this . logService . usb ( '[UhkHidDevice] USB[T]: Read device protocol version information' ) ;
681+ this . logService . usbOps ( '[UhkHidDevice] USB[T]: Read device protocol version information' ) ;
682682 const command = Buffer . from ( [ UsbCommand . GetProperty , DevicePropertyIds . ProtocolVersions ] ) ;
683683 const buffer = await this . write ( command ) ;
684684 const uhkBuffer = UhkBuffer . fromArray ( convertBufferToIntArray ( buffer ) ) ;
0 commit comments