Avatar for halemmerich

halemmerich

Member since Jan 2022 • Last active Apr 2024
  • 9 conversations
  • 269 comments

Most recent activity

  • in Bangle.js
    Avatar for halemmerich

    There is for example https://ifan-display.com/product/1-2-inc­h-round-transflective-tft-lcd/ which is a round 240 by 240 pixel display with relatively small borders. At 1.2" it is a bit small but generally square 176x176 pixel Bangle 2 apps would fit in this with only a few pixels cut off at the corners. So there would be a way to use the "legacy" apps without changes on a round display.
    Personally I like square better just for ease of app development.

  • in Bangle.js
    Avatar for halemmerich

    If you let people write JS they'll try to be clever and it'll no longer be a set of 'do this check that' but something far more complicated

    I think this speaks most to me personally :D
    I will try to keep it as simple as possible and in json. I guess if we need more complexity we could just run/eval a js file as a step from the json test definition.

  • in Bangle.js
    Avatar for halemmerich

    I've had a play around porting the first of the test cases to json:

    https://gist.github.com/halemmerich/3d0f­1d41d8eebe76eedc8553530e5dd5

    I think this should be all the asserts/features I need. I have a rough implementation for those but it is not yet working correctly.

    Why did you decide on the json based format for test cases? Wouldn't javascript files be better for editing/linting/syntax highlighting?
    Maybe a library that provides asserts and an easy way to setup the emulator for running testcases for a single app? Or the other way round, the test code is a module and apptests.js iterates over the exports which are test functions and handles the environment like now.

  • in Bangle.js
    Avatar for halemmerich

    You should be able to do all that in a github codespace which is free to use for personal accounts for some time and data limits. But at that point I would probably install a VSCode or similar locally instead.

  • in Bangle.js
    Avatar for halemmerich

    0.04 seconds per sample matches 25 samples per seconds, so that probably would be the "Sampling rate" setting.
    Range might be maximum measurable values, maybe with a tradeoff with regard to precision for the higher values.

  • in Bangle.js
    Avatar for halemmerich

    I have the TICKR X 2 which should deliver accelerometer data as well, but as of now I did get nothing out of it with neither Bangle nor NRF Connect app. Might be some hidden/proprietary BLE service.

  • in Bangle.js
    Avatar for halemmerich

    I had done this a while ago: https://github.com/espruino/BangleApps/b­lob/master/apps/android/test.js

    Every step in that would probably map nicely to a test object in the json. I think I could refactor that.

    Maybe some of the asserts would be useful as a teststep in the apptests? I could try to integrate those.

    How does the emulator handle "hardware" like GPS? If it does not I probably need to find a new way to track the state of the "internal" GPS instead of checking the PIN mode like it does currently.

  • in Bangle.js
    Avatar for halemmerich

    I think you hit a case nobody thought about before. At least I did not. "removable" apps are expected to cleanup all changes they did to global state while they are unloaded. In my opinion that includes the loading of fonts.
    Widgets are the one notable exception to this general rule, just because it is not easy to completely get rid of widgets. In your case the app removes the font as it should but the widget still exists and expects it to be there. I suspect the loading of the font only takes place once in the widget and one of the following draws then fails.

    1. Clock loaded, widgets loaded, font available globally
    2. Switch from clock to launcher, widgets still loaded, font removed by clock
    3. Something calls draw of widget, fails because of missing font.

    There are a few possible solutions:

    • Checking for the font in the widgets draw and reloading it if needed
    • Not unloading fonts at all, probably problematic on Bangle 1 because of memory constraints
    • Make the loading of fonts more local to app/widget instead of the global graphics object
    • Attach a counter to a font on load and only really unload it if there is no user left

    There probably are more ways to get this done but some discussion on this will be needed since will affect global behaviour.

  • in Bangle.js
    Avatar for halemmerich

    One thing that I wasn't 100% clear on was whether OWMweather replaces Weather or if it simply provides it with info necessary to pull weather.

    It is neither. OWMWeather pulls weather and writes the same file that Weather uses. You can use it without Weather installed. OWMWeather writes the file and other apps that use weather as written by the Weather app can use it. Weather does use it too and the apps should not conflict.

  • in Bangle.js
    Avatar for halemmerich

    Interesting, OWMWeather checks if the location data file exists, but not if the location data itself is valid. So the question is, where does the broken mylocation.json come from? At a glance there is no way that could happen in the mylocation app code. To me it seems as if it always either sets both lat and long or nothing. Maybe the web interface needs additional checks before writing the file.

Actions