Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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