mirror of
https://github.com/team2059/Dent
synced 2024-12-18 20:52:29 -05:00
Added second bin elevator motor
This commit is contained in:
parent
a0018675ac
commit
3a77b38ff9
@ -14,7 +14,8 @@
|
||||
#define ELEVATOR_ENCODERB 9
|
||||
|
||||
// BinElevator
|
||||
#define BINELEVATOR_CAN 10
|
||||
#define BINELEVATOR_LEFT_CAN 13
|
||||
#define BINELEVATOR_RIGHT_CAN 14
|
||||
#define BINELEVATOR_BOTTOM_DIO 6
|
||||
#define BINELEVATOR_COLELCT_BIN_DIO 7
|
||||
#define BINELEVATOR_TOP_DIO 12
|
||||
|
@ -1,7 +1,8 @@
|
||||
#include "BinElevator.h"
|
||||
#include "../RobotMap.h"
|
||||
BinElevator::BinElevator(){
|
||||
motor = new CANTalon(BINELEVATOR_CAN);
|
||||
leftMotor = new CANTalon(BINELEVATOR_LEFT_CAN);
|
||||
rightMotor = new CANTalon(BINELEVATOR_RIGHT_CAN);
|
||||
elevatorEncoder = new Encoder(BINELEVATOR_ENCODERA, BINELEVATOR_ENCODERB, false);
|
||||
elevatorBottom = new DigitalInput(BINELEVATOR_BOTTOM_DIO);
|
||||
elevatorTop = new DigitalInput(BINELEVATOR_TOP_DIO);
|
||||
@ -9,7 +10,8 @@ BinElevator::BinElevator(){
|
||||
void BinElevator::InitDefaultCommand(){
|
||||
}
|
||||
void BinElevator::Run(double power){
|
||||
motor->Set(power);
|
||||
leftMotor->Set(power);
|
||||
rightMotor->Set(-power);
|
||||
}
|
||||
void BinElevator::ResetEncoder(){
|
||||
elevatorEncoder->Reset();
|
||||
|
@ -8,7 +8,8 @@
|
||||
*/
|
||||
class BinElevator{
|
||||
private:
|
||||
CANTalon *motor; //<! The bin elevator motor
|
||||
CANTalon *leftMotor,//<! The left bin elevator motor
|
||||
*rightMotor; //<! The right bin elevator motor
|
||||
Encoder *elevatorEncoder; //<! The bin elevator encoder (unused)
|
||||
DigitalInput *elevatorBottom, //<! The bottom bin elevator sensor (unused)
|
||||
*elevatorTop; //<! The top bin elevator sensor (unused)
|
||||
|
Loading…
Reference in New Issue
Block a user