Avatar for HughB


Member since Dec 2020 • Last active Dec 2022

Been in IT for 40 years. Love interprative programming languages. Wrote my own small Emacs in 2000 lines of C (see Atto on Github). Best way to contact me regarding Bangle stuff is through this forum or the private Message service in the forum.

Most recent activity

  • in Bangle.js
    Avatar for HughB

    The following code wont run in the IDE.
    I definitely have the clock_info module in flash storage.
    I have also installed sunrise_ClockInfo()
    And SlopeClock++ seems work (the top menu anyway);

    Uncaught Error: Module clock_info not found
     at line 1 col 21
  • in Bangle.js
    Avatar for HughB

    I'm trying a clock_info to simplest clock.
    I have done a new version of simplest clock that uses the new clock loading style. IE all the code between an opening and closing brace.

    I'm getting the following error on the console when I try BTN1 and BTN3.

    Uncaught Error: Function "d" not found!
     at line 1 col 15
    in function called from system

    Here's my code for simplest clock

      // must be inside our own scope here so that when we are unloaded everything disappears
      // we also define functions using 'let fn = function() {..}' for the same reason. function decls are global
      const h = g.getHeight();
      const w = g.getWidth();
      let draw = function() {
        var date = new Date();
        var timeStr = require("locale").time(date,1);
        g.setFont('Vector', w/3);
        g.setFontAlign(0, 0);
        g.drawString(timeStr, w/2, h/2);
        // schedule a draw for the next minute
        if (drawTimeout) clearTimeout(drawTimeout);
        drawTimeout = setTimeout(function() {
          drawTimeout = undefined;
        }, 60000 - (Date.now() % 60000));
      // future use
      let prevInfo = function() {
      // future use
      let nextInfo = function() {
      // timeout used to update every minute
      var drawTimeout;
      // Show launcher when middle button pressed, add updown button handlers
        mode : "clockupdown",
        btn : function (n) {
           if (n<0) prevInfo();
           if (n>0) nextInfo();
      // Load widgets
    }  // end of clock
  • in Bangle.js
    Avatar for HughB

    Thanks. So the idea is that the user can install any number of clock info modules and any clock that supports the clock infos will get the new feature added ? Excellent idea. I very much like the concept.

    Had a bit of trouble with it though. I'm on 2.16.7 firmware and the latest apps as per the official app loader.

    PROBLEM 1 - Slope Clock ++
    1) can never get anything to switch display in the bottom left corner.
    2) I can just about get swipes to rotate through the info display in the top right BUT the color keeps switching to red on black which is unreadable. I have set the colour selection of the SlopeClock to only black and white but still it turns red.
    UPDATE: The Red colour is the highlight color setup in slope clock++ in clockInfoDraw();

    3) I can tap the bottom left and the info disappears forever and wont come back.
    4) QUESTION: Does Slope ++ clock have a full screen option ?
    5) QUESTION: How does one control the font size of the clock info text. Is this controlled by clock info or the clock that provides the menu.
    6) I uninstalled pattern launcher in case there was some interference with the swipes
    7) Is it possible to configure clock info so that top / bottom taps can be used to cycle through the menu ?

    PROBLEM 2: Using Bw clock. I could not get Sunrise / Sunset to display. I encountered the watch hanging and had to reboot. After the reboot B/W clock would only show the top half of the clock. The bottom hallf was totally black and no amount of tapping or swiping would change the situation. Eventually I uninstalled the sunrise clock info and BW clock recovered ? Is this something to do with BW clock and sunrise having a Bangle menu.

    BW uses taps to control the cycling through the menu.

    Screenshots attached.

    The tutorial is great but a bare bones example clock based on say simplest clock would be easier to understand.

  • in Bangle.js
    Avatar for HughB

    I see there is a new module called clock_info but am wondering which clocks support this ?
    I'm curious to see how this works in practice at a UI level.
    I ideally want to try out a few example clocks.
    Cant find any documentation on it other than the clock_info module.

  • in Bangle.js
    Avatar for HughB

    Sounds great. I haven't used the alarm timer for a while but I see it has come a long way already.

  • in Bangle.js
    Avatar for HughB

    Is that the problem?

    I did not realise this was by design.

    I guess an option to display it when a clock was displayed would be a nice feature as well.
    I'm constantly trying new clocks out. And it allows for more obscure clocks, where its
    handy to have something else show the time in a more recognisable fashion.
    Eg the binary clock etc.

  • in Bangle.js
    Avatar for HughB

    @Gordon - installed the analog clock widget - only seeing it display when I am using settings. Have tried a variety of clocks. Does not seem to work. All my apps are up to date and am using latest firmware.

  • in Bangle.js
    Avatar for HughB

    @Gordon - nice one. Blisteringly fast. Nice to see the original Anton Clock back as well.