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

Add gpsIsOk function

parent c1de18ed
...@@ -746,6 +746,12 @@ static JSValue js_healthAllOk(JSContext *ctx, JSValueConst this_val, ...@@ -746,6 +746,12 @@ static JSValue js_healthAllOk(JSContext *ctx, JSValueConst this_val,
return JS_NewBool(ctx, healthAllOk()); return JS_NewBool(ctx, healthAllOk());
} }
static JSValue js_gpsIsOk(JSContext *ctx, JSValueConst this_val,
int argc, JSValueConst *argv)
{
return JS_NewBool(ctx, gpsIsOk());
}
static JSValue js_updateLogAndProjection(JSContext *ctx, JSValueConst this_val, static JSValue js_updateLogAndProjection(JSContext *ctx, JSValueConst this_val,
int argc, JSValueConst *argv) int argc, JSValueConst *argv)
{ {
...@@ -777,6 +783,7 @@ static const JSCFunctionListEntry js_funcs[] = { ...@@ -777,6 +783,7 @@ static const JSCFunctionListEntry js_funcs[] = {
JS_CFUNC_DEF("getAirspeed", 0, js_getSpeed ), JS_CFUNC_DEF("getAirspeed", 0, js_getSpeed ),
JS_CFUNC_DEF("getClimbRate", 0, js_getClimbRate ), JS_CFUNC_DEF("getClimbRate", 0, js_getClimbRate ),
JS_CFUNC_DEF("healthAllOk", 0, js_healthAllOk ), JS_CFUNC_DEF("healthAllOk", 0, js_healthAllOk ),
JS_CFUNC_DEF("gpsIsOk", 0, js_gpsIsOk ),
JS_CFUNC_DEF("initPubsub", 2, js_init_pubsub ), JS_CFUNC_DEF("initPubsub", 2, js_init_pubsub ),
JS_CFUNC_DEF("getLog", 0, js_get_log ), JS_CFUNC_DEF("getLog", 0, js_get_log ),
JS_CFUNC_DEF("updateLogAndProjection", 0, js_updateLogAndProjection ), JS_CFUNC_DEF("updateLogAndProjection", 0, js_updateLogAndProjection ),
......
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