001/************************ PROJECT ZIXI ************************/ 002/* Copyright (c) 2026 StuyPulse Robotics. All rights reserved.*/ 003/* This work is licensed under the terms of the MIT license. */ 004/**************************************************************/ 005package com.stuypulse.robot.constants; 006 007import static org.wpilib.units.Units.*; 008 009import org.wpilib.framework.RobotBase; 010import org.wpilib.units.measure.*; 011 012import org.littletonrobotics.junction.networktables.LoggedNetworkBoolean; 013 014/** File containing non-subsystem settings for the robot. */ 015public interface GlobalSettings { 016 Time DT = Milliseconds.of(20); 017 018 /** 019 * Uses a {@link LoggedNetworkBoolean} for each subsystem to add subsystem toggling 020 * functionality from external dashboards. 021 */ 022 interface EnabledSubsystems { 023 LoggedNetworkBoolean SWERVE = 024 new LoggedNetworkBoolean("/Tuning/Enabled Subsystems/Swerve", true); 025 LoggedNetworkBoolean VISION = 026 new LoggedNetworkBoolean("/Tuning/Enabled Subsystems/Vision", true); 027 } 028 029 /** What mode the robot is in when running a simulation. */ 030 RobotMode SIM_MODE = RobotMode.SIM; 031 032 RobotMode CURRENT_MODE = RobotBase.isReal() ? RobotMode.REAL : SIM_MODE; 033 034 enum RobotMode { 035 /** Running on a real robot. */ 036 REAL, 037 038 /** Running in simulation. */ 039 SIM, 040 041 /** Replaying from a log file. */ 042 REPLAY 043 } 044}