Skip to content

Commit e7be985

Browse files
author
Daniel K. O. (dkosmari)
committed
- Renamed "accelorometer" to "accelerometer".
- Added documentation for VPADAccStatus.
1 parent c9a7a4a commit e7be985

1 file changed

Lines changed: 12 additions & 4 deletions

File tree

include/vpad/input.h

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -248,9 +248,17 @@ WUT_CHECK_SIZE(VPADTouchData, 0x08);
248248

249249
struct VPADAccStatus
250250
{
251+
//! 1.0 = 1 g (Earth's gravitational acceleration.)
251252
VPADVec3D acc;
253+
//! Length of the `acc` vector.
252254
float magnitude;
255+
//! Lenght of the `current.acc - previous.acc` vector.
253256
float variation;
257+
/**
258+
* "Verticality" of the gamepad.
259+
* - `.x` is in `[0, +1]`, where `0` means it's being held vertically, `+1` means it's laying flat on a surface.
260+
* - `.y` is in `[-1, +1]`, where `+1` means the screen is vertical normally, `-1` means the screen is upside down.
261+
*/
254262
VPADVec2D vertical;
255263
};
256264
WUT_CHECK_OFFSET(VPADAccStatus, 0x00, acc);
@@ -276,10 +284,10 @@ struct VPADStatus
276284
//! Position of right analog stick.
277285
VPADVec2D rightStick;
278286

279-
//! Status of DRC accelorometer.
280-
VPADAccStatus accelorometer;
287+
//! Status of DRC accelerometer.
288+
VPADAccStatus accelerometer;
281289

282-
//! Status of DRC gyro. 1.0 = 360°
290+
//! Status of DRC gyro. 1.0 = 360° per second.
283291
VPADVec3D gyro;
284292

285293
//! Status of DRC angle. 1.0 = 360°
@@ -328,7 +336,7 @@ WUT_CHECK_OFFSET(VPADStatus, 0x04, trigger);
328336
WUT_CHECK_OFFSET(VPADStatus, 0x08, release);
329337
WUT_CHECK_OFFSET(VPADStatus, 0x0C, leftStick);
330338
WUT_CHECK_OFFSET(VPADStatus, 0x14, rightStick);
331-
WUT_CHECK_OFFSET(VPADStatus, 0x1C, accelorometer);
339+
WUT_CHECK_OFFSET(VPADStatus, 0x1C, accelerometer);
332340
WUT_CHECK_OFFSET(VPADStatus, 0x38, gyro);
333341
WUT_CHECK_OFFSET(VPADStatus, 0x44, angle);
334342
WUT_CHECK_OFFSET(VPADStatus, 0x50, error);

0 commit comments

Comments
 (0)