【半实物消息解析修改】

This commit is contained in:
weizhihong 2023-10-25 11:03:19 +08:00
parent ce657e262a
commit f8dba22a23
3 changed files with 3 additions and 3 deletions

View File

@ -23,7 +23,7 @@ interlock:
ip: 10.60.1.59 ip: 10.60.1.59
localPort: 10000 localPort: 10000
remotePort: 4000 remotePort: 4000
open: true open: false
# 数据源 # 数据源
datasource: datasource:

View File

@ -23,7 +23,7 @@ interlock:
ip: 10.60.1.59 ip: 10.60.1.59
localPort: 10000 localPort: 10000
remotePort: 4000 remotePort: 4000
open: true open: false
# 数据源 # 数据源
datasource: datasource:

View File

@ -25,7 +25,7 @@ func (r *TrainControlMsg) Decode(buf []byte) error {
t.TractionStatus = (b2 & (1 << 4)) != 0 t.TractionStatus = (b2 & (1 << 4)) != 0
t.BrakingStatus = (b2 & (1 << 5)) != 0 t.BrakingStatus = (b2 & (1 << 5)) != 0
t.EmergencyBrakingStatus = (b2 & (1 << 6)) != 0 t.EmergencyBrakingStatus = (b2 & (1 << 6)) != 0
t.TurnbackStatus = (b2 & 7) != 0 t.TurnbackStatus = (b2 & (1 << 7)) != 0
b3 := buf[3] b3 := buf[3]
t.JumpStatus = (b3 & 1) != 0 t.JumpStatus = (b3 & 1) != 0
t.Ato = (b3 & (1 << 1)) != 0 t.Ato = (b3 & (1 << 1)) != 0