Skip to content

Commit

Permalink
Merge pull request #88 from fransjacobs/78-after-a-layout-change-the-…
Browse files Browse the repository at this point in the history
…autolink-between-block-and-sensor-needs-restart-of-jcs

Update StateMachineThreadTest.java
  • Loading branch information
fransjacobs authored Sep 14, 2024
2 parents 22fdb56 + 5ab689b commit 3b67684
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -201,15 +201,16 @@ private void toggleSensorDirect(SensorBean sensorBean) {
sensorBean.setActive((sensorBean.getStatus() == 1));
SensorEvent sensorEvent = new SensorEvent(sensorBean);
fireFeedbackEvent(sensorEvent);
synchronized (this) {
notifyAll();
}
}

private void fireFeedbackEvent(SensorEvent sensorEvent) {
List<FeedbackController> acl = JCS.getJcsCommandStation().getFeedbackControllers();
for (FeedbackController fbc : acl) {
fbc.fireSensorEventListeners(sensorEvent);

synchronized (this) {
notifyAll();
}
}
}

Expand Down Expand Up @@ -268,7 +269,6 @@ public void testBk1ToBk4() {
assertTrue(AutoPilot.isOnTrack(dhg));

assertTrue(AutoPilot.isAutoModeActive());

AutoPilot.startAutoMode();

long now = System.currentTimeMillis();
Expand Down

0 comments on commit 3b67684

Please sign in to comment.