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
1
Merge Requests
1
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
6ca1df64
Commit
6ca1df64
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
f37302b2
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 @
6ca1df64
...
...
@@ -647,8 +647,8 @@ static JSValue js_loiter(JSContext *ctx, JSValueConst thisVal,
if
(
JS_ToFloat64
(
ctx
,
&
radius
,
argv
[
3
]))
return
JS_EXCEPTION
;
return
JS_NewInt32
(
ctx
,
loiter
(
la_arg_double
,
lo_arg_double
,
(
float
)
a_arg_double
,
(
float
)
radius
)
);
loiter
(
la_arg_double
,
lo_arg_double
,
(
float
)
a_arg_double
,
(
float
)
radius
);
return
JS_NewInt32
(
ctx
,
0
);
}
static
JSValue
js_setAirSpeed
(
JSContext
*
ctx
,
JSValueConst
thisVal
,
...
...
@@ -659,7 +659,8 @@ static JSValue js_setAirSpeed(JSContext *ctx, JSValueConst thisVal,
if
(
JS_ToFloat64
(
ctx
,
&
altitude
,
argv
[
0
]))
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
,
...
...
@@ -677,9 +678,8 @@ static JSValue js_setTargetCoordinates(JSContext *ctx,
if
(
JS_ToFloat64
(
ctx
,
&
a_arg_double
,
argv
[
2
]))
return
JS_EXCEPTION
;
return
JS_NewInt32
(
ctx
,
setTargetCoordinates
(
la_arg_double
,
lo_arg_double
,
(
float
)
a_arg_double
));
setTargetCoordinates
(
la_arg_double
,
lo_arg_double
,
(
float
)
a_arg_double
);
return
JS_NewInt32
(
ctx
,
0
);
}
// Information functions
...
...
@@ -745,7 +745,8 @@ static JSValue js_healthAllOk(JSContext *ctx, JSValueConst this_val,
static
JSValue
js_updateLogAndProjection
(
JSContext
*
ctx
,
JSValueConst
this_val
,
int
argc
,
JSValueConst
*
argv
)
{
return
JS_NewInt32
(
ctx
,
updateLogAndProjection
());
updateLogAndProjection
();
return
JS_NewInt32
(
ctx
,
0
);
}
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