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 * * tap - count of taps in the sequence11 ******/1213/****e* PawnLibs/motion_sensor/ON_Shake14 * Summary15 * Shakes handler.16 * Synopsis17 */18forward ON_Shake(const count);19/*20 * Description21 * Public function with such signature will be called when the shakes sequence22 * is detected. Shake is a continuous significant motion which direction has23 * been changed since the previous recent shake. TBD: current implementation24 * works ineffective, should be redesigned.25 * Inputs26 * * count - how many shakes there are in the shakes sequence27 * See also28 * * SENSITIVITY_MENU_CHANGE_SCRIPT29 * * quit()30 ******/3132/****e* PawnLibs/motion_sensor/ON_Tap33 * Summary34 * Taps handler.35 * Synopsis36 */37forward ON_Tap(const count, const display, const bool:opposite);38/*39 * Description40 * Public function with such signature will be called when the taps sequence41 * is detected.42 * Inputs43 * * count - how many taps there are in the taps sequence44 * * display - TBD: currently most recent taps axis45 * * opposite - true, if most recenttap was detected from the opposite side of46 * cube47 ******/4849/****n* PawnLibs/motion_sensor/MS_getFaceAccelX50 * Summary51 * Get accelerometer value along X axis of some display.52 * Synopsis53 */54native MS_getFaceAccelX(const display);55/* Inputs56 * * display - for which accelerometer value will be returned57 * Return value58 * Accelerometer value along X axis.59 ******/6061/****n* PawnLibs/motion_sensor/MS_getFaceAccelY62 * Summary63 * Get accelerometer value along Y axis of some display.64 * Synopsis65 */66native MS_getFaceAccelY(const display);67/* Inputs68 * * display - for which accelerometer value will be returned69 * Return value70 * Accelerometer value along Y axis.71 ******/7273/****n* PawnLibs/motion_sensor/MS_getFaceAccelZ74 * Summary75 * Get accelerometer value along Z axis of some display.76 * Synopsis77 */78native MS_getFaceAccelZ(const display);79/*80 * Description81 * Z axis directed towards the center of the cube - TBD: check.82 * Inputs83 * * display - for which accelerometer value will be returned84 * Return value85 * Accelerometer value along Z axis.86 ******/8788/****n* PawnLibs/motion_sensor/MS_getFaceGyroX89 * Summary90 * Get gyroscope value around X axis of some display.91 * Synopsis92 */93native MS_getFaceGyroX(const display);94/*95 * Description96 * Value increases clockwise - TBD: check.97 * Inputs98 * * display - for which gyroscope value will be returned99 * Return value100 * Gyroscope value around X axis.101 ******/102103/****n* PawnLibs/motion_sensor/MS_getFaceGyroY104 * Summary105 * Get gyroscope value around Y axis of some display.106 * Synopsis107 */108native MS_getFaceGyroY(const display);109/*110 * Description111 * Value increases clockwise - TBD: check.112 * Inputs113 * * display - for which gyroscope value will be returned114 * Return value115 * Gyroscope value around Y axis.116 ******/117118/****n* PawnLibs/motion_sensor/MS_getFaceGyroZ119 * Summary120 * Get gyroscope value around Z axis of some display.121 * Synopsis122 */123native MS_getFaceGyroZ(const display);124/*125 * Description126 * Value increases clockwise - TBD: check.127 * Inputs128 * * display - for which gyroscope value will be returned129 * Return value130 * Gyroscope value around Z axis.131 ******/132133
Wrapped for easier reading. Turn wrap off to inspect exact line lengths.