<commit_before>/**
 * Created by github.com/josephmjoy (mentor for FTC#12598 & FRC#1899) on 9/30/2017.
 */
package gjb.experimental;

import com.qualcomm.robotcore.eventloop.opmode.OpMode;
import com.qualcomm.robotcore.eventloop.opmode.TeleOp;

import gjb.interfaces.LoggingInterface;
import gjb.interfaces.RuntimeSupportInterface;
import gjb.utils.AndroidRuntimeSupport;

@TeleOp(name="DOpMode_FullMelonBotMec", group="Pushbot")
//@Disabled
/*
 *  This Driver Controlled OpMode does controls the wheels of the pushbot.
 */
public class DOpMode_FullMelonBotMec extends OpMode{
    final String THIS_COMPONENT = "DOM_FullMelonBotMec";
    private final RuntimeSupportInterface rt = new AndroidRuntimeSupport(this);

    // These are initialized during
    private  SubSysMecDrive drive;
    private SubSysLift lift;
    private ITask_simpleDriveMec driveTask;
    private ITask_LiftWLimitSwitches liftTask;
    private ITask_BigGulpServo biggulpTask;
    //private ITask_TwoPartArm armTask;
    private LoggingInterface log;

    /*************** START OF OPMODE INTERFACE METHODS **********************/

    @Override
    public void init() {
        log = rt.startLogging(DOpMode_FullMelonBotMec.class.toString());
        log.pri1(LoggingInterface.INIT_START, THIS_COMPONENT);

        //configure the motors
        SubSysMecDrive.Config driveConfig = new SubSysMecDrive.Config();
        driveConfig.leftMotorName("left_drive");
        driveConfig.rightMotorName("right_drive");
        driveConfig.fleftMotorName("fleft_drive");
        driveConfig.frightMotorName("fright_drive");


        drive = new SubSysMecDrive(rt, driveConfig);
        driveTask = new ITask_simpleDriveMec(rt, drive);
        lift = new SubSysLift(rt);
        liftTask = new ITask_LiftWLimitSwitches(rt, lift);
        biggulpTask = new ITask_BigGulpServo(rt, lift);
        // Initialize the subsystem and associated task
        drive.init();
        driveTask.init();
        lift.init();
        liftTask.init();
        biggulpTask.init();
       // armTask.init();
        log.pri1(LoggingInterface.INIT_END, THIS_COMPONENT);
    }


    @Override
    public void init_loop() {
        driveTask.init_loop();
        liftTask.init_loop();
        biggulpTask.init_loop();
        //armTask.init_loop();
    }


    @Override
    public void start() {
        driveTask.start();
        liftTask.start();
        biggulpTask.start();
        //armTask.start();
    }

    @Override
    public void loop() {
        driveTask.loop();
        liftTask.loop();
        biggulpTask.loop();
        //armTask.loop();
    }

    @Override
    public void stop() {
        driveTask.stop();
        liftTask.stop();
        biggulpTask.stop();
        //armTask.stop();
        rt.stopLogging();
    }

    /*************** END OF OPMODE INTERFACE METHODS ************************/
}<commit_msg>integration of two part arm task in full Melon Bot Mec Aparna<commit_after>/**
 * Created by github.com/josephmjoy (mentor for FTC#12598 & FRC#1899) on 9/30/2017.
 */
package gjb.experimental;

import com.qualcomm.robotcore.eventloop.opmode.OpMode;
import com.qualcomm.robotcore.eventloop.opmode.TeleOp;

import gjb.interfaces.LoggingInterface;
import gjb.interfaces.RuntimeSupportInterface;
import gjb.utils.AndroidRuntimeSupport;

@TeleOp(name="DOpMode_FullMelonBotMec", group="Pushbot")
//@Disabled
/*
 *  This Driver Controlled OpMode does controls the wheels of the pushbot.
 */
public class DOpMode_FullMelonBotMec extends OpMode{
    final String THIS_COMPONENT = "DOM_FullMelonBotMec";
    private final RuntimeSupportInterface rt = new AndroidRuntimeSupport(this);

    // These are initialized during
    private  SubSysMecDrive drive;
    private SubSysLift lift;
    private SubSysIntake intake;
    private ITask_simpleDriveMec driveTask;
    private ITask_LiftWLimitSwitches liftTask;
    private ITask_TwoPartArm armTask;

    //private ITask_TwoPartArm armTask;
    private LoggingInterface log;

    /*************** START OF OPMODE INTERFACE METHODS **********************/

    @Override
    public void init() {
        log = rt.startLogging(DOpMode_FullMelonBotMec.class.toString());
        log.pri1(LoggingInterface.INIT_START, THIS_COMPONENT);

        //configure the motors
        SubSysMecDrive.Config driveConfig = new SubSysMecDrive.Config();
        driveConfig.leftMotorName("left_drive");
        driveConfig.rightMotorName("right_drive");
        driveConfig.fleftMotorName("fleft_drive");
        driveConfig.frightMotorName("fright_drive");


        drive = new SubSysMecDrive(rt, driveConfig);
        driveTask = new ITask_simpleDriveMec(rt, drive);
        lift = new SubSysLift(rt);
        intake = new SubSysIntake(rt);
        liftTask = new ITask_LiftWLimitSwitches(rt, lift);
        armTask = new ITask_TwoPartArm(rt, intake, lift);
        // Initialize the subsystem and associated task
        drive.init();
        driveTask.init();
        lift.init();
        liftTask.init();
        intake.init();
        armTask.init();
       // armTask.init();
        log.pri1(LoggingInterface.INIT_END, THIS_COMPONENT);
    }


    @Override
    public void init_loop() {
        driveTask.init_loop();
        liftTask.init_loop();
        armTask.init_loop();
        //armTask.init_loop();
    }


    @Override
    public void start() {
        driveTask.start();
        liftTask.start();
        armTask.start();
        //armTask.start();
    }

    @Override
    public void loop() {
        driveTask.loop();
        liftTask.loop();
        armTask.loop();
        //armTask.loop();
    }

    @Override
    public void stop() {
        driveTask.stop();
        liftTask.stop();
        armTask.stop();
        //armTask.stop();
        rt.stopLogging();
    }

    /*************** END OF OPMODE INTERFACE METHODS ************************/
}
{'fraction_non_alphanumeric': 0.12700034048348655, 'fraction_numerical': 0.006128702757916241, 'mean_word_length': 2.9456010745466754, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4265744', 'n_tokens_mistral': 1872, 'n_tokens_neox': 1751, 'n_words': 361}