Return-Path: X-Original-To: apmail-cordova-commits-archive@www.apache.org Delivered-To: apmail-cordova-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 8838A10B78 for ; Mon, 19 Aug 2013 21:41:39 +0000 (UTC) Received: (qmail 3314 invoked by uid 500); 19 Aug 2013 21:41:39 -0000 Delivered-To: apmail-cordova-commits-archive@cordova.apache.org Received: (qmail 3281 invoked by uid 500); 19 Aug 2013 21:41:39 -0000 Mailing-List: contact commits-help@cordova.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cordova.apache.org Delivered-To: mailing list commits@cordova.apache.org Received: (qmail 3205 invoked by uid 99); 19 Aug 2013 21:41:39 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 19 Aug 2013 21:41:39 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id EC0A08BFF38; Mon, 19 Aug 2013 21:41:38 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: steven@apache.org To: commits@cordova.apache.org Date: Mon, 19 Aug 2013 21:41:45 -0000 Message-Id: <94c23b1ddea044cf87410648a3c8db17@git.apache.org> In-Reply-To: <0e2937c331cc45a19f69ff1983e7459b@git.apache.org> References: <0e2937c331cc45a19f69ff1983e7459b@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [8/9] git commit: [windows8] just pass back the code to fail, so we don't get nested error codes : code.code = 20 [windows8] just pass back the code to fail, so we don't get nested error codes : code.code = 20 Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-device-orientation/repo Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-device-orientation/commit/000ca836 Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-device-orientation/tree/000ca836 Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-device-orientation/diff/000ca836 Branch: refs/heads/master Commit: 000ca836f881af93b28edca90545d585df2af184 Parents: 1aec35e Author: purplecabbage Authored: Mon Aug 19 14:36:07 2013 -0700 Committer: purplecabbage Committed: Mon Aug 19 14:37:35 2013 -0700 ---------------------------------------------------------------------- src/windows8/CompassProxy.js | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cordova-plugin-device-orientation/blob/000ca836/src/windows8/CompassProxy.js ---------------------------------------------------------------------- diff --git a/src/windows8/CompassProxy.js b/src/windows8/CompassProxy.js index 6546939..718d811 100644 --- a/src/windows8/CompassProxy.js +++ b/src/windows8/CompassProxy.js @@ -1,4 +1,4 @@ -/* +cordova.define("org.apache.cordova.core.device-orientation.CompassProxy", function(require, exports, module) {/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file @@ -33,7 +33,7 @@ module.exports = { var deviceCompass = Windows.Devices.Sensors.Compass.getDefault(); if(!deviceCompass) { setTimeout(function(){ - lose(new CompassError(CompassError.COMPASS_NOT_SUPPORTED)); + lose(CompassError.COMPASS_NOT_SUPPORTED); },0); } else { @@ -42,18 +42,17 @@ module.exports = { this.onReadingChanged = function(e) { var reading = e.reading; - var heading = new CompassHeading(reading.headingMagneticNorth, reading.headingTrueNorth); + var heading = new CompassHeading(reading.headingMagneticNorth, reading.headingTrueNorth,null,reading.timestamp); win(heading); }; deviceCompass.addEventListener("readingchanged",this.onReadingChanged); } - }, stopHeading:function(win,lose) { var deviceCompass = Windows.Devices.Sensors.Compass.getDefault(); if(!deviceCompass) { setTimeout(function(){ - lose(new CompassError(CompassError.COMPASS_NOT_SUPPORTED)); + lose(CompassError.COMPASS_NOT_SUPPORTED); },0); } else { @@ -66,4 +65,4 @@ module.exports = { } }; -require("cordova/commandProxy").add("Compass",module.exports); \ No newline at end of file +require("cordova/commandProxy").add("Compass",module.exports);});