motion_sensor.inc
motion sensor.inc
CPP1/****h* PawnLibs/motion_sensor2 * Description3 * Interfaces for getting motion sensor data. Motion sensors are useful for4 * monitoring module movement. Supported sensor data types:5 * * accelerometer - acceleration force along 3 axis, measured in m/s^2, range6 * +- 2g TBD: currently raw data is provided, should be redesigned7 * * gyroscope - rate of rotation around 3 axis, measured in rad/s, range8 * +-2000 dps TBD: currently raw data is provided, should be redesigned9 * * shake - count of shakes in the sequence10 * * pat - count of pats in the sequence11 ******/1213/****e* PawnLibs/motion_sensor/ON_Pat14 * Summary15 * Pats handler.16 * Synopsis17 */18forward ON_Tap(const count, const display, const bool:opposite);19forward ON_Pat(const count, const display, const bool:opposite);20/*21 * Description22 * Public function with such signature will be called when the pats sequence23 * is detected.24 * Inputs25 * * count - how many pats there are in the pats sequence26 * * display - TBD: currently most recent pats axis27 * * opposite - true, if most recent pat was detected from the opposite side28 * of cube29 * History30 * * v6.2 - ON_Tap is deprecated, added ON_Pat alias31 ******/3233/****n* PawnLibs/motion_sensor/MS_getFaceAccelX34 * Summary35 * Get accelerometer value along X axis of some display.36 * Synopsis37 */38native MS_getFaceAccelX(const display);39/* Inputs40 * * display - for which accelerometer value will be returned41 * Return value42 * Accelerometer value along X axis.43 ******/4445/****n* PawnLibs/motion_sensor/MS_getFaceAccelY46 * Summary47 * Get accelerometer value along Y axis of some display.48 * Synopsis49 */50native MS_getFaceAccelY(const display);51/* Inputs52 * * display - for which accelerometer value will be returned53 * Return value54 * Accelerometer value along Y axis.55 ******/5657/****n* PawnLibs/motion_sensor/MS_getFaceAccelZ58 * Summary59 * Get accelerometer value along Z axis of some display.60 * Synopsis61 */62native MS_getFaceAccelZ(const display);63/*64 * Description65 * Z axis directed towards the center of the cube - TBD: check.66 * Inputs67 * * display - for which accelerometer value will be returned68 * Return value69 * Accelerometer value along Z axis.70 ******/7172/****n* PawnLibs/motion_sensor/MS_getFaceGyroX73 * Summary74 * Get gyroscope value around X axis of some display.75 * Synopsis76 */77native MS_getFaceGyroX(const display);78/*79 * Description80 * Value increases clockwise - TBD: check.81 * Inputs82 * * display - for which gyroscope value will be returned83 * Return value84 * Gyroscope value around X axis.85 ******/8687/****n* PawnLibs/motion_sensor/MS_getFaceGyroY88 * Summary89 * Get gyroscope value around Y axis of some display.90 * Synopsis91 */92native MS_getFaceGyroY(const display);93/*94 * Description95 * Value increases clockwise - TBD: check.96 * Inputs97 * * display - for which gyroscope value will be returned98 * Return value99 * Gyroscope value around Y axis.100 ******/101102/****n* PawnLibs/motion_sensor/MS_getFaceGyroZ103 * Summary104 * Get gyroscope value around Z axis of some display.105 * Synopsis106 */107native MS_getFaceGyroZ(const display);108/*109 * Description110 * Value increases clockwise - TBD: check.111 * Inputs112 * * display - for which gyroscope value will be returned113 * Return value114 * Gyroscope value around Z axis.115 ******/116117
Wrapped for easier reading. Turn wrap off to inspect exact line lengths.