forked from FRC830/2024Robot
-
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.
* created elevator code structure * added more funtions to ElevatorHAL * Fix Compilation - Mentor Nick * added MoveHeightBy function. * Elevator Code Expanded (but to be improved) * [Nick] Fix compile errors * callum removed extra HAL folders, developed elevator functions * updated internal elevator logic, and controller interfacing for elevator callum * Callum, Kavin, Sid - Elevator code attempt #1 * Elevator on test board * Callum & Kavin - Elevator partially working on test board * callum - changed profiled move to height to have 3 states * elevator works on testboard --------- Co-authored-by: Jack Jin <79951112+Rvistix@users.noreply.github.com> Co-authored-by: RandomPerson5125 <murkavin@gmail.com> Co-authored-by: Student <student@ratpack> Co-authored-by: TheCrudeOilBro <lucasyuan1981@gmail.com> Co-authored-by: NottheIRS <92690588+NottheIRS@users.noreply.github.com>
- Loading branch information
1 parent
353e17a
commit 9b85f49
Showing
8 changed files
with
74 additions
and
28 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
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,16 +1,21 @@ | ||
#include "HAL/Elevator.h" | ||
#include "InputManager/ElevatorManager.h" | ||
#include <iostream> | ||
#include <frc/Timer.h> | ||
|
||
ElevatorManager::ElevatorManager() | ||
{ | ||
|
||
void HandleInput(RobotControlData& control_data) { | ||
} | ||
|
||
void ElevatorManager::HandleInput(RobotControlData& control_data) { | ||
if (control_data.elevatorInput.up) { | ||
m_elevator.ShiftHeight(true); | ||
}else if(control_data.elevatorInput.down) { | ||
m_elevator.ShiftHeight(false); | ||
m_elevator.ProfiledMoveToHeight(1); | ||
} else if(control_data.elevatorInput.down) { | ||
m_elevator.ProfiledMoveToHeight(-1); | ||
} else { | ||
m_elevator.ProfiledMoveToHeight(0); | ||
} | ||
}; | ||
void Reset(){ | ||
void ElevatorManager::Reset(){ | ||
m_elevator.ProfiledMoveToHeight(0); | ||
}; |
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
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