Skip to content

Commit

Permalink
Remove wait method
Browse files Browse the repository at this point in the history
  • Loading branch information
viggy96 committed Dec 13, 2023
1 parent 2e795dc commit 84ad4e5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
4 changes: 3 additions & 1 deletion src/main/java/org/lasarobotics/hardware/SparkMax.java
Original file line number Diff line number Diff line change
Expand Up @@ -599,7 +599,9 @@ public REVLibError restoreFactoryDefaults() {
* @return {@link REVLibError#kOk} if successful
*/
public REVLibError burnFlash() {
GlobalConstants.wait(0.5);
try { Thread.sleep(500); }
catch (InterruptedException e) { e.printStackTrace(); }

return m_spark.burnFlash();
}

Expand Down
6 changes: 0 additions & 6 deletions src/main/java/org/lasarobotics/utils/GlobalConstants.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,4 @@ public class GlobalConstants {
public static final Rotation2d ROTATION_ZERO = Rotation2d.fromRadians(0.0);
/** Pi radians rotation */
public static final Rotation2d ROTATION_PI = Rotation2d.fromRadians(Math.PI);

public static void wait(double seconds) {
long time = (long)seconds / 1000;
try { Thread.sleep(time); }
catch (InterruptedException e) { e.printStackTrace(); }
}
}

0 comments on commit 84ad4e5

Please sign in to comment.