husq
2023-10-09 2c680fa0913b9ff1e8e7a4f8bc3dd49543fc97b5
src/components/g-map/use-drone-control-ws-event.ts
@@ -14,17 +14,16 @@
  function onControlSourceChange (data: ControlSourceChangeInfo) {
    if (data.type === ControlSourceChangeType.Flight && data.sn === sn) {
      droneControlSource.value = data.control_source
      message.info(`Flight control is changed to ${droneControlSource.value}`)
      message.info(`飞行控制改为 ${droneControlSource.value}`)
      return
    }
    if (data.type === ControlSourceChangeType.Payload && data.sn === payloadSn) {
      payloadControlSource.value = data.control_source
      message.info(`Payload control is changed to ${ payloadControlSource.value }.`)
      return
      message.info(`负载控制改为 ${payloadControlSource.value}.`)
    }
  }
  function handleProgress(key: string, message: string, error: number) {
  function handleProgress (key: string, message: string, error: number) {
    if (error !== 0) {
      notification.error({
        key: key,
@@ -72,7 +71,6 @@
      }
      case EBizCode.DrcStatusNotify: {
        const { sn: deviceSn, result, message: msg } = payload.data as DrcStatusNotifyMessage
        if (deviceSn !== sn) return
        // handleProgress(EBizCode.DrcStatusNotify, `device(sn: ${deviceSn}) ${msg}`, result)
        break