mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-23 01:21:42 +00:00
20 lines
350 B
C++
20 lines
350 B
C++
|
|
/*
|
||
|
|
* DoubleButton.cpp
|
||
|
|
*
|
||
|
|
* Created on: Jun 24, 2014
|
||
|
|
* Author: alex
|
||
|
|
*/
|
||
|
|
|
||
|
|
#include "DoubleButton.h"
|
||
|
|
|
||
|
|
DoubleButton::DoubleButton(Joystick* joy, int button1, int button2) {
|
||
|
|
this->joy = joy;
|
||
|
|
this->button1 = button1;
|
||
|
|
this->button2 = button2;
|
||
|
|
}
|
||
|
|
|
||
|
|
bool DoubleButton::Get() {
|
||
|
|
return joy->GetRawButton(button1) && joy->GetRawButton(button2);
|
||
|
|
}
|
||
|
|
|