Skip to content

Commit b0cc347

Browse files
committed
add releases folder
1 parent fa66daa commit b0cc347

File tree

4 files changed

+27
-9
lines changed

4 files changed

+27
-9
lines changed

Diff for: releases/touchless-map-1.0.2.apk

2.45 MB
Binary file not shown.

Diff for: www/index.html

-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
<link href="lib/ionic/css/ionic.css" rel="stylesheet">
99
<link href="css/style.css" rel="stylesheet">
1010
<link href="css/leaflet.css" rel="stylesheet">
11-
<link href="css/leaflet.css" rel="stylesheet">
1211
<link href="css/leaflet-easy-button.css" rel="stylesheet">
1312

1413
<!-- IF using Sass (run gulp sass first), then uncomment below and remove the CSS includes above

Diff for: www/js/controllers/map_controller.js

+22-7
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ touchlessApp.controller('mapCtrl', ['$scope', 'leafletData', 'persistentAppSetti
6666
var gz = 0
6767
var zoomSensitivity, moveSensitivity // updated in stateChangeSuccess callback to be properly expired when edited in settingss
6868

69-
var gzHistory = [9.8, 9.8, 9.8, 9.8, 9.8, 9.8, 9.8, 9.8, 9.8, 9.8, 9.8, 9.8, 9.8, 9.8, 9.8, 9.8, 9.8, 9.8, 9.8, 9.8]
69+
var gzHistory = [9.8, 9.8, 9.8, 9.8, 9.8, 9.8, 9.8, 9.8, 9.8, 9.8]
7070

7171
var avg = function(arr){
7272
var sum = arr.reduce(function(a, b) { return a + b; });
@@ -80,16 +80,19 @@ touchlessApp.controller('mapCtrl', ['$scope', 'leafletData', 'persistentAppSetti
8080
return(notUsingMoveX && notUsingMoveY && notReturningFromVerticalPosition)
8181
}
8282

83+
84+
8385
inZoomInAcceleration = function(){
84-
var movingUpFirst = avg(gzHistory.slice(0,11)) > (11.5 - zoomSensitivity*2)
85-
var movingDownLater = avg(gzHistory.slice(11,20)) < (7.5 + zoomSensitivity*2)
86-
return(movingUpFirst && movingDownLater)
86+
87+
88+
return(false)
89+
//var movingUpFirst = avg(gzHistory.slice(0,11)) > (11.5 - zoomSensitivity*2)
90+
//var movingDownLater = avg(gzHistory.slice(11,20)) < (7.5 + zoomSensitivity*2)
91+
//return(movingUpFirst && movingDownLater)
8792
}
8893

8994
inZoomOutAcceleration = function(){
90-
var movingDownFirst = avg(gzHistory.slice(0,11)) < (7.5 + zoomSensitivity*2)
91-
var movingUpLater = avg(gzHistory.slice(11,20)) > (11.5 - zoomSensitivity*2)
92-
return(movingDownFirst && movingUpLater)
95+
return(false)
9396
}
9497

9598
isZoomTime = function(){
@@ -112,6 +115,9 @@ touchlessApp.controller('mapCtrl', ['$scope', 'leafletData', 'persistentAppSetti
112115
var now = Date.now()
113116
return((now - lastMovedAt > 300) && (now - lastZoomedInAt > 700) && (now - lastZoomedOutAt > 700) && (now - lastShakedAt > 1000))
114117
}
118+
119+
$scope.zSpeed = 0
120+
115121
function onAccelerationUpdated(acceleration) {
116122

117123
gx = acceleration.x
@@ -121,6 +127,15 @@ touchlessApp.controller('mapCtrl', ['$scope', 'leafletData', 'persistentAppSetti
121127
gzHistory.shift()
122128

123129
$scope.$apply(function(){
130+
131+
var zs = 0
132+
for(i = 0; i< gzHistory.length; i++){
133+
zs += gzHistory[i] - 9.5
134+
}
135+
136+
$scope.zSpeed = Math.round(zs*1000)/1000.0
137+
138+
124139
try{
125140
if( inZoomPosition() && isZoomTime() ){
126141
if(inZoomInAcceleration()){

Diff for: www/templates/map.html

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
11
<ion-view title="Touchless Map" >
22
<ion-content data-tap-disabled="true" >
3-
<leaflet width="100%" height="100%"
3+
<div>
4+
<h1>{{zSpeed}}</h1>
5+
</div>
6+
<leaflet width="100%" height="80%"
47
center="center"
58
tiles="tiles"
69
defaults="defaults"
710
attribution="attribution" ></leaflet>
11+
812
</ion-content>
913
</ion-view>

0 commit comments

Comments
 (0)