It Builds(sort of)

I fixed it to now build but to make it not the in the code I am uploading a version with a simple error just so this doesn't get taken as "done"
This commit is contained in:
‮Zach Wilke
2021-11-01 17:09:55 -06:00
parent e56490b2ae
commit f21e5d981b
6 changed files with 23 additions and 56 deletions
+2 -2
View File
@@ -56,7 +56,7 @@ public final class Constants {
}
public static final class DebugConstants {
public static final boolean CAN_BUILD = no;
public static final boolean SHOW_INFO = yes;
public static final Str TYPE_INFO = "INFO";
public static final boolean SHOW_INFO = true;
public static final String TYPE_INFO = "INFO";
}
}
@@ -8,6 +8,7 @@
package frc4388.robot;
import edu.wpi.first.wpilibj.Joystick;
import edu.wpi.first.wpilibj.Solenoid;
import edu.wpi.first.wpilibj2.command.Command;
import edu.wpi.first.wpilibj2.command.InstantCommand;
import edu.wpi.first.wpilibj2.command.RunCommand;
@@ -18,6 +19,7 @@ import frc4388.robot.subsystems.Horn;
import frc4388.robot.subsystems.ShootTube;
import frc4388.robot.subsystems.LED;
import frc4388.utility.LEDPatterns;
import frc4388.utility.DPrint;
import frc4388.utility.controller.IHandController;
import frc4388.utility.controller.XboxController;
@@ -67,7 +69,7 @@ public class RobotContainer {
};
private final ShootTube m_robotShooter = new ShootTube(SolenoidArray);
private final DPrinter m_debugLogger = m_robotMap.DPrinter;
private final DPrint m_debugLogger = m_robotMap.DPrinter;
/* Controllers */
private final XboxController m_driverXbox = new XboxController(OIConstants.XBOX_DRIVER_ID);
private final XboxController m_operatorXbox = new XboxController(OIConstants.XBOX_OPERATOR_ID);
@@ -101,19 +103,19 @@ public class RobotContainer {
.whileHeld(() -> m_robotDrive.driveWithInput(0, 1));
*/
/* Operator Buttons */
// activates ""🔥👌💯" Mode"™⁋
// activates "lit" Mode"
/*
new JoystickButton(getOperatorJoystick(), XboxController.A_BUTTON)
.whenPressed(() -> m_robotLED.setPattern(LEDPatterns.LAVA_RAINBOW))
.whenReleased(() -> m_robotLED.setPattern(LEDConstants.DEFAULT_PATTERN));
*/
/* Fire horn */
new JoystickButton(getOperatorJoystick(), XboxController.LEFT_TRIGGER)
new JoystickButton(getOperatorJoystick(), XboxController.LEFT_TRIGGER_AXIS)
.whenPressed(() -> m_robotHorn.hornSet(true))
.whenReleased(() -> m_robotHorn.hornSet(false));
/* Shoot T-Shirt, Also cycles the array */
new JoystickButton(getOperatorJoystick(), XboxController.RIGHT_TRIGGER)
new JoystickButton(getOperatorJoystick(), XboxController.RIGHT_TRIGGER_AXIS)
.whenPressed(() -> m_robotShooter.ShootTubeSet(true))
.whenReleased(() -> m_robotShooter.ShootTubeSet(false));
@@ -18,6 +18,8 @@ import edu.wpi.first.wpilibj.drive.DifferentialDrive;
import frc4388.robot.Constants.DriveConstants;
import frc4388.robot.Constants.HornConstants;
import frc4388.robot.Constants.LEDConstants;
import frc4388.robot.Constants.ShooterConstants;
import frc4388.robot.Constants.DebugConstants;;
import frc4388.utility.RobotGyro;
import frc4388.utility.DPrint;
@@ -1,37 +0,0 @@
// Copyright (c) FIRST and other WPILib contributors.
// Open Source Software; you can modify and/or share it under the terms of
// the WPILib BSD license file in the root directory of this project.
/* This Command has been gutted. Like a fish */
package frc4388.robot.commands;
import edu.wpi.first.wpilibj2.command.CommandBase;
public class ShootYourShot extends CommandBase {
/** Creates a new ShootYourShot
*. */
public ShootYourShot(Solenoid[] solenoids) {
}
// Called when the command is initially scheduled.
@Override
public void initialize() {}
// Called every time the scheduler runs while the command is scheduled.
@Override
public void execute() {
ShootTube.ShootTubeSet(true);
}
// Called once the command ends or is interrupted.
@Override
public void end(boolean interrupted) {
}
// Returns true when the command should end.
@Override
public boolean isFinished() {
return false;
}
}
@@ -7,13 +7,13 @@ package frc4388.robot.subsystems;
import edu.wpi.first.wpilibj2.command.SubsystemBase;
import frc4388.utility.DPrint;
import frc4388.robot.Constants.DebugConstants;
import edu.wpi.first.wbilib.Solnoid;
DPrint DPrinter = new DPrint(DebugConstants.TYPE_INFO)
import edu.wpi.first.wpilibj.Solenoid;
public class ShootTube extends SubsystemBase {
Solenoid[] m_solenoids;
int m_cycleCount = 0;
int m_maxCount;
DPrint m_DPrinter = new DPrint(DebugConstants.TYPE_INFO);
public ShootTube(Solenoid[] solenoids) {
m_solenoids = solenoids;
m_maxCount = m_solenoids.length;
@@ -27,21 +27,21 @@ public class ShootTube extends SubsystemBase {
if (m_cycleCount >= m_maxCount || m_cycleCount < 0) {
m_cycleCount = 0;
}
DPrinter.println("Current CycleCount: "+m_cycleCount)
m_DPrinter.println("Current CycleCount: "+m_cycleCount);
}
public void CycleDown() {
m_cycleCount--;
if (m_cycleCount >= m_maxCount || m_cycleCount < 0) {
m_cycleCount = 0;
}
DPrinter.println("Current CycleCount: "+m_cycleCount)
m_DPrinter.println("Current CycleCount: "+m_cycleCount);
}
/*
Normal Shoot Tube and Normal Shoot Tube Index Functions
*/
/* Function "ShootTubeSet" cycles up automaticly */
public void ShootTubeSet(Boolean arg) {
m_solenoids[CycleCount].set(arg);
m_solenoids[m_cycleCount].set(arg);
/* If closing valve:
Increse the CycleCount by one,
if the CycleCount >= the length of the array OR CycleCount < 0:
@@ -52,7 +52,7 @@ public class ShootTube extends SubsystemBase {
m_cycleCount = 0;
}
}
DPrinter.println("Current CycleCount: "+m_cycleCount)
m_DPrinter.println("Current CycleCount: "+m_cycleCount);
}
/* Function "ShootTubeIndex" won't cycle up automaticly */
/* Not used, yet Useful */
+6 -6
View File
@@ -4,26 +4,26 @@ package frc4388.utility;
import frc4388.robot.Constants.DebugConstants;
public class DPrint {
str m_debugMsgType = DebugConstants.TYPE_INFO;
public DPrint(str type) {
String m_debugMsgType = DebugConstants.TYPE_INFO;
public DPrint(String type) {
m_debugMsgType = type;
}
public println(str mesage) {
public void println(String mesage) {
switch (m_debugMsgType) {
case DebugConstants.TYPE_INFO:
if (DebugConstants.SHOW_INFO) {
system.out.println("Debug_INFO: "+mesage);
System.out.println("Debug_INFO: "+mesage);
}
;
default:
;
}
}
public print(str mesage) {
public void print(String mesage) {
switch (m_debugMsgType) {
case DebugConstants.TYPE_INFO:
if (DebugConstants.SHOW_INFO) {
system.out.print("Debug_INFO: "+mesage);
System.out.print("Debug_INFO: "+mesage);
}
;
default: