stop: function()

in src/windows/AccelerometerProxy.js [58:71]


    stop: function (win, lose) {
        win = win || function () {};
        var accel = Windows.Devices.Sensors.Accelerometer.getDefault();
        if (!accel) {
            if (lose) {
                lose('No accelerometer found');
            }
        } else {
            accel.removeEventListener('readingchanged', this.onDataChanged);
            this.onDataChanged = null;
            accel.reportInterval = 0; // back to the default
            win();
        }
    }