| 0 | 13 |
new file mode 100644 |
| ... | ... |
@@ -0,0 +1,24 @@ |
| 1 |
+{
|
|
| 2 |
+ "name": "bike_companion", |
|
| 3 |
+ "version": "1.0.0", |
|
| 4 |
+ "lockfileVersion": 2, |
|
| 5 |
+ "requires": true, |
|
| 6 |
+ "packages": {
|
|
| 7 |
+ "": {
|
|
| 8 |
+ "name": "bike_companion", |
|
| 9 |
+ "version": "1.0.0", |
|
| 10 |
+ "dependencies": {
|
|
| 11 |
+ "pebble-clay": "^1.0.0" |
|
| 12 |
+ } |
|
| 13 |
+ }, |
|
| 14 |
+ "node_modules/pebble-clay": {
|
|
| 15 |
+ "version": "1.0.4", |
|
| 16 |
+ "license": "MIT" |
|
| 17 |
+ } |
|
| 18 |
+ }, |
|
| 19 |
+ "dependencies": {
|
|
| 20 |
+ "pebble-clay": {
|
|
| 21 |
+ "version": "1.0.4" |
|
| 22 |
+ } |
|
| 23 |
+ } |
|
| 24 |
+} |
| ... | ... |
@@ -21,8 +21,8 @@ var firstlocationOptions = {
|
| 21 | 21 |
}; |
| 22 | 22 |
var locationOptions = {
|
| 23 | 23 |
'enableHighAccuracy': true, // default = false (quick and dirty mode), can be true (more accurate but need more power and time) |
| 24 |
- 'timeout': 5000, //5s timeout to get a good signal |
|
| 25 |
- 'maximumAge': 0 // no cache |
|
| 24 |
+ 'timeout': 10000, // ms timeout to get a good signal |
|
| 25 |
+ 'maximumAge': 5000 // location can be x milliseconds old |
|
| 26 | 26 |
}; |
| 27 | 27 |
|
| 28 | 28 |
Pebble.addEventListener('showConfiguration', function(e) {
|
| ... | ... |
@@ -485,11 +485,11 @@ function locationSuccess(new_pos) {
|
| 485 | 485 |
|
| 486 | 486 |
//console.log("split num : " + speed);
|
| 487 | 487 |
if (isNaN(speed)) {
|
| 488 |
- speedString = "---"; |
|
| 488 |
+ speedString = "-.-"; |
|
| 489 | 489 |
} else {
|
| 490 | 490 |
speedString = splitFloatNumber(speed)[0].toString().substring(0, 3) + "." + splitFloatNumber(speed)[1].toString().substring(0, 1); |
| 491 | 491 |
if (speedString == "0.N") {
|
| 492 |
- speedString = "0.0"; |
|
| 492 |
+ speedString = "0.-"; |
|
| 493 | 493 |
} |
| 494 | 494 |
|
| 495 | 495 |
//console.log("split num : " + getMaxSpeed(speed));
|