iscs ecs 调整

This commit is contained in:
xzb 2023-12-19 11:21:00 +08:00
parent dffafe98df
commit 08e4d2f8e2
2 changed files with 10 additions and 10 deletions

View File

@ -24,8 +24,8 @@ type SwitchThreePosition = uint8
const ( const (
StpOpened SwitchThreePosition = iota //开关分闸,线路断开,未与任何位置接通 StpOpened SwitchThreePosition = iota //开关分闸,线路断开,未与任何位置接通
StpClosedPosition1 //开关合闸到位置1与位置1线路导通 StpClosedWorking //隔离开关合闸
StpClosedPosition2 //开关合闸到位置2与位置2线路导通 StpClosedLanding //接地开关合闸
) )
///////////////////////// /////////////////////////

View File

@ -37,8 +37,8 @@ type SwitchThreePositionOptEnum = uint8
const ( const (
StpOpened SwitchThreePositionOptEnum = iota //开关分闸,线路断开,未与任何位置接通 StpOpened SwitchThreePositionOptEnum = iota //开关分闸,线路断开,未与任何位置接通
StpClosedPosition1 //开关合闸到位置1与位置1线路导通 StpClosedWorking //隔离开关合闸
StpClosedPosition2 //开关合闸到位置2与位置2线路导通 StpClosedLanding //接地开关合闸
) )
// ThreePositionSwitchOperate 三工位开关操作 // ThreePositionSwitchOperate 三工位开关操作
@ -54,10 +54,10 @@ func ThreePositionSwitchOperate(w ecs.World, deviceId string, opt SwitchThreePos
switch opt { switch opt {
case StpOpened: case StpOpened:
return component.StpOpened, nil return component.StpOpened, nil
case StpClosedPosition1: case StpClosedWorking:
return component.StpClosedPosition1, nil return component.StpClosedWorking, nil
case StpClosedPosition2: case StpClosedLanding:
return component.StpClosedPosition2, nil return component.StpClosedLanding, nil
default: default:
return component.StpOpened, fmt.Errorf("三工位开关操作[%d]不存在", opt) return component.StpOpened, fmt.Errorf("三工位开关操作[%d]不存在", opt)
} }