Add ethernet connected, trip time, missed packets, and tooltips to the field monitor (closes #63).

This commit is contained in:
Patrick Fairbank
2020-03-31 20:04:42 -07:00
parent a5a7821b3f
commit 30b0679b6e
5 changed files with 47 additions and 13 deletions

View File

@@ -159,6 +159,20 @@ func (plc *Plc) GetTeamEstops() ([3]bool, [3]bool) {
return redEstops, blueEstops
}
// Returns whether anything is connected to each station's designated Ethernet port on the SCC.
func (plc *Plc) GetEthernetConnected() ([3]bool, [3]bool) {
return [3]bool{
plc.inputs[redConnected1],
plc.inputs[redConnected2],
plc.inputs[redConnected3],
},
[3]bool{
plc.inputs[blueConnected1],
plc.inputs[blueConnected2],
plc.inputs[blueConnected3],
}
}
// 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