| | |
| | | </div> |
| | | <div class="row"> |
| | | <div class="drone-control-direction"> |
| | | <Button size="small" ghost @mousedown="onMouseDown(KeyCode.KEY_Q)" @onmouseup="onMouseUp"> |
| | | <Button size="small" ghost @mousedown="onMouseDown(KeyCode.KEY_Q)" @mouseup="onMouseUp"> |
| | | <template #icon> |
| | | <UndoOutlined/> |
| | | </template> |
| | | <span class="word">Q</span> |
| | | </Button> |
| | | <Button size="small" ghost @mousedown="onMouseDown(KeyCode.KEY_W)" @onmouseup="onMouseUp"> |
| | | <Button size="small" ghost @mousedown="onMouseDown(KeyCode.KEY_W)" @mouseup="onMouseUp"> |
| | | <template #icon> |
| | | <UpOutlined/> |
| | | </template> |
| | | <span class="word">W</span> |
| | | </Button> |
| | | <Button size="small" ghost @mousedown="onMouseDown(KeyCode.KEY_E)" @onmouseup="onMouseUp"> |
| | | <Button size="small" ghost @mousedown="onMouseDown(KeyCode.KEY_E)" @mouseup="onMouseUp"> |
| | | <template #icon> |
| | | <RedoOutlined/> |
| | | </template> |
| | | <span class="word">E</span> |
| | | </Button> |
| | | <Button size="small" ghost @mousedown="onMouseDown(KeyCode.ARROW_UP)" @onmouseup="onMouseUp"> |
| | | <Button size="small" ghost @mousedown="onMouseDown(KeyCode.ARROW_UP)" @mouseup="onMouseUp"> |
| | | <template #icon> |
| | | <ArrowUpOutlined/> |
| | | </template> |
| | | </Button> |
| | | <br/> |
| | | <Button size="small" ghost @mousedown="onMouseDown(KeyCode.KEY_A)" @onmouseup="onMouseUp"> |
| | | <Button size="small" ghost @mousedown="onMouseDown(KeyCode.KEY_A)" @mouseup="onMouseUp"> |
| | | <template #icon> |
| | | <LeftOutlined/> |
| | | </template> |
| | | <span class="word">A</span> |
| | | </Button> |
| | | <Button size="small" ghost @mousedown="onMouseDown(KeyCode.KEY_S)" @onmouseup="onMouseUp"> |
| | | <Button size="small" ghost @mousedown="onMouseDown(KeyCode.KEY_S)" @mouseup="onMouseUp"> |
| | | <template #icon> |
| | | <DownOutlined/> |
| | | </template> |
| | | <span class="word">S</span> |
| | | </Button> |
| | | <Button size="small" ghost @mousedown="onMouseDown(KeyCode.KEY_D)" @onmouseup="onMouseUp"> |
| | | <Button size="small" ghost @mousedown="onMouseDown(KeyCode.KEY_D)" @mouseup="onMouseUp"> |
| | | <template #icon> |
| | | <RightOutlined/> |
| | | </template> |
| | | <span class="word">D</span> |
| | | </Button> |
| | | <Button size="small" ghost @mousedown="onMouseDown(KeyCode.ARROW_DOWN)" @onmouseup="onMouseUp"> |
| | | <Button size="small" ghost @mousedown="onMouseDown(KeyCode.ARROW_DOWN)" @mouseup="onMouseUp"> |
| | | <template #icon> |
| | | <ArrowDownOutlined/> |
| | | </template> |
| | |
| | | <div> |
| | | <span class="form-label">返回原点高度(m):</span> |
| | | <a-input-number v-model:value="takeoffToPointPopoverData.rthAltitude"/> |
| | | </div> |
| | | <div> |
| | | <span class="form-label">指点飞行高度(m):</span> |
| | | <a-input-number :min="2" :max="8000" v-model:value="takeoffToPointPopoverData.commanderFlightHeight"/> |
| | | </div> |
| | | <div> |
| | | <span class="form-label">返航模式:</span> |
| | | <a-select |
| | | v-model:value="takeoffToPointPopoverData.rthMode" |
| | | style="width: 120px" |
| | | :options="RthModeOptions" |
| | | ></a-select> |
| | | </div> |
| | | <div> |
| | | <span class="form-label">指点飞行模式:</span> |
| | | <a-select |
| | | v-model:value="takeoffToPointPopoverData.commanderFlightMode" |
| | | style="width: 120px" |
| | | :options="CommanderFlightModeOptions" |
| | | ></a-select> |
| | | </div> |
| | | <div> |
| | | <span class="form-label">指点飞行失控动作:</span> |
| | | <a-select |
| | | v-model:value="takeoffToPointPopoverData.commanderModeLostAction" |
| | | style="width: 120px" |
| | | :options="CommanderModeLostActionOptions" |
| | | ></a-select> |
| | | </div> |
| | | <div> |
| | | <span class="form-label">失控操作:</span> |
| | |
| | | } from '/@/api/drone-control/drone' |
| | | import { useDroneControl } from './use-drone-control' |
| | | import { |
| | | RthModeOptions, |
| | | CommanderModeLostActionOptions, |
| | | CommanderFlightModeOptions, |
| | | GimbalResetMode, |
| | | GimbalResetModeOptions, |
| | | LostControlActionInCommandFLightOptions, |
| | |
| | | maxSpeed: MAX_SPEED, |
| | | rthAltitude: 100 as null | number, |
| | | rcLostAction: LostControlActionInCommandFLight.RETURN_HOME, |
| | | exitWaylineWhenRcLost: WaylineLostControlActionInCommandFlight.EXEC_LOST_ACTION |
| | | exitWaylineWhenRcLost: WaylineLostControlActionInCommandFlight.EXEC_LOST_ACTION, |
| | | rthMode: 0 as number, |
| | | commanderModeLostAction: 1 as number, |
| | | commanderFlightMode: 0 as number, |
| | | commanderFlightHeight: 100 as number |
| | | }) |
| | | |
| | | function onShowTakeoffToPointPopover () { |
| | |
| | | rth_altitude: takeoffToPointPopoverData.rthAltitude, |
| | | max_speed: takeoffToPointPopoverData.maxSpeed, |
| | | rc_lost_action: takeoffToPointPopoverData.rcLostAction, |
| | | exit_wayline_when_rc_lost: takeoffToPointPopoverData.exitWaylineWhenRcLost |
| | | exit_wayline_when_rc_lost: takeoffToPointPopoverData.exitWaylineWhenRcLost, |
| | | rth_mode: takeoffToPointPopoverData.rthMode, |
| | | commander_mode_lost_action: takeoffToPointPopoverData.commanderModeLostAction, |
| | | commander_flight_mode: takeoffToPointPopoverData.commanderFlightMode, |
| | | commander_flight_height: takeoffToPointPopoverData.commanderFlightHeight |
| | | }) |
| | | } catch (error) { |
| | | } |