expo-ble模块测试demo 联调BLE模块 take 10 新增log 打印ani文件前后512字节

This commit is contained in:
Yudi Xiao
2025-12-11 16:42:41 +08:00
parent f816165779
commit 83cdf722ac
8 changed files with 32 additions and 29 deletions

View File

@@ -1,5 +1,5 @@
import {BleProtocolService} from './BleProtocolService';
import {COMMAND_TYPES} from '../protocol/Constants';
import {APP_COMMAND_TYPES, COMMAND_TYPES} from '../protocol/Constants';
export class FileTransferService {
@@ -16,7 +16,7 @@ export class FileTransferService {
return FileTransferService.instance;
}
public async transferFile(deviceId: string, filePath: string, type: COMMAND_TYPES, onProgress?: (progress: number) => void): Promise<void> {
public async transferFile(deviceId: string, filePath: string, type: APP_COMMAND_TYPES, onProgress?: (progress: number) => void): Promise<void> {
try {
const response = await fetch(filePath);
if (!response.ok) {