Merge pull request #2923 from wagnerf42/master
gipy: new release : bugfix for negative coordinates + experimental powersavingmaster
commit
49b3ab18b6
|
|
@ -87,3 +87,14 @@
|
|||
* Reduce framerate if locked
|
||||
* Stroke to move around in the map
|
||||
* Fix for missing paths in display
|
||||
|
||||
0.20:
|
||||
* Large display for instant speed
|
||||
* Bugfix for negative coordinates
|
||||
* Disable menu while the map is not loaded
|
||||
* Turn screen off while idling to save battery (with setting)
|
||||
* New setting : disable buzz on turns
|
||||
* New setting : turn bluetooth off to save battery
|
||||
* New setting : power screen off between points to save battery
|
||||
* Color change for lost direction (now purple)
|
||||
* Adaptive screen powersaving
|
||||
|
|
|
|||
|
|
@ -18,8 +18,8 @@ It provides the following features :
|
|||
- display the path with current position from gps
|
||||
- display a local map around you, downloaded from openstreetmap
|
||||
- detects and buzzes if you leave the path
|
||||
- buzzes before sharp turns
|
||||
- buzzes before waypoints
|
||||
- (optional) buzzes before sharp turns
|
||||
- (optional) buzzes before waypoints
|
||||
(for example when you need to turn in https://mapstogpx.com/)
|
||||
- display instant / average speed
|
||||
- display distance to next point
|
||||
|
|
@ -51,8 +51,8 @@ Your path will be displayed in svg.
|
|||
### Starting Gipy
|
||||
|
||||
At start you will have a menu for selecting your trace (if more than one).
|
||||
Choose the one you want and you will reach the splash screen where you'll wait for the gps signal.
|
||||
Once you have a signal you will reach the main screen:
|
||||
Choose the one you want and you will reach the splash screen where you'll wait for the map.
|
||||
Once the map is loaded you will reach the main screen:
|
||||
|
||||

|
||||
|
||||
|
|
@ -83,7 +83,7 @@ On your screen you can see:
|
|||
### Lost
|
||||
|
||||
If you stray away from path we will rescale the display to continue displaying nearby segments and
|
||||
display the direction to follow as a black segment.
|
||||
display the direction to follow as a purple segment.
|
||||
|
||||
Note that while lost, the app will slow down a lot since it will start scanning all possible points to figure out where you
|
||||
are. On path it just needed to scan a few points ahead and behind.
|
||||
|
|
@ -93,13 +93,18 @@ The distance to next point displayed corresponds to the length of the black segm
|
|||
### Menu
|
||||
|
||||
If you click the button you'll reach a menu where you can currently zoom out to see more of the map
|
||||
(with a slower refresh rate) and reverse the path direction.
|
||||
(with a slower refresh rate), reverse the path direction and disable power saving (keeping backlight on).
|
||||
|
||||
### Settings
|
||||
|
||||
Few settings for now (feel free to suggest me more) :
|
||||
|
||||
- lost distance : at which distance from path are you considered to be lost ?
|
||||
- buzz on turns : should the watch buzz when reaching a waypoint ?
|
||||
- disable bluetooth : turn bluetooth off completely to try to save some power.
|
||||
- brightness : how bright should screen be ? (by default 0.5, again saving power)
|
||||
- power lcd off (disabled by default): turn lcd off when inactive to save power. the watch will wake up when reaching points,
|
||||
when you touch the screen and when speed is below 13km/h.
|
||||
|
||||
### Caveats
|
||||
|
||||
|
|
@ -107,6 +112,7 @@ It is good to use but you should know :
|
|||
|
||||
- the gps might take a long time to start initially (see the assisted gps update app).
|
||||
- gps signal is noisy : there is therefore a small delay for instant speed. sometimes you may jump somewhere else.
|
||||
- if you adventure in gorges the gps signal will become garbage.
|
||||
- your gpx trace has been decimated and approximated : the **REAL PATH** might be **A FEW METERS AWAY**
|
||||
- sometimes the watch will tell you that you are lost but you are in fact on the path. It usually figures again
|
||||
the real gps position after a few minutes. It usually happens when the signal is acquired very fast.
|
||||
|
|
@ -119,4 +125,8 @@ I had to go back uphill by quite a distance.
|
|||
|
||||
Feel free to give me feedback : is it useful for you ? what other features would you like ?
|
||||
|
||||
If you want to raise issues the main repository is [https://github.com/wagnerf42/BangleApps](here) and
|
||||
the rust code doing the actual map computations is located [https://github.com/wagnerf42/gps](here).
|
||||
You can try the cutting edge version at [https://wagnerf42.github.io/BangleApps/](https://wagnerf42.github.io/BangleApps/)
|
||||
|
||||
frederic.wagner@imag.fr
|
||||
|
|
|
|||
|
|
@ -1,19 +1,51 @@
|
|||
*** thoughts on lcd power ***
|
||||
|
||||
so, i tried experimenting with turning the lcd off in order to save power.
|
||||
|
||||
the good news: this saves a lot. i did a 3h ride which usually depletes the battery and I still had
|
||||
around two more hours to go.
|
||||
|
||||
now the bad news:
|
||||
|
||||
- i had to de-activate the twist detection : you cannot raise your watch to the eyes to turn it on.
|
||||
that's because with twist detection on all road bumps turn the watch on constantly.
|
||||
- i tried manual detection like :
|
||||
|
||||
Bangle.on('accel', function(xyz) {
|
||||
|
||||
if (xyz.diff > 0.4 && xyz.mag > 1 && xyz.z < -1.4) {
|
||||
Bangle.setLCDPower(true);
|
||||
Bangle.setLocked(false);
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
this works nicely when you sit on a chair with a simulated gps signal but does not work so nicely when on the bike.
|
||||
sometimes it is ok, sometimes you can try 10 times with no success.
|
||||
|
||||
- instead i use screen touch to turn it on. that's a bother since you need two hands but well it could be worth it.
|
||||
the problem is in the delay: between 1 and 5 seconds before the screen comes back on.
|
||||
|
||||
|
||||
my conclusion is that:
|
||||
|
||||
* we should not turn screen off unless we agree to have an unresponsive ui
|
||||
* we should maybe autowake near segments ends and when lost
|
||||
* we should play with backlight instead
|
||||
|
||||
|
||||
**************************
|
||||
|
||||
+ when you walk the direction still has a tendency to shift
|
||||
|
||||
+ put back foot only ways
|
||||
+ try fiddling with jit
|
||||
+ put back street names
|
||||
+ put back shortest paths but with points cache this time and jit
|
||||
+ how to display paths from shortest path ?
|
||||
|
||||
|
||||
misc:
|
||||
+ use Bangle.project(latlong)
|
||||
|
||||
* additional features
|
||||
|
||||
- config screen
|
||||
- are we on foot (and should use compass)
|
||||
|
||||
- we need to buzz 200m before sharp turns (or even better, 30seconds)
|
||||
(and look at more than next point)
|
||||
|
||||
- display distance to next water/toilet ?
|
||||
- display scale (100m)
|
||||
|
||||
- compress path ?
|
||||
|
||||
* misc
|
||||
|
||||
- code is becoming messy
|
||||
|
|
|
|||
423
apps/gipy/app.js
423
apps/gipy/app.js
File diff suppressed because one or more lines are too long
|
|
@ -2,7 +2,7 @@
|
|||
"id": "gipy",
|
||||
"name": "Gipy",
|
||||
"shortName": "Gipy",
|
||||
"version": "0.19",
|
||||
"version": "0.20",
|
||||
"description": "Follow gpx files using the gps. Don't get lost in your bike trips and hikes.",
|
||||
"allow_emulator":false,
|
||||
"icon": "gipy.png",
|
||||
|
|
|
|||
|
|
@ -67,11 +67,11 @@ export interface InitOutput {
|
|||
readonly __wbindgen_malloc: (a: number) => number;
|
||||
readonly __wbindgen_realloc: (a: number, b: number, c: number) => number;
|
||||
readonly __wbindgen_export_2: WebAssembly.Table;
|
||||
readonly _dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hab13c10d53cd1c5a: (a: number, b: number, c: number) => void;
|
||||
readonly _dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__heb2f4d39a212d7d1: (a: number, b: number, c: number) => void;
|
||||
readonly __wbindgen_add_to_stack_pointer: (a: number) => number;
|
||||
readonly __wbindgen_free: (a: number, b: number) => void;
|
||||
readonly __wbindgen_exn_store: (a: number) => void;
|
||||
readonly wasm_bindgen__convert__closures__invoke2_mut__h26ce002f44a5439b: (a: number, b: number, c: number, d: number) => void;
|
||||
readonly wasm_bindgen__convert__closures__invoke2_mut__h362f82c7669db137: (a: number, b: number, c: number, d: number) => void;
|
||||
}
|
||||
|
||||
export type SyncInitInput = BufferSource | WebAssembly.Module;
|
||||
|
|
|
|||
|
|
@ -205,7 +205,7 @@ function makeMutClosure(arg0, arg1, dtor, f) {
|
|||
return real;
|
||||
}
|
||||
function __wbg_adapter_24(arg0, arg1, arg2) {
|
||||
wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hab13c10d53cd1c5a(arg0, arg1, addHeapObject(arg2));
|
||||
wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__heb2f4d39a212d7d1(arg0, arg1, addHeapObject(arg2));
|
||||
}
|
||||
|
||||
function _assertClass(instance, klass) {
|
||||
|
|
@ -369,7 +369,7 @@ function handleError(f, args) {
|
|||
}
|
||||
}
|
||||
function __wbg_adapter_84(arg0, arg1, arg2, arg3) {
|
||||
wasm.wasm_bindgen__convert__closures__invoke2_mut__h26ce002f44a5439b(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
|
||||
wasm.wasm_bindgen__convert__closures__invoke2_mut__h362f82c7669db137(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -460,6 +460,21 @@ function getImports() {
|
|||
const ret = getObject(arg0).fetch(getObject(arg1));
|
||||
return addHeapObject(ret);
|
||||
};
|
||||
imports.wbg.__wbg_signal_31753ac644b25fbb = function(arg0) {
|
||||
const ret = getObject(arg0).signal;
|
||||
return addHeapObject(ret);
|
||||
};
|
||||
imports.wbg.__wbg_new_6396e586b56e1dff = function() { return handleError(function () {
|
||||
const ret = new AbortController();
|
||||
return addHeapObject(ret);
|
||||
}, arguments) };
|
||||
imports.wbg.__wbg_abort_064ae59cda5cd244 = function(arg0) {
|
||||
getObject(arg0).abort();
|
||||
};
|
||||
imports.wbg.__wbg_newwithstrandinit_05d7180788420c40 = function() { return handleError(function (arg0, arg1, arg2) {
|
||||
const ret = new Request(getStringFromWasm0(arg0, arg1), getObject(arg2));
|
||||
return addHeapObject(ret);
|
||||
}, arguments) };
|
||||
imports.wbg.__wbg_new_2d0053ee81e4dd2a = function() { return handleError(function () {
|
||||
const ret = new Headers();
|
||||
return addHeapObject(ret);
|
||||
|
|
@ -496,21 +511,6 @@ function getImports() {
|
|||
const ret = getObject(arg0).text();
|
||||
return addHeapObject(ret);
|
||||
}, arguments) };
|
||||
imports.wbg.__wbg_signal_31753ac644b25fbb = function(arg0) {
|
||||
const ret = getObject(arg0).signal;
|
||||
return addHeapObject(ret);
|
||||
};
|
||||
imports.wbg.__wbg_new_6396e586b56e1dff = function() { return handleError(function () {
|
||||
const ret = new AbortController();
|
||||
return addHeapObject(ret);
|
||||
}, arguments) };
|
||||
imports.wbg.__wbg_abort_064ae59cda5cd244 = function(arg0) {
|
||||
getObject(arg0).abort();
|
||||
};
|
||||
imports.wbg.__wbg_newwithstrandinit_05d7180788420c40 = function() { return handleError(function (arg0, arg1, arg2) {
|
||||
const ret = new Request(getStringFromWasm0(arg0, arg1), getObject(arg2));
|
||||
return addHeapObject(ret);
|
||||
}, arguments) };
|
||||
imports.wbg.__wbg_new_abda76e883ba8a5f = function() {
|
||||
const ret = new Error();
|
||||
return addHeapObject(ret);
|
||||
|
|
@ -675,8 +675,8 @@ function getImports() {
|
|||
const ret = wasm.memory;
|
||||
return addHeapObject(ret);
|
||||
};
|
||||
imports.wbg.__wbindgen_closure_wrapper2298 = function(arg0, arg1, arg2) {
|
||||
const ret = makeMutClosure(arg0, arg1, 260, __wbg_adapter_24);
|
||||
imports.wbg.__wbindgen_closure_wrapper2245 = function(arg0, arg1, arg2) {
|
||||
const ret = makeMutClosure(arg0, arg1, 267, __wbg_adapter_24);
|
||||
return addHeapObject(ret);
|
||||
};
|
||||
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -12,8 +12,8 @@ export function gps_from_area(a: number, b: number, c: number, d: number): numbe
|
|||
export function __wbindgen_malloc(a: number): number;
|
||||
export function __wbindgen_realloc(a: number, b: number, c: number): number;
|
||||
export const __wbindgen_export_2: WebAssembly.Table;
|
||||
export function _dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hab13c10d53cd1c5a(a: number, b: number, c: number): void;
|
||||
export function _dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__heb2f4d39a212d7d1(a: number, b: number, c: number): void;
|
||||
export function __wbindgen_add_to_stack_pointer(a: number): number;
|
||||
export function __wbindgen_free(a: number, b: number): void;
|
||||
export function __wbindgen_exn_store(a: number): void;
|
||||
export function wasm_bindgen__convert__closures__invoke2_mut__h26ce002f44a5439b(a: number, b: number, c: number, d: number): void;
|
||||
export function wasm_bindgen__convert__closures__invoke2_mut__h362f82c7669db137(a: number, b: number, c: number, d: number): void;
|
||||
|
|
|
|||
|
|
@ -1,9 +1,12 @@
|
|||
(function (back) {
|
||||
(function(back) {
|
||||
var FILE = "gipy.json";
|
||||
// Load settings
|
||||
var settings = Object.assign(
|
||||
{
|
||||
var settings = Object.assign({
|
||||
lost_distance: 50,
|
||||
buzz_on_turns: false,
|
||||
disable_bluetooth: true,
|
||||
brightness: 0.5,
|
||||
power_lcd_off: false,
|
||||
},
|
||||
require("Storage").readJSON(FILE, true) || {}
|
||||
);
|
||||
|
|
@ -14,16 +17,50 @@
|
|||
|
||||
// Show the menu
|
||||
E.showMenu({
|
||||
"": { title: "Gipy" },
|
||||
"": {
|
||||
title: "Gipy"
|
||||
},
|
||||
"< Back": () => back(),
|
||||
/*LANG*/"buzz on turns": {
|
||||
value: settings.buzz_on_turns == true,
|
||||
onchange: (v) => {
|
||||
settings.buzz_on_turns = v;
|
||||
writeSettings();
|
||||
}
|
||||
},
|
||||
/*LANG*/"disable bluetooth": {
|
||||
value: settings.disable_bluetooth == true,
|
||||
onchange: (v) => {
|
||||
settings.disable_bluetooth = v;
|
||||
writeSettings();
|
||||
}
|
||||
},
|
||||
"lost distance": {
|
||||
value: 50 | settings.lost_distance, // 0| converts undefined to 0
|
||||
value: settings.lost_distance,
|
||||
min: 10,
|
||||
max: 500,
|
||||
onchange: (v) => {
|
||||
settings.max_speed = v;
|
||||
settings.lost_distance = v;
|
||||
writeSettings();
|
||||
},
|
||||
},
|
||||
"brightness": {
|
||||
value: settings.brightness,
|
||||
min: 0,
|
||||
max: 1,
|
||||
step: 0.1,
|
||||
onchange: (v) => {
|
||||
settings.brightness = v;
|
||||
writeSettings();
|
||||
},
|
||||
},
|
||||
|
||||
/*LANG*/"power lcd off": {
|
||||
value: settings.power_lcd_off == true,
|
||||
onchange: (v) => {
|
||||
settings.power_lcd_off = v;
|
||||
writeSettings();
|
||||
}
|
||||
},
|
||||
});
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in New Issue