Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Q
qjs-wrapper
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
qjs-wrapper
Commits
0102bab3
Commit
0102bab3
authored
Sep 01, 2023
by
Léo-Paul Géneau
👾
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use asynchronous calls to loiter and set speed
parent
c7a17ee0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
7 deletions
+8
-7
qjs_wrapper.c
qjs_wrapper.c
+8
-7
No files found.
qjs_wrapper.c
View file @
0102bab3
...
@@ -648,8 +648,8 @@ static JSValue js_loiter(JSContext *ctx, JSValueConst thisVal,
...
@@ -648,8 +648,8 @@ static JSValue js_loiter(JSContext *ctx, JSValueConst thisVal,
if
(
JS_ToFloat64
(
ctx
,
&
radius
,
argv
[
3
]))
if
(
JS_ToFloat64
(
ctx
,
&
radius
,
argv
[
3
]))
return
JS_EXCEPTION
;
return
JS_EXCEPTION
;
return
JS_NewInt32
(
ctx
,
loiter
(
la_arg_double
,
lo_arg_double
,
loiter
(
la_arg_double
,
lo_arg_double
,
(
float
)
a_arg_double
,
(
float
)
radius
);
(
float
)
a_arg_double
,
(
float
)
radius
)
);
return
JS_NewInt32
(
ctx
,
0
);
}
}
static
JSValue
js_setAirSpeed
(
JSContext
*
ctx
,
JSValueConst
thisVal
,
static
JSValue
js_setAirSpeed
(
JSContext
*
ctx
,
JSValueConst
thisVal
,
...
@@ -660,7 +660,8 @@ static JSValue js_setAirSpeed(JSContext *ctx, JSValueConst thisVal,
...
@@ -660,7 +660,8 @@ static JSValue js_setAirSpeed(JSContext *ctx, JSValueConst thisVal,
if
(
JS_ToFloat64
(
ctx
,
&
altitude
,
argv
[
0
]))
if
(
JS_ToFloat64
(
ctx
,
&
altitude
,
argv
[
0
]))
return
JS_EXCEPTION
;
return
JS_EXCEPTION
;
return
JS_NewInt32
(
ctx
,
setAirSpeed
((
float
)
altitude
));
setAirSpeed_async
((
float
)
altitude
);
return
JS_NewInt32
(
ctx
,
0
);
}
}
static
JSValue
js_setTargetCoordinates
(
JSContext
*
ctx
,
static
JSValue
js_setTargetCoordinates
(
JSContext
*
ctx
,
...
@@ -678,9 +679,8 @@ static JSValue js_setTargetCoordinates(JSContext *ctx,
...
@@ -678,9 +679,8 @@ static JSValue js_setTargetCoordinates(JSContext *ctx,
if
(
JS_ToFloat64
(
ctx
,
&
a_arg_double
,
argv
[
2
]))
if
(
JS_ToFloat64
(
ctx
,
&
a_arg_double
,
argv
[
2
]))
return
JS_EXCEPTION
;
return
JS_EXCEPTION
;
return
JS_NewInt32
(
ctx
,
setTargetCoordinates
(
la_arg_double
,
setTargetCoordinates
(
la_arg_double
,
lo_arg_double
,
(
float
)
a_arg_double
);
lo_arg_double
,
return
JS_NewInt32
(
ctx
,
0
);
(
float
)
a_arg_double
));
}
}
// Information functions
// Information functions
...
@@ -746,7 +746,8 @@ static JSValue js_healthAllOk(JSContext *ctx, JSValueConst this_val,
...
@@ -746,7 +746,8 @@ static JSValue js_healthAllOk(JSContext *ctx, JSValueConst this_val,
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
)
{
{
return
JS_NewInt32
(
ctx
,
updateLogAndProjection
());
updateLogAndProjection
();
return
JS_NewInt32
(
ctx
,
0
);
}
}
static
const
JSCFunctionListEntry
js_funcs
[]
=
{
static
const
JSCFunctionListEntry
js_funcs
[]
=
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment