2
0
mirror of https://github.com/team2059/Dent synced 2024-12-18 20:52:29 -05:00
dent/Subsystems/Collector.cpp

25 lines
789 B
C++
Raw Normal View History

2015-01-16 19:29:55 -05:00
#include "Collector.h"
#include "../RobotMap.h"
2015-02-14 16:16:03 -05:00
Collector::Collector() : Subsystem("Collector"){
2015-02-02 19:56:27 -05:00
collectorMotorLeft=new CANTalon(COLLECTOR_LEFT_CAN);
2015-02-08 12:19:39 -05:00
collectorMotorBottom=new CANTalon(COLLECTOR_BOTTOM_CAN);
2015-02-14 17:12:58 -05:00
collectorMotorRamp=new CANTalon(COLLECTOR_RAMP_CAN);
2015-02-02 19:56:27 -05:00
collectorMotorRight=new CANTalon(COLLECTOR_RIGHT_CAN);
2015-02-15 07:53:19 -05:00
sonarAnalog=new AnalogInput(COLLECTOR_SONAR_ANALOG);
sonarDigital=new DigitalOutput(COLLECTOR_RIGHT_CAN);
}
2015-02-14 16:16:03 -05:00
void Collector::InitDefaultCommand(){
}
void Collector::MoveRollers(double a){
2015-02-02 18:53:02 -05:00
collectorMotorLeft->Set(a);
2015-02-08 12:19:39 -05:00
collectorMotorBottom->Set(a);
2015-02-14 17:12:58 -05:00
collectorMotorRamp->Set(a);
2015-02-02 18:53:02 -05:00
collectorMotorRight->Set(-a);
2015-02-15 07:53:19 -05:00
GetSonarDistance();
}
float Collector::GetSonarDistance(){
printf("Sonar Distance %f\n",sonarAnalog->GetAverageVoltage());
}
2015-02-08 12:26:15 -05:00
// vim: ts=2:sw=2:et