Implement PLC integration for the shield generator rung.

This commit is contained in:
Patrick Fairbank
2020-04-04 21:49:17 -07:00
parent 7f6277d42b
commit ae4b03dfbc
5 changed files with 45 additions and 5 deletions

View File

@@ -230,6 +230,11 @@ func (plc *Plc) GetControlPanels() (game.ControlPanelColor, int, game.ControlPan
game.ControlPanelColor(plc.registers[blueControlPanelColor]), int(plc.registers[blueControlPanelSegments])
}
// Returns whether each of the red and blue rungs is level.
func (plc *Plc) GetRungs() (bool, bool) {
return plc.inputs[redRungIsLevel], plc.inputs[blueRungIsLevel]
}
// Set the on/off state of the stack lights on the scoring table.
func (plc *Plc) SetStackLights(red, blue, orange, green bool) {
plc.coils[stackLightRed] = red