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

24 lines
725 B
C++

#include "Collector.h"
#include "../RobotMap.h"
Collector::Collector(): Subsystem("Collector"){
collectorMotorLeft=new Victor(COLLECTOR_LEFT);
collectorMotorBottom=new Victor(COLLECTOR_BOTTOM);
collectorMotorRamp=new Victor(COLLECTOR_RAMP);
collectorMotorRight=new Victor(COLLECTOR_RIGHT);
sonarAnalog=new AnalogInput(COLLECTOR_SONAR_ANALOG);
}
void Collector::InitDefaultCommand(){
}
void Collector::MoveRollers(double power){
collectorMotorLeft->Set(power);
collectorMotorBottom->Set(-power);
collectorMotorRamp->Set(power);
collectorMotorRight->Set(-power);
printf("Roller power: %f\n", power);
}
double Collector::GetSonarDistance(){
return sonarAnalog->GetAverageVoltage();
}
// vim: ts=2:sw=2:et