Merge pull request #6 from stweedo/nav_testing

Nav testing
pull/2797/head
stweedo 2023-05-31 07:44:14 -05:00 committed by GitHub
commit b63e354e84
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 3 deletions

View File

@ -1,6 +1,7 @@
/* jshint esversion: 6 */
const distanceUnits = { // how many meters per X?
"m": 1,
"ft": 0.3048,
"yd": 0.9144,
"mi": 1609.34,
"km": 1000,
@ -160,7 +161,7 @@ var locales = {
currency_symbol: "$", currency_first: true,
int_curr_symbol: "USD",
speed: "mph",
distance: { 0: "m", 1: "mi" },
distance: { 0: "ft", 1: "mi" },
temperature: "°F",
ampm: { 0: "am", 1: "pm" },
timePattern: { 0: "%HH:%MM:%SS ", 1: "%HH:%MM" },

View File

@ -84,8 +84,8 @@ function showMapMessage(msg) {
if (msg.distance!==undefined)
distance = require("locale").distance(msg.distance);
if (msg.instr) {
if (msg.instr.includes("towards")) {
m = msg.instr.split("towards");
if (msg.instr.includes("towards") || msg.instr.includes("toward")) {
m = msg.instr.split(/towards|toward/);
target = m[0].trim();
street = m[1].trim();
}else