Skip to content

Commit

Permalink
Do not retry burn flash in simulation
Browse files Browse the repository at this point in the history
  • Loading branch information
viggy96 committed Dec 20, 2023
1 parent 1fe4cad commit 175871d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/main/java/org/lasarobotics/hardware/SparkMax.java
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
import edu.wpi.first.math.filter.Debouncer;
import edu.wpi.first.math.system.plant.DCMotor;
import edu.wpi.first.math.trajectory.TrapezoidProfile;
import edu.wpi.first.wpilibj.RobotBase;
import edu.wpi.first.wpilibj.Timer;

/** REV Spark Max */
Expand Down Expand Up @@ -304,6 +305,8 @@ private REVLibError burnFlash(BooleanSupplier parameterCheckSupplier) {
* @return {@link REVLibError#kOk} if successful
*/
public REVLibError burnFlash() {
if (RobotBase.isSimulation()) return REVLibError.kOk;

Timer.delay(0.5);
REVLibError status = m_spark.burnFlash();
Timer.delay(0.5);
Expand Down

0 comments on commit 175871d

Please sign in to comment.