From a7ab416ebdf0ca9aafb9604af2adfc47eca9b4df Mon Sep 17 00:00:00 2001 From: tiger_zhou Date: Tue, 12 Mar 2024 13:58:57 +0800 Subject: [PATCH] =?UTF-8?q?=E9=80=9F=E4=BC=A0=EF=BC=8C=E9=9B=B7=E8=BE=BE?= =?UTF-8?q?=E8=BE=93=E5=87=BA=E6=95=B0=E5=80=BC=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dto/common_proto/common_data.pb.go | 12 ++++++------ dto/simulation.go | 4 ++-- dto/state_proto/device_state.pb.go | 16 ++++++++-------- rtss_simulation | 2 +- 4 files changed, 17 insertions(+), 17 deletions(-) diff --git a/dto/common_proto/common_data.pb.go b/dto/common_proto/common_data.pb.go index accad7c..9afe8ea 100644 --- a/dto/common_proto/common_data.pb.go +++ b/dto/common_proto/common_data.pb.go @@ -239,9 +239,9 @@ type TrainEndsState struct { // 加速度持续时间 AccCheckTime int32 `protobuf:"varint,8,opt,name=accCheckTime,proto3" json:"accCheckTime,omitempty"` // 速传速度输出(米/秒) - AccOutSpeed float32 `protobuf:"fixed32,9,opt,name=accOutSpeed,proto3" json:"accOutSpeed,omitempty"` + AccOutSpeed int32 `protobuf:"varint,9,opt,name=accOutSpeed,proto3" json:"accOutSpeed,omitempty"` // 雷达速度输出(米/秒) - RadarOutSpeed float32 `protobuf:"fixed32,10,opt,name=radarOutSpeed,proto3" json:"radarOutSpeed,omitempty"` + RadarOutSpeed int32 `protobuf:"varint,10,opt,name=radarOutSpeed,proto3" json:"radarOutSpeed,omitempty"` } func (x *TrainEndsState) Reset() { @@ -332,14 +332,14 @@ func (x *TrainEndsState) GetAccCheckTime() int32 { return 0 } -func (x *TrainEndsState) GetAccOutSpeed() float32 { +func (x *TrainEndsState) GetAccOutSpeed() int32 { if x != nil { return x.AccOutSpeed } return 0 } -func (x *TrainEndsState) GetRadarOutSpeed() float32 { +func (x *TrainEndsState) GetRadarOutSpeed() int32 { if x != nil { return x.RadarOutSpeed } @@ -412,9 +412,9 @@ var file_common_data_proto_rawDesc = []byte{ 0x43, 0x68, 0x65, 0x63, 0x6b, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x61, 0x63, 0x63, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x61, 0x63, 0x63, 0x4f, 0x75, 0x74, 0x53, 0x70, 0x65, 0x65, 0x64, 0x18, 0x09, 0x20, 0x01, - 0x28, 0x02, 0x52, 0x0b, 0x61, 0x63, 0x63, 0x4f, 0x75, 0x74, 0x53, 0x70, 0x65, 0x65, 0x64, 0x12, + 0x28, 0x05, 0x52, 0x0b, 0x61, 0x63, 0x63, 0x4f, 0x75, 0x74, 0x53, 0x70, 0x65, 0x65, 0x64, 0x12, 0x24, 0x0a, 0x0d, 0x72, 0x61, 0x64, 0x61, 0x72, 0x4f, 0x75, 0x74, 0x53, 0x70, 0x65, 0x65, 0x64, - 0x18, 0x0a, 0x20, 0x01, 0x28, 0x02, 0x52, 0x0d, 0x72, 0x61, 0x64, 0x61, 0x72, 0x4f, 0x75, 0x74, + 0x18, 0x0a, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0d, 0x72, 0x61, 0x64, 0x61, 0x72, 0x4f, 0x75, 0x74, 0x53, 0x70, 0x65, 0x65, 0x64, 0x42, 0x2f, 0x5a, 0x2d, 0x6a, 0x6f, 0x79, 0x6c, 0x69, 0x6e, 0x6b, 0x2e, 0x63, 0x6c, 0x75, 0x62, 0x2f, 0x62, 0x6a, 0x2d, 0x72, 0x74, 0x73, 0x74, 0x73, 0x2d, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2f, 0x64, 0x74, 0x6f, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, diff --git a/dto/simulation.go b/dto/simulation.go index 2f8fcc1..9c29766 100644 --- a/dto/simulation.go +++ b/dto/simulation.go @@ -103,8 +103,8 @@ type ConfigTrainEnds struct { AccEnable bool `json:"accEnable"` // 加速计是否有效 AccCheckSpeedDiff float32 `json:"accCheckSpeedDiff"` // 加速计速度差 AccCheckTime int32 `json:"accCheckTime"` // 加速计储蓄时间 - AccOutSpeed float32 `json:"accOutSpeed"` // 速传速度输出 - RadarOutSpeed float32 `json:"radarOutSpeed"` // 雷达速度输出 + AccOutSpeed int32 `json:"accOutSpeed"` // 速传速度输出 + RadarOutSpeed int32 `json:"radarOutSpeed"` // 雷达速度输出 } type ConfigTrainData struct { //Mass int32 `json:"mass" form:"mass"` // 列车的质量(100=1ton) diff --git a/dto/state_proto/device_state.pb.go b/dto/state_proto/device_state.pb.go index 3ce82cd..c1842bc 100644 --- a/dto/state_proto/device_state.pb.go +++ b/dto/state_proto/device_state.pb.go @@ -2564,9 +2564,9 @@ type TrainEndsStateMqtt struct { // 加速度持续时间 AccCheckTime int32 `protobuf:"varint,8,opt,name=accCheckTime,proto3" json:"accCheckTime,omitempty"` // 速传速度输出(米/秒) - AccOutSpeed string `protobuf:"bytes,9,opt,name=accOutSpeed,proto3" json:"accOutSpeed,omitempty"` + AccOutSpeed int32 `protobuf:"varint,9,opt,name=accOutSpeed,proto3" json:"accOutSpeed,omitempty"` // 雷达速度输出(米/秒) - RadarOutSpeed string `protobuf:"bytes,10,opt,name=radarOutSpeed,proto3" json:"radarOutSpeed,omitempty"` + RadarOutSpeed int32 `protobuf:"varint,10,opt,name=radarOutSpeed,proto3" json:"radarOutSpeed,omitempty"` } func (x *TrainEndsStateMqtt) Reset() { @@ -2657,18 +2657,18 @@ func (x *TrainEndsStateMqtt) GetAccCheckTime() int32 { return 0 } -func (x *TrainEndsStateMqtt) GetAccOutSpeed() string { +func (x *TrainEndsStateMqtt) GetAccOutSpeed() int32 { if x != nil { return x.AccOutSpeed } - return "" + return 0 } -func (x *TrainEndsStateMqtt) GetRadarOutSpeed() string { +func (x *TrainEndsStateMqtt) GetRadarOutSpeed() int32 { if x != nil { return x.RadarOutSpeed } - return "" + return 0 } // 继电器状态 @@ -4378,9 +4378,9 @@ var file_device_state_proto_rawDesc = []byte{ 0x66, 0x12, 0x22, 0x0a, 0x0c, 0x61, 0x63, 0x63, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x61, 0x63, 0x63, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x61, 0x63, 0x63, 0x4f, 0x75, 0x74, 0x53, - 0x70, 0x65, 0x65, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x61, 0x63, 0x63, 0x4f, + 0x70, 0x65, 0x65, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x61, 0x63, 0x63, 0x4f, 0x75, 0x74, 0x53, 0x70, 0x65, 0x65, 0x64, 0x12, 0x24, 0x0a, 0x0d, 0x72, 0x61, 0x64, 0x61, 0x72, - 0x4f, 0x75, 0x74, 0x53, 0x70, 0x65, 0x65, 0x64, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, + 0x4f, 0x75, 0x74, 0x53, 0x70, 0x65, 0x65, 0x64, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0d, 0x72, 0x61, 0x64, 0x61, 0x72, 0x4f, 0x75, 0x74, 0x53, 0x70, 0x65, 0x65, 0x64, 0x22, 0x56, 0x0a, 0x0a, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x02, 0x69, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x78, diff --git a/rtss_simulation b/rtss_simulation index 7694e09..39be7b4 160000 --- a/rtss_simulation +++ b/rtss_simulation @@ -1 +1 @@ -Subproject commit 7694e092231530cbfa1d838902d802ca8c1de336 +Subproject commit 39be7b4bfa46b9bd23fbb1696e9cbf96dd138232