<commit_before>package edu.flash3388.flashlib.robot.frc;

import edu.flash3388.flashlib.robot.scheduling.Scheduler;
import edu.flash3388.flashlib.robot.scheduling.SchedulerRunMode;
import edu.wpi.first.wpilibj.hal.HAL;
import edu.wpi.first.wpilibj.livewindow.LiveWindow;

public abstract class FRCIterativeRobot extends FRCRobotBase {

    private Scheduler mScheduler;

    private boolean mIsDisabledInitialized;
    private boolean mIsTeleopInitialized;
    private boolean mIsAutonomousInitialized;
    private boolean mIsTestInitialized;

    public FRCIterativeRobot() {
        mScheduler = Scheduler.getInstance();
        resetInitializationIndicators();
    }

    @Override
    public void startCompetition() {
        HAL.report(22, 1); // TODO: FIND CONSTANTS FOR THE RESOURCE TYPE

        HAL.observeUserProgramStarting();
        robotInit();

        LiveWindow.setEnabled(false);

        robotLoop();
    }

    private void robotLoop() {
        while (true) {
            m_ds.waitForData();

            if (isDisabled()) {
                if (!mIsDisabledInitialized) {
                    resetInitializationIndicators();
                    resetScheduler(SchedulerRunMode.TASKS_ONLY);
                    LiveWindow.setEnabled(false);

                    disabledInit();

                    mIsDisabledInitialized = true;
                }

                HAL.observeUserProgramDisabled();<commit_msg>frc hal report found constants<commit_after>package edu.flash3388.flashlib.robot.frc;

import edu.flash3388.flashlib.robot.scheduling.Scheduler;
import edu.flash3388.flashlib.robot.scheduling.SchedulerRunMode;
import edu.wpi.first.wpilibj.hal.FRCNetComm;
import edu.wpi.first.wpilibj.hal.HAL;
import edu.wpi.first.wpilibj.livewindow.LiveWindow;

public abstract class FRCIterativeRobot extends FRCRobotBase {

    private Scheduler mScheduler;

    private boolean mIsDisabledInitialized;
    private boolean mIsTeleopInitialized;
    private boolean mIsAutonomousInitialized;
    private boolean mIsTestInitialized;

    public FRCIterativeRobot() {
        mScheduler = Scheduler.getInstance();
        resetInitializationIndicators();
    }

    @Override
    public void startCompetition() {
        HAL.report(FRCNetComm.tResourceType.kResourceType_Framework, FRCNetComm.tInstances.kFramework_Iterative); // TODO: FIND CONSTANTS FOR THE RESOURCE TYPE

        HAL.observeUserProgramStarting();
        robotInit();

        LiveWindow.setEnabled(false);

        robotLoop();
    }

    private void robotLoop() {
        while (true) {
            m_ds.waitForData();

            if (isDisabled()) {
                if (!mIsDisabledInitialized) {
                    resetInitializationIndicators();
                    resetScheduler(SchedulerRunMode.TASKS_ONLY);
                    LiveWindow.setEnabled(false);

                    disabledInit();

                    mIsDisabledInitialized = true;
                }

                HAL.observeUserProgramDisabled();
{'fraction_non_alphanumeric': 0.08109006314390163, 'fraction_numerical': 0.00897308075772682, 'mean_word_length': 2.6004784688995217, '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': '1089490', 'n_tokens_mistral': 885, 'n_tokens_neox': 834, 'n_words': 145}