删除devicecontrol文件

This commit is contained in:
mmc
2026-10-12 09:55:18 +08:00
parent 7e4872e560
commit 5d468fb0b7

View File

@@ -10,6 +10,8 @@ import {
X
} from 'lucide-react';
import XboxController from './XboxController';
import RobotFeatureButtons from './RobotFeatureButtons';
import DPadControl from './DPadControl';
import { getControlRight, getFlightTaskDetail, getJurisdiction, getLiveStream, getPlaneDeviceList, getsinglePlan, getsinglePlanTrack, getUAVState, getWayLine, getWorkData, getWorkList, postFlightCommmand, saveDeviceTask, updateFlightTaskStatus } from '@/api/api';
import { message as antdMessage, Button, DatePicker, Input, InputNumber, Modal, Select, Tooltip } from 'antd';
@@ -1564,6 +1566,17 @@ const RobotControlCenter = ({ setView }) => {
</div>
</div>*/}
{/* Feature buttons */}
<div className="bg-[#16203a]/40 backdrop-blur-sm rounded-xl p-3 mb-4 border border-[#243157]/20">
<p className="text-xs text-[#9ca3af] mb-2 font-medium">{t('devices.features.title')}</p>
<RobotFeatureButtons
activeFeatures={['response', 'obstacleAvoidance', 'lowBatteryReturn', 'tiltProtection']}
onToggle={(feature, enabled) => {
console.log('[Feature]', feature, enabled);
}}
/>
</div>
{/* 控制区:左轮 + Xbox + 右轮 —— 紧凑布局 */}
<div className="flex gap-4 items-start">
{/* 左轮速度面板 - 缩小 */}
@@ -1612,13 +1625,20 @@ const RobotControlCenter = ({ setView }) => {
</div>
{/* Xbox 手柄 - 缩小、居中 */}
<div className="w-[44%] scale-90 transform-gpu flex justify-center ">
<XboxController
onGamepadUpdate={handleGamepad}
handleControlModal={handleControlModal}
isControlled={isControlled}
isConnecting={isConnecting}
/>
<div className="w-[44%] flex flex-col items-center gap-3">
<div className="scale-90 transform-gpu flex justify-center">
<XboxController
onGamepadUpdate={handleGamepad}
handleControlModal={handleControlModal}
isControlled={isControlled}
isConnecting={isConnecting}
hasControlRight={hasControlRight}
/>
</div>
<div className="bg-[#0f172a]/90 backdrop-blur-xl rounded-2xl p-4 border border-[#1e293b]/60 shadow-lg w-full">
<p className="text-xs text-[#9ca3af] mb-3 font-medium text-center">{t('devices.dpad.title')}</p>
<DPadControl onGamepadUpdate={handleGamepad} disabled={!isControlled} />
</div>
</div>
{/* 右轮速度面板 - 缩小 */}