As part of a reset (various flavors in jsinteractive.c : https://github.com/espruino/Espruino/blob/59bbe375ef16a49088d7e911b4ed6aa8e4d0a22b/src/jsinteractive.c#L1895-L1933) the network variable gets deleted from the hiddenRoot (i.e. the var that gets fetched here https://github.com/espruino/Espruino/blob/59bbe375ef16a49088d7e911b4ed6aa8e4d0a22b/libs/network/network.c#L183). On the esp8266, this variable gets created at boot time ('cause the network exists always). I'm not sure how to re-create it after a reset because jshReset() gets executed too early and so I can't create it there. Suggestions?
@tve started
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
As part of a reset (various flavors in jsinteractive.c : https://github.com/espruino/Espruino/blob/59bbe375ef16a49088d7e911b4ed6aa8e4d0a22b/src/jsinteractive.c#L1895-L1933) the network variable gets deleted from the hiddenRoot (i.e. the var that gets fetched here https://github.com/espruino/Espruino/blob/59bbe375ef16a49088d7e911b4ed6aa8e4d0a22b/libs/network/network.c#L183). On the esp8266, this variable gets created at boot time ('cause the network exists always). I'm not sure how to re-create it after a reset because jshReset() gets executed too early and so I can't create it there. Suggestions?