msEventAcceleration (Structure) |
Top Previous Next |
Structure to configure detection of acceleration events. Used with msEventRegister,
If the acceleration is above (or below) the threshold for the selected duration, an acceleration event is raised. The accelerometer will continue to raise the event after each duration interval until the acceleration moves below (or above) the threshold again.
Use msWaitEvent and msReadEvent to receive the events.
Note: The threshold should be below the full scale resolution set with msAccEnable.
Fields: Threshold : FLOAT [0.0 .. 16.0] (default 0.3) The acceleration which each axis is compared against (in g).
Duration : DINT [1..5120] (default 100) Number of milliseconds the axis must be high/low before the axis condition is true.
Combined : BOOL (default FALSE) Whether all axis conditions should be true or just a single one before the event is raised.
XAbove : BOOL (default TRUE) Fire event when x-axis is above threshold for the duration.
XBelow : BOOL (default FALSE) Fire event when x-axis is below threshold for the duration.
YAbove : BOOL (default TRUE) Fire event when y-axis is above threshold for the duration.
YBelow : BOOL (default FALSE) Fire event when y-axis is below threshold for the duration.
ZAbove : BOOL (default TRUE) Fire event when z-axis is above threshold for the duration.
ZBelow : BOOL (default FALSE) Fire event when z-axis is below threshold for the duration.
Declaration: STRUCT_BLOCK msEventAcceleration; |