Skip to content

Don't use boolean to store coral switch state #12

@ArchdukeTim

Description

@ArchdukeTim
public Boolean getHasCoral() {
    return hasCoral;
  }

  @Override
  public void periodic() {
    if (coralSwitch.get()) {
      hasCoral = true;
    } else {
      hasCoral = false;
    }
  }

hasCoral serves no real purpose here. It's just a proxy for reading the switch. getHasCoral (which could just be named hasCoral) should return the value of the switch directly

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions