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

Compressor code working (for reference)

This commit is contained in:
Adam Long 2015-01-19 14:52:45 +00:00
parent c45ab0e9a2
commit 743d6af115
2 changed files with 3 additions and 5 deletions

View File

@ -8,7 +8,6 @@ HHBase::HHBase():
printf("Done\n");
}
void HHBase::RobotInit(){
hhbot->Init();
}
void HHBase::DisabledInit(){}
void HHBase::AutonomousInit(){

View File

@ -2,7 +2,7 @@
#include "HHBase.h"
HHRobot::HHRobot():
DriveStick(new Extreme3dPro(0)),
AirCompressor(new Compressor(30)),
AirCompressor(new Compressor(31)),
PowerDistPanel(new PowerDistributionPanel()),
//FrontRight,FrontLeft,RearRight,RearLeft
RobotDrive(new MecanumDrive(40,41,42,43)){
@ -24,9 +24,8 @@ void HHRobot::Handler(){
z = DriveStick->GetJoystickAxis("z");
//X axis, Y axis, Z axis, sensitivity, mode threshold, gyro
RobotDrive->handler(x,y,z,0.95,DriveStick->GetThrottle(),0);
//Disables the compressor if the battery voltage is detected to be less than 10 volts
if (PowerDistPanel->GetVoltage()<=10){
//Compressor Button assignment
if (DriveStick->GetJoystickButton(4)){
AirCompressor->Stop();
}
}