Update jupyter integration

This commit is contained in:
Alexander Nozik 2023-11-08 15:31:12 +03:00
parent 0f687c3c51
commit 4e17c9051c

View File

@ -56,7 +56,19 @@
" timeStep = 0.005.seconds\n",
")\n",
"\n",
"val device = context.install(\"device\", LinearDrive(context, state, 0.005, pidParameters)).apply {\n",
"val device = context.install(\"device\", LinearDrive(context, state, 0.005, pidParameters))"
],
"metadata": {
"collapsed": false
}
},
{
"cell_type": "code",
"execution_count": null,
"outputs": [],
"source": [
"\n",
"val job = device.run {\n",
" val clock = context.clock\n",
" val clockStart = clock.now()\n",
" doRecurring(10.milliseconds) {\n",
@ -120,7 +132,9 @@
"execution_count": null,
"outputs": [],
"source": [
"device.stop()"
"import kotlinx.coroutines.cancel\n",
"\n",
"job.cancel()"
],
"metadata": {
"collapsed": false