mirror of
https://github.com/felis/USB_Host_Shield_2.0.git
synced 2024-03-22 11:31:26 +01:00
Added comment about difference bewteen getButtonPress and getButtonClick
This commit is contained in:
parent
c55c77fa03
commit
2182ec9a97
2 changed files with 14 additions and 0 deletions
7
PS3USB.h
7
PS3USB.h
|
@ -68,8 +68,15 @@ public:
|
|||
void setMoveBdaddr(uint8_t* BDADDR);
|
||||
|
||||
/* PS3 Controller Commands */
|
||||
/*
|
||||
getButtonPress will return true as long as the button is held down
|
||||
While getButtonClick will only return it once
|
||||
So you instance if you need to increase a variable once you would use getButtonClick,
|
||||
but if you need to drive a robot forward you would use getButtonPress
|
||||
*/
|
||||
bool getButtonPress(Button b);
|
||||
bool getButtonClick(Button b);
|
||||
|
||||
uint8_t getAnalogButton(AnalogButton a);
|
||||
uint8_t getAnalogHat(AnalogHat a);
|
||||
uint16_t getSensor(Sensor a);
|
||||
|
|
7
Wii.h
7
Wii.h
|
@ -105,8 +105,15 @@ public:
|
|||
virtual void Reset(); // Use this to reset the service
|
||||
virtual void disconnect(); // Use this void to disconnect any of the controllers
|
||||
|
||||
/*
|
||||
getButtonPress will return true as long as the button is held down
|
||||
While getButtonClick will only return it once
|
||||
So you instance if you need to increase a variable once you would use getButtonClick,
|
||||
but if you need to drive a robot forward you would use getButtonPress
|
||||
*/
|
||||
bool getButtonPress(Button b); // This will read true as long as the button is held down
|
||||
bool getButtonClick(Button b); // This will only be true when the button is clicked the first time
|
||||
|
||||
uint8_t getAnalogHat(AnalogHat a); // Used to read the joystick of the Nunchuck
|
||||
|
||||
double getPitch() { return pitch; }; // Fusioned angle using a complimentary filter if the Motion Plus is connected
|
||||
|
|
Loading…
Reference in a new issue