-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
97 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
// 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. | ||
|
||
#include "subsystems/FeederSubsystem.h" | ||
#include <frc/smartdashboard/SmartDashboard.h> | ||
|
||
FeederSubsystem::FeederSubsystem() { | ||
SetName("FeederSubsystem"); | ||
//ConfigureFeederMotor(consts::intake::physical::INVERT_MOTOR, consts::intake::physical::INTAKE_RATIO, consts::intake::current_limits::SUPPLY_CURRENT_LIMIT, consts::intake::current_limits::STATOR_CURRENT_LIMIT); | ||
//ConfigureMotorSignals(); | ||
frc::SmartDashboard::PutData(this); | ||
} | ||
|
||
// This method will be called once per scheduler run | ||
void FeederSubsystem::Periodic() {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
30cedb8 | ||
57f4807 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
// Copyright (c) FRC 2053. | ||
// Open Source Software; you can modify and/or share it under the terms of | ||
// the MIT License file in the root of this project | ||
|
||
#pragma once | ||
|
||
#include <frc/system/plant/DCMotor.h> | ||
#include <units/base.h> | ||
#include <units/velocity.h> | ||
#include <wpi/interpolating_map.h> | ||
#include <units/dimensionless.h> | ||
#include <units/moment_of_inertia.h> | ||
|
||
#include "str/Gains.h" | ||
|
||
namespace consts { | ||
namespace feeder { | ||
namespace can_ids { | ||
inline constexpr int FEEDER = 18; | ||
} // namespace can_ids | ||
|
||
namespace current_limits { | ||
inline constexpr units::ampere_t SUPPLY_CURRENT_LIMIT = 60_A; | ||
inline constexpr units::ampere_t STATOR_CURRENT_LIMIT = 180_A; | ||
} // namespace current_limits | ||
|
||
namespace physical { | ||
|
||
inline constexpr bool INVERT_MOTOR = false; | ||
|
||
inline constexpr units::scalar_t INTAKE_RATIO = (24.0 / 16.0); | ||
|
||
inline constexpr frc::DCMotor INTAKE_MOTOR = frc::DCMotor::Falcon500(1); | ||
|
||
inline constexpr units::meter_t WHEEL_RADIUS = 1_in; | ||
|
||
//From onshape doc | ||
inline constexpr units::kilogram_square_meter_t INTAKE_MOI = 12.350445 * 1_in * 1_in * 1_lb; | ||
} // namespace physical | ||
|
||
namespace gains { | ||
inline constexpr units::volt_t NOTE_FEED_VOLTAGE = 10_V; | ||
inline constexpr units::volt_t NOTE_EJECT_VOLTAGE = -5_V; | ||
} | ||
} // namespace intake | ||
} // namespace consts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
// 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. | ||
|
||
#pragma once | ||
|
||
#include <frc2/command/SubsystemBase.h> | ||
#include <ctre/phoenix6/TalonFX.hpp> | ||
#include <constants/FeederConstants.h> | ||
|
||
class FeederSubsystem : public frc2::SubsystemBase { | ||
public: | ||
FeederSubsystem(); | ||
|
||
/** | ||
* Will be called periodically whenever the CommandScheduler runs. | ||
*/ | ||
void Periodic() override; | ||
|
||
private: | ||
ctre::phoenix6::hardware::TalonFX feederMotor{consts::feeder::can_ids::FEEDER, "*"}; | ||
}; |