rts-sim-testing-service/ts/simulation/wayside/memory/wayside_memory_psl.go
2023-10-26 17:16:07 +08:00

17 lines
429 B
Go

package memory
import (
"joylink.club/rtsssimulation/fi"
)
// 操作IBP按钮
func ChangePSLButtonState(sim *VerifySimulation, mapId int32, gateBoxId, btnCode string, pressDown bool) {
uid := queryUidStructure[*stationUidStructure](mapId)
gateBoxUid := uid.GateBoxIds[gateBoxId].Uid
if pressDown {
fi.PressDownButton(sim.World, gateBoxUid+"_"+btnCode)
} else {
fi.PressUpButton(sim.World, gateBoxUid+"_"+btnCode)
}
}