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

software/js-drone: add gpsIsOk function

parent c0ffc7e8
...@@ -83,7 +83,7 @@ CMAKE_CFLAGS=-I${tinyxml2:location}/include ...@@ -83,7 +83,7 @@ CMAKE_CFLAGS=-I${tinyxml2:location}/include
recipe = slapos.recipe.cmmi recipe = slapos.recipe.cmmi
configure-command = true configure-command = true
url = https://lab.nexedi.com/nexedi/mavsdk-wrapper/-/archive/update_set_target_coordinates/mavsdk-wrapper-update_set_target_coordinates.tar.gz url = https://lab.nexedi.com/nexedi/mavsdk-wrapper/-/archive/update_set_target_coordinates/mavsdk-wrapper-update_set_target_coordinates.tar.gz
md5sum = d18d2f1b6cb87679170dc08f1530d5b6 md5sum = 5b0b93121b74ea03ca419870bdaa88f2
environment = environment =
CPLUS_INCLUDE_PATH=${autopilot-wrapper-header:location}:${mavsdk:location}/include:${mavsdk:location}/include/mavsdk CPLUS_INCLUDE_PATH=${autopilot-wrapper-header:location}:${mavsdk:location}/include:${mavsdk:location}/include/mavsdk
LDFLAGS=-L${mavsdk:location}/lib -Wl,-rpath=${mavsdk:location}/lib LDFLAGS=-L${mavsdk:location}/lib -Wl,-rpath=${mavsdk:location}/lib
...@@ -52,6 +52,7 @@ DLL_PUBLIC float getYaw(void); ...@@ -52,6 +52,7 @@ 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 healthAllOk(void); DLL_PUBLIC int healthAllOk(void);
DLL_PUBLIC int gpsIsOk(void);
DLL_PUBLIC void updateLogAndProjection(void); DLL_PUBLIC void updateLogAndProjection(void);
#ifdef __cplusplus #ifdef __cplusplus
} }
......
...@@ -10,7 +10,7 @@ parts = qjs-wrapper ...@@ -10,7 +10,7 @@ parts = qjs-wrapper
recipe = slapos.recipe.cmmi recipe = slapos.recipe.cmmi
configure-command = true configure-command = true
url = https://lab.nexedi.com/nexedi/qjs-wrapper/-/archive/update_settarget/qjs-wrapper-update_settarget.tar.gz url = https://lab.nexedi.com/nexedi/qjs-wrapper/-/archive/update_settarget/qjs-wrapper-update_settarget.tar.gz
md5sum = 13cb6bc8478515bf5c80bb24db588d91 md5sum = dbfc2716683906dab2ed9690f82f05a4
environment = environment =
C_INCLUDE_PATH=include:${open62541:location}/include:${open62541:location}/deps:${open62541:location}/src/pubsub:${quickjs:location}/include:${autopilot-wrapper-header:location} C_INCLUDE_PATH=include:${open62541:location}/include:${open62541:location}/deps:${open62541:location}/src/pubsub:${quickjs:location}/include:${autopilot-wrapper-header:location}
LDFLAGS=-L${open62541:location}/lib -Wl,-rpath=${open62541:location}/lib -L${mavsdk-wrapper:location}/lib -Wl,-rpath=${mavsdk-wrapper:location}/lib LDFLAGS=-L${open62541:location}/lib -Wl,-rpath=${open62541:location}/lib -L${mavsdk-wrapper:location}/lib -Wl,-rpath=${mavsdk-wrapper:location}/lib
...@@ -14,4 +14,4 @@ ...@@ -14,4 +14,4 @@
# not need these here). # not need these here).
[autopilot-wrapper-header] [autopilot-wrapper-header]
filename = autopilot_wrapper.h filename = autopilot_wrapper.h
md5sum = 7f9acb0339bd217301a98d860a67978c md5sum = 2252b11c39e90190fc263e27409538d2
...@@ -42,4 +42,4 @@ md5sum = 0d51149929f3cbcaac966b815bb1fb0b ...@@ -42,4 +42,4 @@ md5sum = 0d51149929f3cbcaac966b815bb1fb0b
[worker] [worker]
_update_hash_filename_ = drone-scripts/worker.js.jinja _update_hash_filename_ = drone-scripts/worker.js.jinja
md5sum = c6fb16fccd429ac0e6cff99c66d9debb md5sum = febc3f4ad022796dcad46ebd22dbfba3
/*jslint nomen: true, indent: 2, maxerr: 3, maxlen: 80 */ /*jslint nomen: true, indent: 2, maxerr: 3, maxlen: 80 */
/*global console, getAltitude, getAltitudeRel, getInitialAltitude, getLatitude, /*global console, getAltitude, getAltitudeRel, getInitialAltitude, gpsIsOk,
getLongitude, getYaw, execUserScript, initPubsub, loiter, setAirSpeed, getLatitude, getLongitude, getYaw, execUserScript, initPubsub, loiter,
setMessage, setTargetCoordinates, std, triggerParachute, setAirSpeed, setMessage, setTargetCoordinates, std, triggerParachute,
updateLogAndProjection, Drone, Worker*/ updateLogAndProjection, Drone, Worker*/
import { import {
Drone, Drone,
...@@ -10,6 +10,7 @@ import { ...@@ -10,6 +10,7 @@ import {
getAltitude, getAltitude,
getClimbRate, getClimbRate,
getInitialAltitude, getInitialAltitude,
gpsIsOk,
getLog, getLog,
getPosition, getPosition,
getYaw, getYaw,
...@@ -34,10 +35,10 @@ import { ...@@ -34,10 +35,10 @@ import {
import { evalScript, fdopen, loadFile, open } from "std"; import { evalScript, fdopen, loadFile, open } from "std";
(function (Drone, SIGTERM, WNOHANG, Worker, close, console, evalScript, exec, (function (Drone, SIGTERM, WNOHANG, Worker, close, console, evalScript, exec,
fdopen, getAltitude, getInitialAltitude, getLog, getPosition, getYaw, fdopen, getAltitude, getInitialAltitude, gpsIsOk, getLog,
initPubsub, kill, loadFile, loiter, open, pipe, setAirSpeed, getPosition, getYaw, initPubsub, kill, loadFile, loiter, open, pipe,
setMessage, setReadHandler, setTargetCoordinates, triggerParachute, setAirSpeed, setMessage, setReadHandler, setTargetCoordinates,
updateLogAndProjection, waitpid) { triggerParachute, updateLogAndProjection, waitpid) {
// Every script is evaluated per drone // Every script is evaluated per drone
"use strict"; "use strict";
...@@ -61,6 +62,7 @@ import { evalScript, fdopen, loadFile, open } from "std"; ...@@ -61,6 +62,7 @@ import { evalScript, fdopen, loadFile, open } from "std";
getAltitudeAbs: getAltitude, getAltitudeAbs: getAltitude,
getCurrentPosition: getPosition, getCurrentPosition: getPosition,
getInitialAltitude: getInitialAltitude, getInitialAltitude: getInitialAltitude,
gpsIsOk: gpsIsOk,
getYaw: getYaw, getYaw: getYaw,
getSpeed: getAirspeed, getSpeed: getAirspeed,
getClimbRate: getClimbRate, getClimbRate: getClimbRate,
...@@ -271,7 +273,7 @@ import { evalScript, fdopen, loadFile, open } from "std"; ...@@ -271,7 +273,7 @@ import { evalScript, fdopen, loadFile, open } from "std";
} }
}; };
}(Drone, SIGTERM, WNOHANG, Worker, close, console, evalScript, exec, }(Drone, SIGTERM, WNOHANG, Worker, close, console, evalScript, exec,
fdopen, getAltitude, getInitialAltitude, getLog, getPosition, getYaw, fdopen, getAltitude, getInitialAltitude, gpsIsOk, getLog, getPosition, getYaw,
initPubsub, kill, loadFile, loiter, open, pipe, setAirSpeed, setMessage, initPubsub, kill, loadFile, loiter, open, pipe, setAirSpeed, setMessage,
setReadHandler, setTargetCoordinates, triggerParachute, setReadHandler, setTargetCoordinates, triggerParachute,
updateLogAndProjection, waitpid)); updateLogAndProjection, waitpid));
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