setup OOP structure for season
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
package org.firstinspires.ftc.teamcode;
|
||||
|
||||
import com.qualcomm.robotcore.hardware.HardwareMap;
|
||||
|
||||
import org.firstinspires.ftc.teamcode.hardware.RobotHardware;
|
||||
|
||||
/**
|
||||
* Represents and initializes the complete robot object with subsystems.
|
||||
*/
|
||||
public class Robot {
|
||||
|
||||
public final RobotHardware robotHardware;
|
||||
|
||||
// Declare other public final subsystems here
|
||||
|
||||
public Robot(HardwareMap map) {
|
||||
|
||||
robotHardware = new RobotHardware(map);
|
||||
|
||||
// Initialize other subsystems using robotHardware reference
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
package org.firstinspires.ftc.teamcode.hardware;
|
||||
|
||||
import com.qualcomm.robotcore.hardware.HardwareMap;
|
||||
|
||||
/**
|
||||
* Initializes and provides access to all the robot's hardware components
|
||||
*/
|
||||
public final class RobotHardware {
|
||||
|
||||
// Declare public final motors, servos, etc.
|
||||
public RobotHardware(HardwareMap map) {
|
||||
// Initialize motors, servos, etc.
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user