Skip to content

Commit

Permalink
stc: Fix controller status handling
Browse files Browse the repository at this point in the history
  • Loading branch information
DougLau committed Jan 14, 2025
1 parent 6a58ac9 commit acd3b1b
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* IRIS -- Intelligent Roadway Information System
* Copyright (C) 2013-2024 Minnesota Department of Transportation
* Copyright (C) 2013-2025 Minnesota Department of Transportation
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Expand Down Expand Up @@ -83,10 +83,13 @@ protected Phase<STCProperty> poll(CommMessage<STCProperty> mess)

/** Update gate/controller status */
private void updateStatus() {
if (!status.hasFaults())
if (status.hasFaults())
putCtrlFaults("other", status.getFaultStatus());
else {
putCtrlFaults(null, null);
gate_arm.setFaultNotify(null);
}
gate_arm.setArmStateNotify(status.getState(), null);
putCtrlFaults("other", status.getFaultStatus());
updateCtrlStatus();
if (shouldUpdateOpCount()) {
controller.completeOperation(id, isSuccess());
Expand Down

0 comments on commit acd3b1b

Please sign in to comment.