Implement PLC-driven field reset light.

This commit is contained in:
Patrick Fairbank
2019-08-08 22:03:13 -07:00
parent a603840b0d
commit 5b66b5856d
2 changed files with 10 additions and 22 deletions

View File

@@ -177,6 +177,10 @@ func (plc *Plc) SetStackBuzzer(state bool) {
plc.coils[stackLightBuzzer] = state
}
func (plc *Plc) SetFieldResetLight(state bool) {
plc.coils[fieldResetLight] = state
}
func (plc *Plc) GetCycleState(max, index, duration int) bool {
return plc.cycleCounter/duration%max == index
}