From 2ac805b05486bf569c0aa00233f485be1d85848e Mon Sep 17 00:00:00 2001 From: tiger_zhou Date: Thu, 4 Jul 2024 14:47:24 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=97=E8=BD=A6=E6=8E=A7=E5=88=B6btn?= =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- protos/device_state.proto | 12 +++++------- protos/request.proto | 7 ++++++- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/protos/device_state.proto b/protos/device_state.proto index 3b0438e..15ab9b6 100644 --- a/protos/device_state.proto +++ b/protos/device_state.proto @@ -349,7 +349,7 @@ message TrainVobcState { // 车载ATP/ATO旁路状态 bool atpOrAtoBypassState = 33; // 车辆牵引已切除状态 -// bool trainTractionCuted = 34; + bool trainTractionCuted = 34; // 障碍物检测按钮 bool obstacleCheckBtn = 35; // 驾驶室激活反馈按钮 @@ -432,6 +432,8 @@ message TrainVobcState { // ATO牵引指令3 bool atoTractionCommand3=74; uint32 mockInfo = 75; //车载接口输出的模拟量信息 +// atp 切除开关 + bool atpCutSwitch = 76; // request.TrainControl.Direction historyDir = 76; //历史行驶方向,用于列车操控时,方向旋钮更改方向时使用,不在前端显示 } @@ -883,20 +885,16 @@ message SimulationThirdPartyApiServiceState { //列车控制状态 message TrainControlState{ - EmergentButton ebutton = 1; //紧急摁钮 + repeated ControlButton buttons = 1; repeated DriverKeySwitch driverKey = 2; //驾驶端激活 DirectionKeySwitch dirKey = 3; //接车运行方向 PushHandler pushHandler = 4; //牵引制动手柄 - ControlButton buttons = 5; + message ControlButton{ uint32 id = 1; bool passed = 3; } - message EmergentButton{ - uint32 id = 1; - bool passed = 3; - } message DriverKeySwitch{ uint32 id = 1; bool val = 2; //0=关,1=开 diff --git a/protos/request.proto b/protos/request.proto index 4ab9897..02ab2c0 100644 --- a/protos/request.proto +++ b/protos/request.proto @@ -192,10 +192,15 @@ message TrainControl{ string trainId = 2; uint32 deviceId = 3;//设备id TrainControlType controlType = 4; - EmergentButton button = 5;// 紧急制动 + ControlButton controlButton = 5; // 控制按钮 DriverKeySwitch driverKey = 6; DirectionKeySwitch dirKey = 7; //方向 PushHandler handler = 8; //手柄 + + + message ControlButton{ + bool active = 1; + } enum TrainControlType{ EMERGENT_BUTTON = 0; // 摁钮 DRIVER_KEY_SWITCH = 1; //驾驶端钥匙