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

Minor fixes

This commit is contained in:
Austen Adler 2015-02-07 12:50:36 -05:00
parent e68dc00c21
commit b26a63bcc1
6 changed files with 11 additions and 10 deletions

4
.env
View File

@ -2,7 +2,7 @@ function mb(){
vagrant ssh -c "cd /vagrant/src;make clean 2>&1 >/dev/null;make" vagrant ssh -c "cd /vagrant/src;make clean 2>&1 >/dev/null;make"
} }
function mc(){ function mc(){
vagrant ssh -c "cd /vagrant/src;make clean" vagrant ssh -c "cd /vagrant/src;make clean 2>&1 >/dev/null"
} }
function mk(){ function mk(){
vagrant ssh -c "cd /vagrant/src;make" vagrant ssh -c "cd /vagrant/src;make"
@ -11,5 +11,5 @@ function md(){
vagrant ssh -c "cd /vagrant/src;make deploy" vagrant ssh -c "cd /vagrant/src;make deploy"
} }
function ma(){ function ma(){
vagrant ssh -c "cd /vagrant/src;make clean;make;make deploy" vagrant ssh -c "cd /vagrant/src;make clean 2>&1 >/dev/null;make;make deploy"
} }

View File

@ -1,6 +1,7 @@
#include "Autonomous.h" #include "Autonomous.h"
#include "AutoDrive.h" #include "AutoDrive.h"
#include "../../DentRobot.h" #include "../../DentRobot.h"
#include "../Elevator/Raise.h"
Autonomous::Autonomous(){ Autonomous::Autonomous(){
AddSequential(new AutoDrive()); AddSequential(new AutoDrive());
} }

View File

@ -4,16 +4,16 @@
Lower::Lower() : Command("Lower"){ Lower::Lower() : Command("Lower"){
} }
void Lower::Initialize(){ void Lower::Initialize(){
SetTimeout(2.0); SetTimeout(2.0);
} }
void Lower::Execute(){ void Lower::Execute(){
DentRobot::elevator->Run((-DentRobot::oi->GetLeftStick()->GetRawAxis(3)+1.0)/2); DentRobot::elevator->Run((-DentRobot::oi->GetLeftStick()->GetRawAxis(3)+1.0)/2);
} }
bool Lower::IsFinished(){ bool Lower::IsFinished(){
if (!DentRobot::dio->Get(DentRobot::dio->ELEVATORBOTTOM) || IsTimedOut()){ if (!DentRobot::dio->Get(DentRobot::dio->ELEVATORBOTTOM) || IsTimedOut()){
return true; return true;
}else{ }else{
return false; return false;
} }
} }
void Lower::End(){ void Lower::End(){

View File

@ -4,16 +4,16 @@
Raise::Raise() : Command("Raise"){ Raise::Raise() : Command("Raise"){
} }
void Raise::Initialize(){ void Raise::Initialize(){
SetTimeout(2.0); SetTimeout(2.0);
} }
void Raise::Execute(){ void Raise::Execute(){
DentRobot::elevator->Run(-(-DentRobot::oi->GetLeftStick()->GetRawAxis(3)+1.0)/2); DentRobot::elevator->Run(-(-DentRobot::oi->GetLeftStick()->GetRawAxis(3)+1.0)/2);
} }
bool Raise::IsFinished(){ bool Raise::IsFinished(){
if (!DentRobot::dio->Get(DentRobot::dio->ELEVATORBOTTOM) || IsTimedOut()){ if (!DentRobot::dio->Get(DentRobot::dio->ELEVATORBOTTOM) || IsTimedOut()){
return true; return true;
}else{ }else{
return false; return false;
} }
} }
void Raise::End(){ void Raise::End(){

View File

@ -6,7 +6,7 @@ Drivetrain* DentRobot::drivetrain=NULL;
Elevator* DentRobot::elevator=NULL; Elevator* DentRobot::elevator=NULL;
DIO* DentRobot::dio = NULL; DIO* DentRobot::dio = NULL;
AirCompressor* DentRobot::airCompressor=NULL; AirCompressor* DentRobot::airCompressor=NULL;
Autonomous* DentRobot::aut=NULL; CommandGroup* DentRobot::aut=NULL;
DentRobot::DentRobot(){ DentRobot::DentRobot(){
oi=new OI(); oi=new OI();
collector=new Collector(); collector=new Collector();

View File

@ -19,7 +19,7 @@ class DentRobot: public IterativeRobot {
static Elevator* elevator; static Elevator* elevator;
static DIO* dio; static DIO* dio;
static AirCompressor* airCompressor; static AirCompressor* airCompressor;
static Autonomous* aut; static CommandGroup* aut;
void RobotInit(); void RobotInit();
void DisabledPeriodic(); void DisabledPeriodic();
void AutonomousInit(); void AutonomousInit();