Skip to content

Move fastPeriodic body to separate method #12

@haydenheroux

Description

@haydenheroux

If, for whatever reason, fastPeriodic needs to be disabled, changing when/where the work is performed should be a very minor change.

Currently, fastPeriodic does work.

void fastPeriodic() {
    // Do work...
}

Instead, a separate function should do work, and fastPeriodic calls out to that function to perform work.

void fastPeriodic() {
    doWork();
}

void doWork() {
    // Do work...
}

Then, if fastPeriodic is disabled, the work can be performed in periodic instead.

void periodic() {
    doWork();
}

void doWork() {
    // Do work...
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    good first issueGood for newcomersrefactorCode reorganization and maintenance

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status
    Ideas

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions