rts-sim-testing-service/ts/simulation/wayside/memory/wayside_memory_relay.go
weizhihong 172f65b14c 【删除废弃文件夹中代码】
【调整消息服务代码】
【删除多余代码】
【调整方法、结构体名称】
2023-10-27 14:57:37 +08:00

17 lines
378 B
Go

package memory
import (
"joylink.club/bj-rtsts-server/ts/protos/graphicData"
"joylink.club/rtsssimulation/fi"
)
// 继电器操作方法
func ChangeRelayState(sim *VerifySimulation, mapId int32, id string, td bool) {
uid := QueryUidByMidAndComId(mapId, id, &graphicData.Relay{})
if td {
fi.DriveRelayUp(sim.World, uid)
} else {
fi.DriveRelayDown(sim.World, uid)
}
}