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

Minor breakage (untested, needs testing, not working)

This commit is contained in:
Adam Long 2015-02-15 13:36:19 +00:00
parent 9490b8fb9b
commit fd144410a9
3 changed files with 13 additions and 12 deletions

View File

@ -10,15 +10,16 @@ void Raise::Execute(){
DentRobot::elevator->Run(1.0); DentRobot::elevator->Run(1.0);
} }
bool Raise::IsFinished(){ bool Raise::IsFinished(){
if(!DentRobot::elevator->GetElevatorMiddle()){ //if(!DentRobot::elevator->GetElevatorMiddle()){
DentRobot::elevator->stoppedAtSensor=true; // DentRobot::elevator->stoppedAtSensor=true;
} //}
if ((DentRobot::elevator->stoppedAtSensor)){ //if ((DentRobot::elevator->stoppedAtSensor)){
printf("Stopped at the middle sensor\n"); // printf("Stopped at the middle sensor\n");
DentRobot::elevator->stoppedAtSensor=false; // DentRobot::elevator->stoppedAtSensor=false;
return true; // return true;
}else if (!DentRobot::elevator->GetElevatorTop()) { //}else if (!DentRobot::elevator->GetElevatorTop()) {
printf("Stopping at the top sensor\n"); if (!DentRobot::elevator->GetElevatorTop()||IsTimedOut()){
printf("Robot stopped raising. Sensor based? %d\n", !DentRobot::elevator->GetElevatorTop());
return true; return true;
}else{ }else{
return false; return false;

View File

@ -6,8 +6,8 @@
// Elevator // Elevator
#define ELEVATOR_CAN 1 #define ELEVATOR_CAN 1
#define ELEVATOR_BOTTOM_DIO 9 #define ELEVATOR_BOTTOM_DIO 9
#define ELEVATOR_MIDDLE_DIO 8 #define ELEVATOR_MIDDLE_DIO 7
#define ELEVATOR_TOP_DIO 7 #define ELEVATOR_TOP_DIO 8
#define ELEVATOR_ENCODERA 4 #define ELEVATOR_ENCODERA 4
#define ELEVATOR_ENCODERB 9 #define ELEVATOR_ENCODERB 9

View File

@ -19,6 +19,6 @@ void Collector::MoveRollers(double a){
GetSonarDistance(); GetSonarDistance();
} }
float Collector::GetSonarDistance(){ float Collector::GetSonarDistance(){
printf("Sonar Distance %f\n",sonarAnalog->GetAverageValue()); printf("Sonar Distance %f\n",sonarAnalog->GetAverageVoltage());
} }
// vim: ts=2:sw=2:et // vim: ts=2:sw=2:et