UI suggestions

Posted on
  • Hi,

    Great little device (the Puck)! Couple of UI suggestions for the editor:

    1. Make it possible to load the app currently running on a connected device into the editor
    2. Display the device name ( eg Puck.js xxxx) in the UI banner so you know which device you are connected to..

    (would also be good to be able to permanently change the device name - but I suspect that's not possible)

    cheers...

  • Hi, thanks - good ideas! I've actually got some issues open for the two things you mention already - so hopefully they will get implemented at some point soon.

    1. downloading code: https://github.com/espruino/EspruinoWebI­DE/issues/96
    2. display device name: https://github.com/espruino/EspruinoWebI­DE/issues/171

    You can download manually at the moment by typing dump() on the left-hand side and copy/pasting the code - it's just a bit more fiddly.

    And if you want to change the name there's the NRF.setAdvertising function: http://www.espruino.com/Reference#l_NRF_­setAdvertising

    NRF.setAdvertising({},{name:"Hello"});
    

    should work - so if you upload the following code and then type save() the name of the device will always be Hello.

    function onInit() {                                       
      NRF.setAdvertising({},{name:"Hello"}); 
    }
    

    (edit - just moving this to the Puck.js forum)

  • Thanks for the rapid reply! I was aware of setAdvertising, but that line is replaced each time the code is updated isn't it? Unlike the 'Puck.js xxxx' name... So you need to remember to change it to the 'correct' name each time you update the device, which gets confusing (at least for me) when dealing with multiple devices... (but the ability to dump() the current code - and eventually the current device name in the banner - will certainly help...

    cheers...

  • Ah - just read your reply properly. Works perfectly - thanks!

  • Great! You can also just type this on the left-hand side:

    E.setBootCode('NRF.setAdvertising({},{na­me:"Hello"});',true);
    

    It'll then execute that code even after a call to reset() - so as long as the IDE isn't set to save on send the Puck's name will always be what you set it to, even after an update that doesn't contain that line.

  • You can now click the storage button, Download from RAM and copy to editor to get the contents of memory back into the editor

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview
About

UI suggestions

Posted by Avatar for davidhay @davidhay

Actions