Avatar for DerGuteWolf

DerGuteWolf

Member since Mar 2020 • Last active Mar 2020
  • 2 conversations
  • 8 comments

Most recent activity

  • in Bangle.js
    Avatar for DerGuteWolf

    Well, those change dates can be formulated as rules like in the Olson tz database cf. eg. https://en.wikipedia.org/wiki/Tz_databas­e#Daylight_saving_time_(DST)_rules, https://en.wikipedia.org/wiki/Tz_databas­e#Example_zone_and_rule_lines
    So it would be enough to include the current rule for a locale . Problem ist that a locale could contain lots of timezone (eg. the US is fragmented, going to conty level).
    So maybe a better idea would be a special settings app, which would read the current GPS location, query the current time zone info for this location and use this in the future.
    Google Maps has such a API cf https://developers.google.com/maps/docum­entation/timezone/intro .
    Unfortunatly nominatim dismissed including timezone info cf. https://trac.openstreetmap.org/ticket/42­00 .
    Or instead of GPS simple let the user select a timezone.
    The "next couple DST change dates" could be taken from https://raw.githubusercontent.com/moment­/moment-timezone/develop/data/unpacked/l­atest.json

  • in Bangle.js
    Avatar for DerGuteWolf

    Some questions around BLE HTTP:

    • I found a discussion about the URL length limit and that this should be solved with BLE5. Is this (or will this) be available on the Bangle.js?
    • Has somebody code to have an Android app running in the background and act as a BLE HTTP proxy?
    • What other BLE means are available for an Bangle.js app to connect to an Android app running in the background?

    Thanks in advance for some hints!

    Use case: I imagine a app which would take the current GPS position and north direction and uses a app on the Android Device (or running in the cloud and being reachabe via the BLE HTTP Proxy on the Android Device) and show me a oriented (OSM) map of my surroundings (eg from https://www.wanderreitkarte.de/), so I don't have to take the phone out to take a quick look at the map.

  • in Bangle.js
    Avatar for DerGuteWolf

    Well, this was taken straight from the repo, cf.https://github.com/espruino/BangleApps/b­lob/master/apps/locale/locales.js#L41 and https://github.com/espruino/BangleApps/b­lob/master/apps/locale/locale.html#L67 ...
    Will check this further and start eventually a new thread/issue, I think my issue was simply that I tested only with the small font...

  • in Bangle.js
    Avatar for DerGuteWolf

    Hi Gordon,
    I always tried parallel to the ground. I first tried to callibrate by rotating the clock around its z-axis, it seems what works a bit better is holding it out on the stretched arm and "rotate" yourself, ie moving the watch in a great circle. I will try this in the garden tomorrow, to rule out effects from the building/metal roof.
    Regards,
    DerGuteWold

  • in Bangle.js
    Avatar for DerGuteWolf

    Hi Gordon,

    thanks for the quick feedback. Got this working now:
    https://github.com/espruino/BangleApps/p­ull/138

    For others: To get it to work in the emulator, instead of var locales = require("locale"); I used this (for German):

    locale = {"lang":"de_DE","decimal_point":",","tho­usands_sep":".","currency_symbol":"\x80"­,"int_curr_symbol":"EUR","speed":"kmh","­distance":{"0":"m","1":"km"},"temperatur­e":"°C","ampm":{"0":"","1":""},"timePatt­ern":{"0":"%HH:%MM:%SS","1":"%HH:%MM"},"­datePattern":{"0":"%A, %d. %B %Y","1":"%d.%m.%Y"},"abmonth":"Jan,Feb,M­är,Apr,Mai,Jun,Jul,Aug,Sep,Okt,Nov,Dez",­"month":"Januar,Februar,März,April,Mai,J­uni,Juli,August,September,Oktober,Novemb­er,Dezember","abday":"So,Mo,Di,Mi,Do,Fr,­Sa","day":"Sonntag,Montag,Dienstag,Mittw­och,Donnerstag,Freitag,Samstag","trans":­{"yes":"ja","Yes":"Ja","no":"nein","No":­"Nein","ok":"ok","on":"an","off":"aus"}}­;
            locales  = {
                lang: locale.lang,
                currencySym: String.fromCharCode(locale.currency_symb­ol),
                dow:   (d,short) => {day = d.getDay();return (short) ? locale.abday.split(",")[day] : locale.day.split(",")[day];},
                month: (d,short) => { month = d.getMonth(); return (short) ? locale.abmonth.split(",")[month] : locale.month.split(",")[month];},
                number: n => n.toString().replace(locale.thousands_se­p, locale.decimal_point),
                currency: n => n.toFixed(2).replace(locale.thousands_se­p, locale.decimal_point) + locale.currency_symbol,
                distance: n => (n < 1000) ? Math.round(n) + locale.distance[0] : Math.round(n/1000) + locale.distance[1],
                speed: s => Math.round(s) +locale.speed,
                temp: t => Math.round(t) + locale.temperature,
                translate: s => {s=""+s;return locale.trans[s]||locale.trans[s.toLowerC­ase()]||s;},
                date: (d,short) =>  (short) ? `${('0'+d.getDate()).substr(-2)}.${('0'+­(d.getMonth()+1).toString()).substr(-2)}­.${d.getFullYear()}`: `${locale.day.split(',')[d.getDay()]}, ${('0'+d.getDate()).substr(-2)}. ${locale.month.split(',')[d.getMonth()]}­ ${d.getFullYear()}`,
                time: (d,short) =>  (short) ? `${('0'+d.getHours()).substr(-2)}:${('0'­+d.getMinutes()).substr(-2)}`: `${('0'+d.getHours()).substr(-2)}:${('0'­+d.getMinutes()).substr(-2)}:${('0'+d.ge­tSeconds()).substr(-2)}`,
            };
    

    The only thing I am still fighting with is the currency symbol, I am not getting this displayed...

    Regards,
    DerGuteWolf

  • in Bangle.js
    Avatar for DerGuteWolf

    How do I use the Languages/Locale app when developing another app, eg a clock, in the emulator?

  • in Bangle.js
    Avatar for DerGuteWolf

    I received my bangle.js today. Totally awsome!
    One of the I tried first was the compass app, however this seems to have problems to point to north and to keep pointing to north...
    Is there some compass callibration needed? If yes, how to do it?

Actions