急停 发送ws 遥感控制 避免 raf循环闭包

This commit is contained in:
mmc
2026-10-15 14:02:02 +08:00
parent 4e1356b8af
commit 652dbdcc78
6 changed files with 46 additions and 3 deletions

View File

@@ -35,6 +35,7 @@ import envConfig from '../../../env';
import utils from '@/lib/utils.ts';
import { useUnitFormatter } from '@/lib/units';
import { useTranslation } from 'react-i18next';
import { sendEmergencyStop } from './emergencyStopControl';
const { Content } = Layout;
const { Text, Title } = Typography;
@@ -543,7 +544,11 @@ export default function DeviceOverviewPage() {
const handlePause = () => message.info(t('devices.taskPaused'));
const handleReturn = () => message.info(t('devices.fixed2ReturnHomeFixed2CommandIssuedFixed2'));
const handleRecharge = () => message.info(t('devices.commandIssuedFixed2'));
const handleEmergencyStop = () => message.error(t('devices.s73'));
// 急停:点击时直接下发 button7(绕过控制权限校验),并提示已触发
const handleEmergencyStop = () => {
sendEmergencyStop(userInfo);
message.error(t('devices.s73'));
};
const fix2 = (val) => {
if (val === null || val === undefined || isNaN(val)) return '-';