Magnetometer.ReadingChanged Magnetometer.ReadingChanged Magnetometer.ReadingChanged Magnetometer.ReadingChanged Magnetometer.ReadingChanged Event

Definition

Occurs each time the compass reports a new sensor reading.

public : event TypedEventHandler<Magnetometer, MagnetometerReadingChangedEventArgs> ReadingChanged
// Register
event_token ReadingChanged(TypedEventHandler<Magnetometer, MagnetometerReadingChangedEventArgs> const& handler) const;

// Revoke with event_token
void ReadingChanged(event_token const& cookie) const;

// Revoke with event_revoker
ReadingChanged_revoker ReadingChanged(auto_revoke_t, TypedEventHandler<Magnetometer, MagnetometerReadingChangedEventArgs> const& handler) const;
public event TypedEventHandler<Magnetometer, MagnetometerReadingChangedEventArgs> ReadingChanged
Public Event ReadingChanged As TypedEventHandler (Of Magnetometer, MagnetometerReadingChangedEventArgs)
function onReadingChanged(eventArgs){/* Your code */}


magnetometer.addEventListener("readingchanged", onReadingChanged);
magnetometer.removeEventListener("readingchanged", onReadingChanged);

Remarks

An application may register this event handler to obtain sensor readings. The application must establish a desired ReportInterval. This informs the sensor driver that resources should be allocated to satisfy the requirements of the application.

Applications can set the frequency of this event by setting the ReportInterval property.