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