Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Overview of programming season #1

Closed
pi-this opened this issue Nov 6, 2023 · 1 comment
Closed

Overview of programming season #1

pi-this opened this issue Nov 6, 2023 · 1 comment
Assignees
Labels
Autonomous Autonomous improvements description New comments or .md files have been added enum New Enum added First Tech Challenge This is FTC team Tobor's 2023-2024 Game Season code good first issue Good for newcomers organization Added more organization to the code TeleOp TeleOp improvements

Comments

@pi-this
Copy link
Member

pi-this commented Nov 6, 2023

Greetings, and welcome to this year's FTC game season, Center Stage. It is always advisable to organize your code and add various commenting techniques. This year, Tobor has introduced an operations folder that contains all the operations for the entire season. Outside the operations folder are the Autonomous and TeleOp project files, which are Java projects that can be selected within the driver station. Any files within the team code and outside the operations folder can be run as TeleOp or Autonomous from the driver station. Team Tobor is excited to experiment with this new coding technique of operational organization. We are thrilled to undertake adventures into editing, experimenting, and exploring new ways to improve the code for this year's season, Center Stage. So, with that said, Tobor hopes all the FTC teams around the world will have a wonderful experience and says, “You are going to do great!”

A new form of organization that I like to call operational organization was added to the team code:
https://github.com/535tobor/2023-2024SeasonCode/tree/master/TeamCode/src/main/java/org/firstinspires/ftc/teamcode/operations

Tobor's tensor flow model has been added to the code for use in Autonomous:
https://github.com/535tobor/2023-2024SeasonCode/tree/master/FtcRobotController/src/main/assets

Various Enums have been added to the code for organization:

package org.firstinspires.ftc.teamcode.operations;

public enum Wheels {
    FRONT_LEFT("fl"),
    FRONT_RIGHT("fr"),
    BACK_LEFT("bl"),
    BACK_RIGHT("br");

    private final String name;

    Wheels(final String name) {this.name = name;}

    public String abbreviation() {
        return name;
    }
}

An interface was added to the operational organization of the code for higher performance:

// public is not needed, because Interface has public by default
package org.firstinspires.ftc.teamcode.operations;

 interface TargetSetup {
     /*
     this interface was made so that
     both LinearOpMode and OpMode can be
     ran within the same class
      */
     void runInit();
     void runInitLoop();
     void runStart();
     void runLoop();
     void runStop();
}

In Operational Organization the code has a target operations file. In this setup, any file that is called 'Target' at the beginning of the name means that the file is the head class of that folder. For example, the head class of the folder operations is the
'TargetOperations' file, shown below:

package org.firstinspires.ftc.teamcode.operations;

import com.qualcomm.robotcore.eventloop.opmode.LinearOpMode;

public abstract class TargetOperations extends LinearOpMode implements TargetSetup {

    public static boolean pixelMotorConfig = false;
    public static boolean barMotorConfig = false;

    public void stopAll() {
        requestOpModeStop();
    }

}

By using 'TargetOperations' as the head operations class, I can extend the class in my TeleOp project like so:

public class GameCode extends TargetOperations
@pi-this pi-this added good first issue Good for newcomers First Tech Challenge This is FTC team Tobor's 2023-2024 Game Season code organization Added more organization to the code TeleOp TeleOp improvements Autonomous Autonomous improvements enum New Enum added description New comments or .md files have been added labels Nov 6, 2023
@535tobor 535tobor reopened this Nov 18, 2023
@535tobor 535tobor pinned this issue Nov 18, 2023
@535tobor 535tobor reopened this Nov 18, 2023
@535tobor
Copy link
Collaborator

535tobor commented Jan 26, 2024

Check out the Tobor Programming website for Center Stage at https://535tobor.github.io/CenterStage. This website includes information about the programming for this season.

@535tobor 535tobor removed their assignment Aug 16, 2024
@pi-this pi-this closed this as completed Sep 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Autonomous Autonomous improvements description New comments or .md files have been added enum New Enum added First Tech Challenge This is FTC team Tobor's 2023-2024 Game Season code good first issue Good for newcomers organization Added more organization to the code TeleOp TeleOp improvements
Projects
None yet
Development

No branches or pull requests

1 participant