Skip to content

Commit

Permalink
callum
Browse files Browse the repository at this point in the history
removed extra HAL folders, developed elevator functions
  • Loading branch information
Student committed Dec 4, 2024
1 parent 45a3914 commit fd57229
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 27 deletions.
2 changes: 1 addition & 1 deletion src/main/cpp/HAL/Elevator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ void Elevator::ProfiledMoveToHeight(int shelfNumber)

double Elevator::GetHeight()
{
// TODO - read motors for height
// get data from motors
std::cout << "elevator height measured as 0.0 inches" << std::endl;
return 0.0f;
}
Expand Down
12 changes: 12 additions & 0 deletions src/main/cpp/InputManager/ElevatorManager.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#include "HAL/Elevator.h"
#include "InputManager/ElevatorManager.h"
#include <iostream>
#include <frc/Timer.h>


void HandleInput(RobotControlData& control_data) {
//todo
};
void Reset(){
m_elevator.ProfiledMoveToHeight(0);
};
13 changes: 0 additions & 13 deletions src/main/cpp/subsystems/ElevatorHAL.cpp

This file was deleted.

4 changes: 4 additions & 0 deletions src/main/include/HAL/Elevator.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
#pragma once

#include <frc/Timer.h>
#include <rev/CANSparkMax.h>
#include <frc/XboxController.h>

rev::CANSparkMax m_elevatorMotor{9, rev::CANSparkMax::MotorType::kBrushless};

class Elevator
{
Expand Down
2 changes: 2 additions & 0 deletions src/main/include/InputManager/ElevatorManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
#include "HAL/Elevator.h"
#include "RobotControlData.h"

Elevator m_elevator = Elevator();

class ElevatorManager
{
public:
Expand Down
13 changes: 0 additions & 13 deletions src/main/include/subsystems/ElevatorHAL.h

This file was deleted.

0 comments on commit fd57229

Please sign in to comment.