| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- package ids
- const (
- Fan1 = "fan.chamber.1"
- Fan2 = "fan.chamber.2"
- Fan3 = "fan.chamber.3"
- Fan4 = "fan.chamber.4"
- PTC1 = "ptc.chamber.1"
- PTC2 = "ptc.chamber.2"
- PTC3 = "ptc.chamber.3"
- PTC4 = "ptc.chamber.4"
- DoorX = "door.x.close_percent"
- DoorY = "door.y.close_percent"
- DoorZ = "door.z.close_percent"
- DoorXEst = "door.x.estimated_close_percent"
- DoorYEst = "door.y.estimated_close_percent"
- DoorZEst = "door.z.estimated_close_percent"
- DoorXOpenLimit = "door.x.open_limit"
- DoorYOpenLimit = "door.y.open_limit"
- DoorZOpenLimit = "door.z.open_limit"
- DoorXCloseLimit = "door.x.close_limit"
- DoorYCloseLimit = "door.y.close_limit"
- DoorZCloseLimit = "door.z.close_limit"
- )
- func TempChannel(i int) string {
- return "temperature.channel." + twoDigit(i)
- }
- func twoDigit(i int) string {
- if i < 0 {
- i = 0
- }
- if i > 99 {
- i = 99
- }
- return string([]byte{'0' + byte(i/10), '0' + byte(i%10)})
- }
- func IsDoor(id string) bool {
- return id == DoorX || id == DoorY || id == DoorZ
- }
- func IsFan(id string) bool {
- return id == Fan1 || id == Fan2 || id == Fan3 || id == Fan4
- }
- func IsPTC(id string) bool {
- return id == PTC1 || id == PTC2 || id == PTC3 || id == PTC4
- }
|