Update PLC inputs/registers/coils for 2020.

This commit is contained in:
Patrick Fairbank
2020-04-04 14:38:57 -07:00
parent 636d2c0927
commit a6109a978a
4 changed files with 85 additions and 13 deletions

View File

@@ -1,4 +1,4 @@
// Code generated by "stringer -type=coil"; DO NOT EDIT.
// Code generated by "stringer -type coil"; DO NOT EDIT.
package plc
@@ -16,12 +16,23 @@ func _() {
_ = x[stackLightBlue-5]
_ = x[stackLightBuzzer-6]
_ = x[fieldResetLight-7]
_ = x[coilCount-8]
_ = x[powerPortMotors-8]
_ = x[redStage1Light-9]
_ = x[redStage2Light-10]
_ = x[redStage3Light-11]
_ = x[blueStage1Light-12]
_ = x[blueStage2Light-13]
_ = x[blueStage3Light-14]
_ = x[redTrussLight-15]
_ = x[blueTrussLight-16]
_ = x[redControlPanelLight-17]
_ = x[blueControlPanelLight-18]
_ = x[coilCount-19]
}
const _coil_name = "heartbeatmatchResetstackLightGreenstackLightOrangestackLightRedstackLightBluestackLightBuzzerfieldResetLightcoilCount"
const _coil_name = "heartbeatmatchResetstackLightGreenstackLightOrangestackLightRedstackLightBluestackLightBuzzerfieldResetLightpowerPortMotorsredStage1LightredStage2LightredStage3LightblueStage1LightblueStage2LightblueStage3LightredTrussLightblueTrussLightredControlPanelLightblueControlPanelLightcoilCount"
var _coil_index = [...]uint8{0, 9, 19, 34, 50, 63, 77, 93, 108, 117}
var _coil_index = [...]uint16{0, 9, 19, 34, 50, 63, 77, 93, 108, 123, 137, 151, 165, 180, 195, 210, 223, 237, 257, 278, 287}
func (i coil) String() string {
if i < 0 || i >= coil(len(_coil_index)-1) {

View File

@@ -1,4 +1,4 @@
// Code generated by "stringer -type=input"; DO NOT EDIT.
// Code generated by "stringer -type input"; DO NOT EDIT.
package plc
@@ -21,12 +21,16 @@ func _() {
_ = x[blueConnected1-10]
_ = x[blueConnected2-11]
_ = x[blueConnected3-12]
_ = x[inputCount-13]
_ = x[redRungIsLevel-13]
_ = x[blueRungIsLevel-14]
_ = x[redPowerPortJam-15]
_ = x[bluePowerPortJam-16]
_ = x[inputCount-17]
}
const _input_name = "fieldEstopredEstop1redEstop2redEstop3blueEstop1blueEstop2blueEstop3redConnected1redConnected2redConnected3blueConnected1blueConnected2blueConnected3inputCount"
const _input_name = "fieldEstopredEstop1redEstop2redEstop3blueEstop1blueEstop2blueEstop3redConnected1redConnected2redConnected3blueConnected1blueConnected2blueConnected3redRungIsLevelblueRungIsLevelredPowerPortJambluePowerPortJaminputCount"
var _input_index = [...]uint8{0, 10, 19, 28, 37, 47, 57, 67, 80, 93, 106, 120, 134, 148, 158}
var _input_index = [...]uint8{0, 10, 19, 28, 37, 47, 57, 67, 80, 93, 106, 120, 134, 148, 162, 177, 192, 208, 218}
func (i input) String() string {
if i < 0 || i >= input(len(_input_index)-1) {

View File

@@ -52,6 +52,10 @@ const (
blueConnected1
blueConnected2
blueConnected3
redRungIsLevel
blueRungIsLevel
redPowerPortJam
bluePowerPortJam
inputCount
)
@@ -59,7 +63,28 @@ const (
type register int
const (
registerCount register = iota
fieldIoConnection register = iota
redPowerPortBottom
redPowerPortOuter
redPowerPortInner
bluePowerPortBottom
bluePowerPortOuter
bluePowerPortInner
redControlPanelRed
redControlPanelGreen
redControlPanelBlue
redControlPanelIntensity
blueControlPanelRed
blueControlPanelGreen
blueControlPanelBlue
blueControlPanelIntensity
redControlPanelColor
blueControlPanelColor
redControlPanelLastColor
blueControlPanelLastColor
redControlPanelSegments
blueControlPanelSegments
registerCount
)
// Coils
@@ -74,6 +99,17 @@ const (
stackLightBlue
stackLightBuzzer
fieldResetLight
powerPortMotors
redStage1Light
redStage2Light
redStage3Light
blueStage1Light
blueStage2Light
blueStage3Light
redTrussLight
blueTrussLight
redControlPanelLight
blueControlPanelLight
coilCount
)

View File

@@ -1,4 +1,4 @@
// Code generated by "stringer -type=register"; DO NOT EDIT.
// Code generated by "stringer -type register"; DO NOT EDIT.
package plc
@@ -8,12 +8,33 @@ func _() {
// An "invalid array index" compiler error signifies that the constant values have changed.
// Re-run the stringer command to generate them again.
var x [1]struct{}
_ = x[registerCount-0]
_ = x[fieldIoConnection-0]
_ = x[redPowerPortBottom-1]
_ = x[redPowerPortOuter-2]
_ = x[redPowerPortInner-3]
_ = x[bluePowerPortBottom-4]
_ = x[bluePowerPortOuter-5]
_ = x[bluePowerPortInner-6]
_ = x[redControlPanelRed-7]
_ = x[redControlPanelGreen-8]
_ = x[redControlPanelBlue-9]
_ = x[redControlPanelIntensity-10]
_ = x[blueControlPanelRed-11]
_ = x[blueControlPanelGreen-12]
_ = x[blueControlPanelBlue-13]
_ = x[blueControlPanelIntensity-14]
_ = x[redControlPanelColor-15]
_ = x[blueControlPanelColor-16]
_ = x[redControlPanelLastColor-17]
_ = x[blueControlPanelLastColor-18]
_ = x[redControlPanelSegments-19]
_ = x[blueControlPanelSegments-20]
_ = x[registerCount-21]
}
const _register_name = "registerCount"
const _register_name = "fieldIoConnectionredPowerPortBottomredPowerPortOuterredPowerPortInnerbluePowerPortBottombluePowerPortOuterbluePowerPortInnerredControlPanelRedredControlPanelGreenredControlPanelBlueredControlPanelIntensityblueControlPanelRedblueControlPanelGreenblueControlPanelBlueblueControlPanelIntensityredControlPanelColorblueControlPanelColorredControlPanelLastColorblueControlPanelLastColorredControlPanelSegmentsblueControlPanelSegmentsregisterCount"
var _register_index = [...]uint8{0, 13}
var _register_index = [...]uint16{0, 17, 35, 52, 69, 88, 106, 124, 142, 162, 181, 205, 224, 245, 265, 290, 310, 331, 355, 380, 403, 427, 440}
func (i register) String() string {
if i < 0 || i >= register(len(_register_index)-1) {