You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by st...@apache.org on 2013/08/19 23:41:45 UTC

[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 <pu...@gmail.com>
Authored: Mon Aug 19 14:36:07 2013 -0700
Committer: purplecabbage <pu...@gmail.com>
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);});