mirror of
https://github.com/team2059/Dent
synced 2025-01-07 22:14:14 -05:00
Compressor code working (for reference)
This commit is contained in:
parent
c45ab0e9a2
commit
743d6af115
@ -8,7 +8,6 @@ HHBase::HHBase():
|
|||||||
printf("Done\n");
|
printf("Done\n");
|
||||||
}
|
}
|
||||||
void HHBase::RobotInit(){
|
void HHBase::RobotInit(){
|
||||||
hhbot->Init();
|
|
||||||
}
|
}
|
||||||
void HHBase::DisabledInit(){}
|
void HHBase::DisabledInit(){}
|
||||||
void HHBase::AutonomousInit(){
|
void HHBase::AutonomousInit(){
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
#include "HHBase.h"
|
#include "HHBase.h"
|
||||||
HHRobot::HHRobot():
|
HHRobot::HHRobot():
|
||||||
DriveStick(new Extreme3dPro(0)),
|
DriveStick(new Extreme3dPro(0)),
|
||||||
AirCompressor(new Compressor(30)),
|
AirCompressor(new Compressor(31)),
|
||||||
PowerDistPanel(new PowerDistributionPanel()),
|
PowerDistPanel(new PowerDistributionPanel()),
|
||||||
//FrontRight,FrontLeft,RearRight,RearLeft
|
//FrontRight,FrontLeft,RearRight,RearLeft
|
||||||
RobotDrive(new MecanumDrive(40,41,42,43)){
|
RobotDrive(new MecanumDrive(40,41,42,43)){
|
||||||
@ -24,9 +24,8 @@ void HHRobot::Handler(){
|
|||||||
z = DriveStick->GetJoystickAxis("z");
|
z = DriveStick->GetJoystickAxis("z");
|
||||||
//X axis, Y axis, Z axis, sensitivity, mode threshold, gyro
|
//X axis, Y axis, Z axis, sensitivity, mode threshold, gyro
|
||||||
RobotDrive->handler(x,y,z,0.95,DriveStick->GetThrottle(),0);
|
RobotDrive->handler(x,y,z,0.95,DriveStick->GetThrottle(),0);
|
||||||
|
//Compressor Button assignment
|
||||||
//Disables the compressor if the battery voltage is detected to be less than 10 volts
|
if (DriveStick->GetJoystickButton(4)){
|
||||||
if (PowerDistPanel->GetVoltage()<=10){
|
|
||||||
AirCompressor->Stop();
|
AirCompressor->Stop();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user