Skip to content

Commit

Permalink
decent changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Ishan1522 committed Jul 26, 2024
1 parent 52ee586 commit dcbf92d
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -284,9 +284,9 @@ public void checkAndUpdatePose(int limelightNumber) {
double last_TY = 0;

// Syncronization block to ensure thread safety during the critical section where pose information is read and compared.
// This helps prevents race conditions, where one limelight may be updating an object that another limelight is reading.
// A race condition could cause unpredictable things to happen. Such as causing a limelight to be unable to refrence an
// object, as it's refrence was modified earlier.
// This helps prevent race conditions, where one limelight may be updating an object that another limelight is reading.
// A race condition could cause unpredictable things to happen. Such as causing a limelight to be unable to reference an
// object, as its reference was modified earlier.
synchronized (this) {
try {
double current_TX = LimelightHelpers.getTX(getLimelightName(limelightNumber));
Expand Down

0 comments on commit dcbf92d

Please sign in to comment.