| | |
| | | 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}.`) |
| | | message.info(`负载控制改为 ${payloadControlSource.value}.`) |
| | | } |
| | | } |
| | | |