Problem: how to re-init the network after reset() #6660
Unanswered
espruino-discuss
asked this question in
Porting to new Devices
Replies: 1 comment
-
Posted at 2015-12-05 by tve Never mind, figured it out... Posted at 2015-12-07 by @gfwilliams Just for anyone else, you can write functions that get called on
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Posted at 2015-12-05 by tve
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?
Beta Was this translation helpful? Give feedback.
All reactions