incubator-callback-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Git at Apache <...@git.apache.org>
Subject incubator-cordova-ios pull request: Fixes cb-361 & use timeout to turn off ...
Date Tue, 03 Apr 2012 20:18:31 GMT
GitHub user becka11y opened the pull request at
https://github.com/apache/incubator-cordova-ios/pull/9

----
Fixes cb-361 & use timeout to turn off compass sensor

Update for unified JS to remove headingRepeats parameter and
refactored to use timeout to turn off heading sensor (matches current implementation
of Android).
Updated to pass options.filter into getHeading to indicate a watch by Filter request

While we may refactor in a future release not to rely on a timeout, I had to make some change
in order for the sensor to be turned off since previous to the unified JS, iOS was relying
on a repeats parameter that no longer exists.  I used a timeout option to be consistent with
the current Android implementation. 

As discussed on the list, I added suppor for watching the iOS compass via a filter value but
hacking the options.filter parameter into the call to getHeading.  If there is a filter param,
 call watchHeadingFilter to start monitoring compass changes based on the filter.  This also
requires a change to the UnifiedJS compass.js (see https://github.com/becka11y/incubator-cordova-js/tree/watchFilter)
 That branch needs work to fix the unit tests before committing. 
----

You can merge this pull request into a Git repository by running
$ git pull https://github.com/becka11y/incubator-cordova-ios watchFilter

Alternatively you can review and apply these changes as the patch at
https://github.com/apache/incubator-cordova-ios/pull/9.patch


Mime
View raw message