mirror of
https://github.com/Team254/cheesy-arena-lite.git
synced 2026-03-09 21:56:50 -04:00
Add Plc.IsEnabled() method and refactor places that were checking settings directly to use it instead.
This commit is contained in:
@@ -647,7 +647,7 @@ func (arena *Arena) checkCanStartMatch() error {
|
||||
return err
|
||||
}
|
||||
|
||||
if arena.EventSettings.PlcAddress != "" {
|
||||
if arena.Plc.IsEnabled() {
|
||||
if !arena.Plc.IsHealthy {
|
||||
return fmt.Errorf("Cannot start match while PLC is not healthy.")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user