mirror of
https://github.com/felis/USB_Host_Shield_2.0.git
synced 2024-03-22 11:31:26 +01:00
Updated documentation
This commit is contained in:
parent
797208832f
commit
2266398b28
5 changed files with 66 additions and 25 deletions
6
PS3BT.h
6
PS3BT.h
|
@ -90,8 +90,10 @@ public:
|
|||
|
||||
/** @name PS3 Controller functions */
|
||||
/**
|
||||
* getButtonPress(Button b) will return true as long as the button is held down
|
||||
* While getButtonClick(Button b) will only return it once
|
||||
* getButtonPress(Button b) will return true as long as the button is held down.
|
||||
*
|
||||
* While getButtonClick(Button b) will only return it once.
|
||||
*
|
||||
* So you instance if you need to increase a variable once you would use getButtonClick(Button b),
|
||||
* but if you need to drive a robot forward you would use getButtonPress(Button b).
|
||||
*/
|
||||
|
|
8
PS3USB.h
8
PS3USB.h
|
@ -57,7 +57,7 @@
|
|||
* This class implements support for all the official PS3 Controllers:
|
||||
* Dualshock 3, Navigation or a Motion controller via USB.
|
||||
*
|
||||
* One can only set the color of the bulb, set the rumble, set and get the bluetooth address and calibrate the magnetometer via USB.
|
||||
* One can only set the color of the bulb, set the rumble, set and get the bluetooth address and calibrate the magnetometer via USB on the Move controller.
|
||||
*
|
||||
* Information about the protocol can be found at the wiki: https://github.com/felis/USB_Host_Shield_2.0/wiki/PS3-Information.
|
||||
*/
|
||||
|
@ -116,8 +116,10 @@ public:
|
|||
|
||||
/** @name PS3 Controller functions */
|
||||
/**
|
||||
* getButtonPress(Button b) will return true as long as the button is held down
|
||||
* While getButtonClick(Button b) will only return it once
|
||||
* getButtonPress(Button b) will return true as long as the button is held down.
|
||||
*
|
||||
* While getButtonClick(Button b) will only return it once.
|
||||
*
|
||||
* So you instance if you need to increase a variable once you would use getButtonClick(Button b),
|
||||
* but if you need to drive a robot forward you would use getButtonPress(Button b).
|
||||
*/
|
||||
|
|
5
SPP.h
5
SPP.h
|
@ -118,7 +118,6 @@ public:
|
|||
bool connected;
|
||||
|
||||
/** @name Serial port profile (SPP) Print functions */
|
||||
/** Used to send Strings. */
|
||||
/**
|
||||
* Used to send Arduino String data type.
|
||||
* @param str String to send.
|
||||
|
@ -135,7 +134,7 @@ public:
|
|||
*/
|
||||
void print(const char* str);
|
||||
/**
|
||||
* Same as print(const char* data), but will include newline and carriage return.
|
||||
* Same as print(const char* str), but will include newline and carriage return.
|
||||
* @param str String to send.
|
||||
*/
|
||||
void println(const char* str);
|
||||
|
@ -175,7 +174,7 @@ public:
|
|||
void println(void);
|
||||
|
||||
/**
|
||||
* Used to print integers.
|
||||
* Used to print signed integers.
|
||||
* @param n Integers to send.
|
||||
*/
|
||||
void printNumber(int32_t n);
|
||||
|
|
70
Wii.h
70
Wii.h
|
@ -98,7 +98,7 @@ public:
|
|||
/**
|
||||
* Constructor for the WII class.
|
||||
* @param p Pointer to BTD class instance.
|
||||
* @param pair Set this true to pair with the Wiimote. If the argument is omitted then it won't pair with it.
|
||||
* @param pair Set this to true in order to pair with the Wiimote. If the argument is omitted then it won't pair with it.
|
||||
* One can use ::PAIR to set it to true.
|
||||
*/
|
||||
WII(BTD *p, bool pair=false);
|
||||
|
@ -119,8 +119,10 @@ public:
|
|||
|
||||
/** @name Wii Controller functions */
|
||||
/**
|
||||
* getButtonPress(Button b) will return true as long as the button is held down
|
||||
* While getButtonClick(Button b) will only return it once
|
||||
* getButtonPress(Button b) will return true as long as the button is held down.
|
||||
*
|
||||
* While getButtonClick(Button b) will only return it once.
|
||||
*
|
||||
* So you instance if you need to increase a variable once you would use getButtonClick(Button b),
|
||||
* but if you need to drive a robot forward you would use getButtonPress(Button b).
|
||||
*/
|
||||
|
@ -196,7 +198,7 @@ public:
|
|||
|
||||
/**
|
||||
* Return the battery level of the Wiimote.
|
||||
* @return The barrey level in the range form 0-255.
|
||||
* @return The battery level in the range 0-255.
|
||||
*/
|
||||
uint8_t getBatteryLevel() { return batteryLevel; };
|
||||
/**
|
||||
|
@ -281,32 +283,68 @@ public:
|
|||
/** Initialises the camera as per the steps from: http://wiibrew.org/wiki/Wiimote#IR_Camera */
|
||||
void IRinitialize();
|
||||
|
||||
/** IR object 1 x position (0-1023). */
|
||||
/**
|
||||
* IR object 1 x-position read from the Wii IR camera.
|
||||
* @return The x-position of the object in the range 0-1023.
|
||||
*/
|
||||
uint16_t getIRx1() { return IR_object_x1; };
|
||||
/** IR object 1 y position (0-767). */
|
||||
/**
|
||||
* IR object 1 y-position read from the Wii IR camera.
|
||||
* @return The y-position of the object in the range 0-767.
|
||||
*/
|
||||
uint16_t getIRy1() { return IR_object_y1; };
|
||||
/** IR object 1 size (0-15). */
|
||||
/**
|
||||
* IR object 1 size read from the Wii IR camera.
|
||||
* @return The size of the object in the range 0-15.
|
||||
*/
|
||||
uint8_t getIRs1() { return IR_object_s1; };
|
||||
|
||||
/** IR object 2 x position (0-1023). */
|
||||
/**
|
||||
* IR object 2 x-position read from the Wii IR camera.
|
||||
* @return The x-position of the object in the range 0-1023.
|
||||
*/
|
||||
uint16_t getIRx2() { return IR_object_x2; };
|
||||
/** IR object 2 y position (0-767). */
|
||||
/**
|
||||
* IR object 2 y-position read from the Wii IR camera.
|
||||
* @return The y-position of the object in the range 0-767.
|
||||
*/
|
||||
uint16_t getIRy2() { return IR_object_y2; };
|
||||
/** IR object 2 size (0-15). */
|
||||
/**
|
||||
* IR object 2 size read from the Wii IR camera.
|
||||
* @return The size of the object in the range 0-15.
|
||||
*/
|
||||
uint8_t getIRs2() { return IR_object_s2; };
|
||||
|
||||
/** IR object 3 x position (0-1023). */
|
||||
/**
|
||||
* IR object 3 x-position read from the Wii IR camera.
|
||||
* @return The x-position of the object in the range 0-1023.
|
||||
*/
|
||||
uint16_t getIRx3() { return IR_object_x3; };
|
||||
/** IR object 3 y position (0-767). */
|
||||
/**
|
||||
* IR object 3 y-position read from the Wii IR camera.
|
||||
* @return The y-position of the object in the range 0-767.
|
||||
*/
|
||||
uint16_t getIRy3() { return IR_object_y3; };
|
||||
/** IR object 3 size (0-15). */
|
||||
/**
|
||||
* IR object 3 size read from the Wii IR camera.
|
||||
* @return The size of the object in the range 0-15.
|
||||
*/
|
||||
uint8_t getIRs3() { return IR_object_s3; };
|
||||
|
||||
/** IR object 4 x position (0-1023). */
|
||||
/**
|
||||
* IR object 4 x-position read from the Wii IR camera.
|
||||
* @return The x-position of the object in the range 0-1023.
|
||||
*/
|
||||
uint16_t getIRx4() { return IR_object_x4; };
|
||||
/** IR object 4 y position (0-767). */
|
||||
/**
|
||||
* IR object 4 y-position read from the Wii IR camera.
|
||||
* @return The y-position of the object in the range 0-767.
|
||||
*/
|
||||
uint16_t getIRy4() { return IR_object_y4; };
|
||||
/** IR object 4 size (0-15). */
|
||||
/**
|
||||
* IR object 4 size read from the Wii IR camera.
|
||||
* @return The size of the object in the range 0-15.
|
||||
*/
|
||||
uint8_t getIRs4() { return IR_object_s4; };
|
||||
|
||||
/**
|
||||
|
|
|
@ -56,7 +56,7 @@
|
|||
#define XBOX_MAX_ENDPOINTS 9
|
||||
|
||||
/**
|
||||
* This class implements support for a Xbox Wirless receiver.
|
||||
* This class implements support for a Xbox Wireless receiver.
|
||||
*
|
||||
* Up to four controllers can connect to one receiver, if more is needed one can use a second receiver via the USBHub class.
|
||||
*/
|
||||
|
|
Loading…
Reference in a new issue