This commit is contained in:
weizhihong 2023-11-06 14:30:16 +08:00
commit 479538f42b
4 changed files with 13 additions and 6 deletions

@ -1 +1 @@
Subproject commit 280219a91abaa9c58fd9979ad7340fe5d85caad1
Subproject commit ce7d7d49dc8e87dc93256eda90c0994105537421

View File

@ -2,7 +2,6 @@ package message_server
import (
"fmt"
"strconv"
"time"
"google.golang.org/protobuf/proto"
@ -113,7 +112,7 @@ func (ms *SfpMs) collectPsdStates() ([]*state.PsdState, error) {
for i, asdEntry := range list {
asdState := component.AsdStateType.Get(asdEntry)
asdStates[i] = &state.AsdState{
Code: strconv.Itoa(i + 1),
Code: int32(i + 1),
Kmdw: asdState.Kmdw,
Gmdw: asdState.Gmdw,
Mgj: asdState.Mgj,

@ -1 +1 @@
Subproject commit d080a2a1fc3224f1a9c1696d57dad95635523956
Subproject commit dfe96a977ccb283510934a15dfa0f3303620c278

View File

@ -4,6 +4,7 @@ import (
"fmt"
"joylink.club/bj-rtsts-server/dto/request_proto"
"joylink.club/bj-rtsts-server/ts/protos/graphicData"
"joylink.club/rtsssimulation/component/component_proto"
"joylink.club/rtsssimulation/fi"
)
@ -24,10 +25,17 @@ func HandlePsdOperation(simulation *VerifySimulation, req *request_proto.PsdOper
case request_proto.Psd_CancelGm:
return fi.CancelInterlockGm(simulation.World, uid)
case request_proto.Psd_ForceKm4:
case request_proto.Psd_ForceKm8:
case request_proto.Psd_ForceGm:
case request_proto.Psd_CancelForce:
case request_proto.Psd_AsdCannotClose:
return fi.SetPsdFault(simulation.World, uid, component_proto.Psd_AsdCannotClose, req.AsdCodes)
case request_proto.Psd_CancelAsdCannotClose:
return fi.CancelPsdFault(simulation.World, uid, component_proto.Psd_AsdCannotClose, req.AsdCodes)
case request_proto.Psd_AsdCannotOpen:
return fi.SetPsdFault(simulation.World, uid, component_proto.Psd_AsdCannotOpen, req.AsdCodes)
case request_proto.Psd_CancelAsdCannotOpen:
return fi.CancelPsdFault(simulation.World, uid, component_proto.Psd_AsdCannotOpen, req.AsdCodes)
default:
panic(fmt.Sprintf("未知的道岔操作:%s", req.Operation))
}