• Ah the heatshrink technique is nice! :)

    I'm still getting memory issues though.

    >reset()
    =undefined
     ____                 _
    |  __|___ ___ ___ _ _|_|___ ___
    |  __|_ -| . |  _| | | |   | . |
    |____|___|  _|_| |___|_|_|_|___|
             |_| espruino.com
     2v06 (c) 2019 G.Williams
    No errors in https://raw.githubusercontent.com/esprui­no/EspruinoDocs/master/devices/MPU6050_D­MP.js. Minified 34114 bytes to 9872 bytes.
    No errors. Minified 15565 bytes to 15435 bytes.
    >
     ____                 _
    |  __|___ ___ ___ _ _|_|___ ___
    |  __|_ -| . |  _| | | |   | . |
    |____|___|  _|_| |___|_|_|_|___|
             |_| espruino.com
     2v06 (c) 2019 G.Williams
    >Uncaught SyntaxError: Got EOF expected '}'
     at line 1 col 13307
    ...etMemoryBank(b),this.setMem
                                  ^
    Execution Interrupted
    New interpreter error: LOW_MEMORY,MEMORY
    > 
    

    and that's with the minification options Esprima(offline) for both modules and editor.

    Enabling mangling gives me:

    No errors in https://raw.githubusercontent.com/esprui­no/EspruinoDocs/master/devices/MPU6050_D­MP.js. Minified 34114 bytes to 8640 bytes.
    No errors. Minified 14333 bytes to 13937 bytes.
    >
     ____                 _
    |  __|___ ___ ___ _ _|_|___ ___
    |  __|_ -| . |  _| | | |   | . |
    |____|___|  _|_| |___|_|_|_|___|
             |_| espruino.com
     2v06 (c) 2019 G.Williams
    >Uncaught Error: Function "setClockSource" not found!
     at line 1 col 6
    this.setClockSource(b.CLOCK_PLL_XGYRO),t­his.setFullScaleAcce...
         ^
    in function "initialize" called from line 1 col 103
    ...AD0_HIGH:a,this.initialize()
                                  ^
    in function "a" called from line 1 col 10
    new a(b,c)
             ^
    in function "connect" called from line 1 col 13768
    ...ire('MPU6050').connect(I2C1);const DMP=require('https://raw....
                                  ^
    New interpreter error: LOW_MEMORY,MEMORY
    

    and turning on pretokenise:

    No errors in https://raw.githubusercontent.com/esprui­no/EspruinoDocs/master/devices/MPU6050_D­MP.js. Minified 34114 bytes to 8640 bytes.
    Error parsing JavaScript, but uploading anyway.
    SyntaxError: Unexpected token (1:126)
    Error: Line 1: Unexpected token {
    > 
    

    I'll try playing around with the closure minifiers as well

About

Avatar for parasquid @parasquid started