-
• #2
Espruino Version:
1v81.149 Copyright 2015 G.Williams
-
• #3
Thanks - seems like an issue with addCached resetting the state then. I'll file a bug for it.
To be honest it's really not meant to be used like that - it's literally just for loading a module in right at the start of the code. What were you trying to achieve? There might be an easier way?
-
• #4
...looks like the idea of loading moudules one after the ohter for testing purposes... does this come close? (Edited: ...obviously not)
-
• #5
Hi Gordon
No Problem. I transfer additional code via xbee to my espruino's as needed.
I tried to implement this with own local modules. Load them dynamicaly via xbee using addCached. Maybe it's better to implement it via eval.Sacha
-
• #7
Will do so. Thanks.
-
• #8
I've used Module.addCached successfull. Moved it temporarly out of the switch/case statment within a function. It's better than using eval. I can allways see and manage the loaded modules.
My prototype is now able to load and replace modules via xbee without interupting or reset the pico. Very nice!
Hi Gordon
this works:
When i call addCached inside a switch statement like this: