src/main/java/frc/robot/commands/spinner/Spin360.java
// Called every time the scheduler runs while the command is scheduled.
Called every time the scheduler runs while the command is scheduled.
Called every time the scheduler runs while the command is scheduled .
@Override
  public void execute() {
    String currentColor = spinner.getColor();
    if (currentColor != lastColor) {
      lastColor = currentColor;
      if (currentColor == targetColor) {
        spinCount += 1;
      }
    }
    SmartDashboard.putNumber("spinCount", spinCount);
    SmartDashboard.putString("Color:", currentColor);
    spinner.spinClockwise();
  }
@ Override public void execute ( ) { String currentColor = spinner . getColor ( ) ; if ( currentColor != lastColor ) { lastColor = currentColor ; if ( currentColor == targetColor ) { spinCount += 1 ; } } SmartDashboard . putNumber ( "spinCount" , spinCount ) ; SmartDashboard . putString ( "Color:" , currentColor ) ; spinner . spinClockwise ( ) ; }
Called every time the scheduler runs while the command is scheduled.
Called every time the scheduler runs while the command is scheduled .