Commit 958d414b authored by Léo-Paul Géneau's avatar Léo-Paul Géneau 👾

Shutdown is now handled at drone's API level

parent 97e9f0ff
...@@ -530,7 +530,7 @@ static JSValue js_start(JSContext *ctx, JSValueConst thisVal, ...@@ -530,7 +530,7 @@ static JSValue js_start(JSContext *ctx, JSValueConst thisVal,
static JSValue js_stop(JSContext *ctx, JSValueConst thisVal, static JSValue js_stop(JSContext *ctx, JSValueConst thisVal,
int argc, JSValueConst *argv) int argc, JSValueConst *argv)
{ {
return JS_NewInt32(ctx, stop(JS_ToBool(ctx, argv[0]))); return JS_NewInt32(ctx, stop());
} }
static JSValue js_reboot(JSContext *ctx, JSValueConst thisVal, static JSValue js_reboot(JSContext *ctx, JSValueConst thisVal,
...@@ -702,7 +702,7 @@ static const JSCFunctionListEntry js_funcs[] = { ...@@ -702,7 +702,7 @@ static const JSCFunctionListEntry js_funcs[] = {
JS_CFUNC_DEF("runPubsub", 6, js_run_pubsub ), JS_CFUNC_DEF("runPubsub", 6, js_run_pubsub ),
JS_CFUNC_DEF("stopPubsub", 0, js_stop_pubsub ), JS_CFUNC_DEF("stopPubsub", 0, js_stop_pubsub ),
JS_CFUNC_DEF("start", 4, js_start ), JS_CFUNC_DEF("start", 4, js_start ),
JS_CFUNC_DEF("stop", 1, js_stop ), JS_CFUNC_DEF("stop", 0, js_stop ),
JS_CFUNC_DEF("reboot", 0, js_reboot ), JS_CFUNC_DEF("reboot", 0, js_reboot ),
JS_CFUNC_DEF("arm", 0, js_arm ), JS_CFUNC_DEF("arm", 0, js_arm ),
JS_CFUNC_DEF("takeOff", 0, js_takeOff ), JS_CFUNC_DEF("takeOff", 0, js_takeOff ),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment