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

Add getMaxCommandFrequency

parent b13c2c85
...@@ -36,6 +36,7 @@ DLL_PUBLIC double getTakeOffAltitude(void); ...@@ -36,6 +36,7 @@ DLL_PUBLIC double getTakeOffAltitude(void);
DLL_PUBLIC float getYaw(void); DLL_PUBLIC float getYaw(void);
DLL_PUBLIC float getSpeed(void); DLL_PUBLIC float getSpeed(void);
DLL_PUBLIC float getClimbRate(void); DLL_PUBLIC float getClimbRate(void);
DLL_PUBLIC int getMaxCommandFrequency(void);
DLL_PUBLIC int gpsIsOk(void); DLL_PUBLIC int gpsIsOk(void);
DLL_PUBLIC int isReadyToFly(void); DLL_PUBLIC int isReadyToFly(void);
DLL_PUBLIC int isLanding(void); DLL_PUBLIC int isLanding(void);
......
...@@ -807,6 +807,12 @@ static JSValue js_getClimbRate(JSContext *ctx, JSValueConst thisVal, ...@@ -807,6 +807,12 @@ static JSValue js_getClimbRate(JSContext *ctx, JSValueConst thisVal,
return JS_NewFloat64(ctx, getClimbRate()); return JS_NewFloat64(ctx, getClimbRate());
} }
static JSValue js_getMaxCommandFrequency(JSContext *ctx, JSValueConst thisVal,
int argc, JSValueConst *argv)
{
return JS_NewInt32(ctx, getMaxCommandFrequency());
}
static JSValue js_gpsIsOk(JSContext *ctx, JSValueConst this_val, static JSValue js_gpsIsOk(JSContext *ctx, JSValueConst this_val,
int argc, JSValueConst *argv) int argc, JSValueConst *argv)
{ {
...@@ -857,6 +863,7 @@ static const JSCFunctionListEntry js_funcs[] = { ...@@ -857,6 +863,7 @@ static const JSCFunctionListEntry js_funcs[] = {
JS_CFUNC_DEF("getYaw", 0, js_getYaw ), JS_CFUNC_DEF("getYaw", 0, js_getYaw ),
JS_CFUNC_DEF("getSpeed", 0, js_getSpeed ), JS_CFUNC_DEF("getSpeed", 0, js_getSpeed ),
JS_CFUNC_DEF("getClimbRate", 0, js_getClimbRate ), JS_CFUNC_DEF("getClimbRate", 0, js_getClimbRate ),
JS_CFUNC_DEF("getMaxCommandFrequency", 0, js_getMaxCommandFrequency ),
JS_CFUNC_DEF("gpsIsOk", 0, js_gpsIsOk ), JS_CFUNC_DEF("gpsIsOk", 0, js_gpsIsOk ),
JS_CFUNC_DEF("isReadyToFly", 0, js_isReadyToFly ), JS_CFUNC_DEF("isReadyToFly", 0, js_isReadyToFly ),
JS_CFUNC_DEF("isLanding", 0, js_isLanding ), JS_CFUNC_DEF("isLanding", 0, js_isLanding ),
......
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