Created
May 23, 2020 21:33
-
-
Save fanoush/424d4efb556711e3485286f19e78bc44 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/targets/nrf5x/bluetooth.c b/targets/nrf5x/bluetooth.c | |
index e5aa77d5..5f15e041 100644 | |
--- a/targets/nrf5x/bluetooth.c | |
+++ b/targets/nrf5x/bluetooth.c | |
@@ -2489,6 +2489,7 @@ void jsble_restart_softdevice() { | |
jshUtilTimerDisable(); // don't want the util timer firing during this! | |
JsSysTime lastTime = jshGetSystemTime(); | |
jsble_kill(); | |
+ jsvUnLock(jspEvaluate("if(typeof(NRF.onRestart)=='function')NRF.onRestart();",true)); | |
jsble_init(); | |
// reinitialise everything | |
jswrap_ble_reconfigure_softdevice(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment