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:
parent
9490b8fb9b
commit
fd144410a9
@ -10,15 +10,16 @@ void Raise::Execute(){
|
||||
DentRobot::elevator->Run(1.0);
|
||||
}
|
||||
bool Raise::IsFinished(){
|
||||
if(!DentRobot::elevator->GetElevatorMiddle()){
|
||||
DentRobot::elevator->stoppedAtSensor=true;
|
||||
}
|
||||
if ((DentRobot::elevator->stoppedAtSensor)){
|
||||
printf("Stopped at the middle sensor\n");
|
||||
DentRobot::elevator->stoppedAtSensor=false;
|
||||
return true;
|
||||
}else if (!DentRobot::elevator->GetElevatorTop()) {
|
||||
printf("Stopping at the top sensor\n");
|
||||
//if(!DentRobot::elevator->GetElevatorMiddle()){
|
||||
// DentRobot::elevator->stoppedAtSensor=true;
|
||||
//}
|
||||
//if ((DentRobot::elevator->stoppedAtSensor)){
|
||||
// printf("Stopped at the middle sensor\n");
|
||||
// DentRobot::elevator->stoppedAtSensor=false;
|
||||
// return true;
|
||||
//}else if (!DentRobot::elevator->GetElevatorTop()) {
|
||||
if (!DentRobot::elevator->GetElevatorTop()||IsTimedOut()){
|
||||
printf("Robot stopped raising. Sensor based? %d\n", !DentRobot::elevator->GetElevatorTop());
|
||||
return true;
|
||||
}else{
|
||||
return false;
|
||||
|
@ -6,8 +6,8 @@
|
||||
// Elevator
|
||||
#define ELEVATOR_CAN 1
|
||||
#define ELEVATOR_BOTTOM_DIO 9
|
||||
#define ELEVATOR_MIDDLE_DIO 8
|
||||
#define ELEVATOR_TOP_DIO 7
|
||||
#define ELEVATOR_MIDDLE_DIO 7
|
||||
#define ELEVATOR_TOP_DIO 8
|
||||
#define ELEVATOR_ENCODERA 4
|
||||
#define ELEVATOR_ENCODERB 9
|
||||
|
||||
|
@ -19,6 +19,6 @@ void Collector::MoveRollers(double a){
|
||||
GetSonarDistance();
|
||||
}
|
||||
float Collector::GetSonarDistance(){
|
||||
printf("Sonar Distance %f\n",sonarAnalog->GetAverageValue());
|
||||
printf("Sonar Distance %f\n",sonarAnalog->GetAverageVoltage());
|
||||
}
|
||||
// vim: ts=2:sw=2:et
|
||||
|
Loading…
Reference in New Issue
Block a user