waypoints: add test mode

master
Pavel Machek 2024-11-22 20:38:43 +01:00
parent 8cf4fe4705
commit b41bc8a5d8
1 changed files with 12 additions and 2 deletions

View File

@ -136,7 +136,7 @@ let gps = {
emulator: -1, emulator: -1,
init: function(x) { init: function(x) {
this.emulator = (process.env.BOARD=="EMSCRIPTEN" this.emulator = (process.env.BOARD=="EMSCRIPTEN"
|| process.env.BOARD=="EMSCRIPTEN2")?1:0; || process.env.BOARD=="EMSCRIPTEN2")?1:1;
}, },
state: {}, state: {},
on_gps: function(f) { on_gps: function(f) {
@ -672,5 +672,15 @@ function addCard() {
fmt.init(); fmt.init();
gps.init(); gps.init();
function testArrow() {
arrow.name = "test";
arrow.waypoint.lat = 50;
arrow.waypoint.lon = 17;
goTo();
}
g.reset(); g.reset();
mainMenu(); if (0)
mainMenu();
else
testArrow();