Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chezy Champs changes #103

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .idea/compiler.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions .idea/gradle.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file modified src/main/deploy/autos/blue/3 Cones Far Side.auto
Binary file not shown.
Binary file modified src/main/deploy/autos/blue/3 Piece.auto
Binary file not shown.
Binary file modified src/main/deploy/autos/red/3 Cones Far Side.auto
Binary file not shown.
Binary file modified src/main/deploy/autos/red/3 Piece.auto
Binary file not shown.
3 changes: 2 additions & 1 deletion src/main/java/frc/robot/Robot.java
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
import org.littletonrobotics.junction.networktables.LoggedDashboardBoolean;
import org.littletonrobotics.junction.networktables.LoggedDashboardChooser;
import org.littletonrobotics.junction.networktables.LoggedDashboardNumber;
import org.littletonrobotics.junction.networktables.NT4Publisher;
import org.littletonrobotics.junction.wpilog.WPILOGReader;
import org.littletonrobotics.junction.wpilog.WPILOGWriter;

Expand Down Expand Up @@ -197,7 +198,7 @@ public void robotInit() {
}

Logger.getInstance().addDataReceiver(new WPILOGWriter(LOG_DIRECTORY));
//Logger.getInstance().addDataReceiver(new NT4Publisher()); // Publish data to NetworkTables
Logger.getInstance().addDataReceiver(new NT4Publisher()); // Publish data to NetworkTables
powerDistribution = new PowerDistribution(1, ModuleType.kRev); // Enables power distribution logging

drive = new Drive(new DriveIOFalcon());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@

import com.revrobotics.CANSparkMax;
import com.revrobotics.CANSparkMax.ControlType;
import com.revrobotics.CANSparkMax.IdleMode;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this here?

import com.revrobotics.CANSparkMaxLowLevel;
import com.revrobotics.SparkMaxPIDController;
import com.revrobotics.SparkMaxPIDController.ArbFFUnits;
import frc.robot.Constants;
import org.littletonrobotics.junction.Logger;

import static edu.wpi.first.wpilibj.RobotBase.isReal;
import static frc.robot.Constants.*;
Expand All @@ -23,6 +25,7 @@ public TelescopingArmIOSparkMax() {
telescopingArmSparkMax.setSmartCurrentLimit(Constants.TELESCOPING_ARM_SMART_CURRENT_LIMIT);
telescopingArmSparkMax.setSecondaryCurrentLimit(80);
telescopingArmSparkMax.setInverted(true);
telescopingArmSparkMax.setIdleMode(IdleMode.kCoast);

telescopingArmSparkMax.getEncoder().setPositionConversionFactor(1.0 / TELESCOPING_ARM_ROTATIONS_PER_METER);
telescopingArmSparkMax.getEncoder().setVelocityConversionFactor(
Expand All @@ -38,6 +41,7 @@ public TelescopingArmIOSparkMax() {
@Override
public void updateInputs(TelescopingArmInputs inputs) {
inputs.position = telescopingArmSparkMax.getEncoder().getPosition();
Logger.getInstance().recordOutput("Telescoping Arm/Actual Position", inputs.position);
inputs.velocity = telescopingArmSparkMax.getEncoder().getVelocity();
inputs.current = telescopingArmSparkMax.getOutputCurrent();
inputs.voltage = telescopingArmSparkMax.getAppliedOutput() * Constants.GRABBER_NOMINAL_VOLTAGE;
Expand Down
Loading