Skip to content

Commit

Permalink
Kavin worked on the claw and combining the files
Browse files Browse the repository at this point in the history
  • Loading branch information
Student committed Dec 1, 2024
1 parent 53decf8 commit 37a8de7
Show file tree
Hide file tree
Showing 2 changed files with 95 additions and 10 deletions.
105 changes: 95 additions & 10 deletions src/main/cpp/HAL/Claw.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,64 @@
#include "HAL/Claw.h"
#include <iostream>
#include <frc/Timer.h>
#include <frc/trajectory/TrapezoidProfile.h>
#include <units/length.h>
#include <units/velocity.h>
#include <units/angle.h>
#include <units/acceleration.h>
#include <frc/Timer.h>
#include <frc/trajectory/TrapezoidProfile.h>
#include <subsystems/ClawHAL.h>

// Claw movements

ClawHAL::ClawHAL()
{
// Put together this component
}


void ManualMovePivot(double speed)
{
// Set specific usar input
}
double GetAngle()
{
// Uses the claws usar input to take action
return 0.0;
}


void ProfiledMoveToAngle(double angle)
{
// Uses the claws usar input take action
}


double GetSpeed()
{

return 0.0;
//m_intakeSpeed;
}


void SetPosition()
{
// Return to starting position
}


void PublishDebugInfo()
{
}


void ResetProfiledMoveState()
{
//m_profileState = 0;
}



Claw::Claw()
Expand All @@ -10,22 +69,48 @@ Claw::Claw()

void Claw::Clasp()
{
if (_signal != 1)
{
std::cout << "claw is clasping" << std::endl;
_signal = 1;
}
if (_signal != 1)
{
std::cout << "claw is clasping" << std::endl;
_signal = 1;
}

// TODO - implement mechanism to clasp
}
/*int ClawHAL::LauncherHAL()
{
// Put together the compontent
}
*/


void SetClawHALSpeed(double speed)
{
// Handle any usar input to take this action compontent
}

double GetClawHALSpeed()
{
return 0;
}

void RunIntake(double speed)
{
// Set motors to connect to certain speed
}

void ResetProfiledMoveState()
{
//m_profileState = 0;
}

void Claw::Unclasp()
{
if (_signal != 2)
{
std::cout << "claw is unclasping" << std::endl;
_signal = 2;
}
if (_signal != 2)
{
std::cout << "claw is unclasping" << std::endl;
_signal = 2;
}

// TODO - implement mechanism to clasp
}
File renamed without changes.

0 comments on commit 37a8de7

Please sign in to comment.