You are reading a single comment by @ChristianW and its replies. Click here to read the full conversation.
  • Maybe it's the WebIDE?
    Chrome Version 54.0.2840.98 (64-bit) on OSX 10.11.6 here with WebIDE.

    I played around with Settings->Communications->Save on Send.
    When it is set to "Yes, even execute after 'reset()'" I can remove the code when:

    • putting on dummy line like var foo; on the right hand pane
    • click "Send to Espruino"

    Simple example:

    >dump();
    function onInit() {digitalPulse(LED1, 1, 100);}
    pinMode(D29, "input_pulldown", true);
    =undefined
    

    Not working:

    >reset();save();
    =undefined
    Running onInit()...
     _____                 _
    |   __|___ ___ ___ _ _|_|___ ___
    |   __|_ -| . |  _| | | |   | . |
    |_____|___|  _|_| |___|_|_|_|___|
              |_| http://espruino.com
     1v88 Copyright 2016 G.Williams
    Erasing Flash.....
    Writing....
    Compressed 32000 bytes to 1222
    Checking...
    Done!
    Running onInit()...
    >dump();
    function onInit() {digitalPulse(LED1, 1, 100);}
    pinMode(D29, "input_pulldown", true);
    =undefined
    

    Putting this into the right hand pane finally kills the code (actually it replaces the current code by some dummy code):

    var foo;
    

    Send and check:

    >Erasing Flash.....
    Writing...
    Compressed 32000 bytes to 17
    Checking...
    Done!
    Loading 17 bytes from flash...
    =undefined
    >dump();
    var foo = undefined;
    pinMode(D29, "input_pulldown", true);
    =undefined
    

    This is strange...

About

Avatar for ChristianW @ChristianW started