Avatar for Hank

Hank

Member since Jun 2022 • Last active Sep 2022
  • 21 conversations
  • 113 comments

Author of ninety hank for Pebble.

Most recent activity

  • in Bangle.js
    Avatar for Hank

    Yay, thanks everyone!

  • started
    • 10 comments
    • 334 views
  • started
    • 7 comments
    • 269 views
  • in Bangle.js
    Avatar for Hank

    Doesn't work. This shows a blank icon with both themes.

  • in Bangle.js
    Avatar for Hank

    Now, I'm getting a little frustrated with my icon
    https://github.com/espruino/BangleApps/p­ull/2125/files#diff-f96a53ce45c9b83f1375­37c39aefcc3ace0cb01b4e368728670c6682bb15­5049
    It won't display correctly in light AND dark mode when I convert it to the img string. I already played around with different transparency settings without success. Any ideas?

  • in Bangle.js
    Avatar for Hank

    Not sure if ClockFace and Layout libs do that automatically because I'm currently not using them, but are you drawing the screen every minute or so? If you draw the screen every cycle, it may be the reason.
    Refer to e.g. https://github.com/alessandrococco/Bangl­eApps/blob/3bddcd402d8e3dd3e9474e022bfe8­6478cebf811/apps/hworldclock/app.js#L113­

  • in Bangle.js
    Avatar for Hank

    Thanks, it eventually worked :)
    PR pending

  • in Bangle.js
    Avatar for Hank

    Same result when I set the number instead of the character.

  • in Bangle.js
    Avatar for Hank

    So, I tried to make an app that toggles the Quiet Mode of the watch. So when opening the app via the launcher, it shall query the quiet status and set the opposite (later that will be configurable). It works quite good. When starting, it switches from "quiet mode off" (i.e. "noisy") to "silent" and after starting it again, it switches back.

    BUT:
    Having it started once, it will set the watch to silent - regardless if it tries to bring back the "quiet mode off" state. In this case even the settings app shows "quiet mode off", but the watch does not do notifications anymore. The only solution to this is opening the settings app and set "quiet mode off" again - even if it already shows "quiet mode off".
    Any ideas what I'm doing wrong?

    Full code:

    
    const modeNames = [/*LANG*/"Noisy", /*LANG*/"Alarms", /*LANG*/"Silent"];
    let bSettings = require('Storage').readJSON('setting.jso­n',true)||{};
    let current = 0|bSettings.quiet;
    //0 off
    //1 alarms
    //2 silent
    
    console.log("old: " + current);
    
    switch (current) {
    	case 0:
    		bSettings.quiet = "2";
    		Bangle.buzz();
    		setTimeout('Bangle.buzz();',500);
    		break;
    	case 1:
    		bSettings.quiet = "0";  
    		Bangle.buzz();
    		break;
    	case 2:
    		bSettings.quiet = "0";
    		Bangle.buzz();
    		break;
    	default:
    		bSettings.quiet = "0";
    		Bangle.buzz(); 
    }
    	
    console.log("new: " + bSettings.quiet);
    
    E.showMessage(modeNames[current] + " -> " + modeNames[bSettings.quiet]);
    setTimeout('exitApp();', 2000);
    
    
    function exitApp(){
    
    require("Storage").writeJSON("setting.js­on", bSettings);
    // reload clocks with new theme, otherwise just wait for user to switch apps
    if (Bangle.CLOCK) load(global.__FILE__);
    
    load()
     
    }
    
  • in Bangle.js
    Avatar for Hank

    Ah ok, havin load() instead of load(); helps. But the IDE is claiming "missing semicolon" then :)

Actions