hejianhao
2026-05-27 66f4fe24d76bb9e00ba90752a9d26f47ce504089
Merge branch 'feature_v1.0' of http://gitlab.xiaopeng.local:18080/robotaxi1/xp-robotaxi-miniprogram into feature_v1.0
2个文件已修改
16 ■■■■■ 已修改文件
src/robotaxi/utils/car-control/RtAuthBluetoothManager.js 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/robotaxi/utils/car-control/log.js 1 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/robotaxi/utils/car-control/RtAuthBluetoothManager.js
@@ -182,18 +182,8 @@
  }
  findAndConnect() {
    const { macAddress, isIOS } = this.state;
    let key = madAddressToLocalName(macAddress);
    if (isIOS) key = key + 'IOS';
    const cacheDeviceId = Taro.getStorageSync(key);
    if (cacheDeviceId) {
      log.info('RtAuth: 使用缓存DeviceId连接', cacheDeviceId);
      this.state.deviceId = cacheDeviceId;
      this.connectDevice();
    } else {
      this.startScan();
    }
    // Robotaxi 场景每次都是不同车辆,直接扫描,不使用缓存
    this.startScan();
  }
  startScan() {
@@ -241,6 +231,7 @@
    wx.createBLEConnection({
      deviceId: this.state.deviceId,
      timeout: 15000,  // 15秒超时,鸿蒙设备可能需要更长时间
      success: () => {
        log.info('RtAuth: 连接设备成功');
        this.state.connected = true;
src/robotaxi/utils/car-control/log.js
@@ -6,6 +6,7 @@
    log.debug.apply(log, arguments)
  },
  info() {
    console.log('[LOG]', ...arguments)
    if (!log) return
    log.info.apply(log, arguments)
  },