Skip to content

Commit

Permalink
Quell a warning. Keep a handle on our notifier.
Browse files Browse the repository at this point in the history
plugged resource leak for Closeable.
  • Loading branch information
dbadb committed Feb 28, 2020
1 parent 6e617fe commit 8c846e3
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ public class RobotStateEstimator extends SpartronicsSubsystem
private T265Camera mSLAMCamera;
private final VisionEvent mVisionEventListener;
private DrivetrainEstimator mEKF;
private Notifier mNotifier;

private final EstimatorSource mBestEstimatorSource;

Expand Down Expand Up @@ -97,7 +98,8 @@ else if (mBestEstimatorSource == EstimatorSource.Fused)
}

// Run this at 100 Hz
new Notifier(this::run).startPeriodic(1 / 100.0);
this.mNotifier = new Notifier(this::run);
this.mNotifier.startPeriodic(1 / 100.0);
}

public VisionEvent getVisionListener()
Expand Down

0 comments on commit 8c846e3

Please sign in to comment.