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

component/mavsdk: use mavlink v2 headers

parent 363f4bba
......@@ -13,7 +13,7 @@ parts =
[c-astral-headers]
recipe = slapos.recipe.build:gitclone
repository = https://lab.nexedi.com/nexedi/c-astral-c-library
revision = v1.0
revision = v2.0
git-executable = ${git:location}/bin/git
[gcc]
......@@ -33,8 +33,7 @@ path = ${mavsdk-source:location}
cmake = ${cmake:location}/bin/cmake
pre-configure =
${git:location}/bin/git submodule update --init --recursive
cp -r ${c-astral-headers:location}/* ${mavsdk-source:location}/src/third_party/mavlink/include/mavlink/v2.0/
sed -i 's#common/mavlink.h#CAstral/mavlink.h#' ${mavsdk-source:location}/src/core/mavlink_include.h
cp -r ${c-astral-headers:location}/mavlink/v2.0/* ${mavsdk-source:location}/src/third_party/mavlink/include/mavlink/v2.0/
configure-command =
${:cmake}
configure-options =
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -26,7 +26,7 @@ md5sum = 1ff50063f5a54712a0bc0ff38fa74630
[main]
filename = main.js
md5sum = d0bfcc79cdd7c1e5b8f5d264cc59074e
md5sum = 21217f85fdab2f6307e3edc6ba74d0b6
[pubsub]
filename = pubsub.js
......@@ -34,4 +34,4 @@ md5sum = 1555496ad591a31a845f33488d5c335d
[worker]
filename = worker.js
md5sum = e4b4ca3bde1a21f1dbfc4ff7fa3b872c
md5sum = 9167a47913658d395a328f67b5a80d36
......@@ -36,10 +36,10 @@ import { open, exit } from "std";
// to prevent it to finish (and so, exit the quickjs process)
worker = new Worker("{{ worker_script }}");
function quit(is_a_drone, exit_code) {
function quit(is_a_drone, shutdown, exit_code) {
stopPubsub();
if (is_a_drone) {
stop();
stop(shutdown);
}
exit(exit_code);
}
......@@ -141,10 +141,10 @@ import { open, exit } from "std";
can_update = true;
} else if (type === 'exited') {
worker.onmessage = null;
quit(configuration.isADrone, e.data.exit);
quit(configuration.isADrone, !configuration.isASimulation, e.data.exit);
} else {
console.log('Unsupported message type', type);
quit(configuration.isADrone, 1);
quit(configuration.isADrone, !configuration.isASimulation, 1);
}
};
}(arm, console, exit, open, scriptArgs, setTimeout, start, stop, stopPubsub,
......
/*jslint nomen: true, indent: 2, maxerr: 3, maxlen: 80 */
/*global console, getAltitude, getAltitudeRel, getInitialAltitude, getLatitude,
getLongitude, getYaw, execUserScript, initPubsub, landed, loiter, setAirspeed,
getLongitude, getYaw, execUserScript, initPubsub, loiter, setAirspeed,
setMessage, setTargetCoordinates, std, triggerParachute, Drone, Worker*/
import {
Drone,
......@@ -14,7 +14,6 @@ import {
getLongitude,
getYaw,
initPubsub,
landed,
loiter,
setAirspeed,
setMessage,
......@@ -24,7 +23,7 @@ import * as std from "std";
import { Worker } from "os";
(function (console, getAltitude, getAltitudeRel, getInitialAltitude,
getLatitude, getLongitude, getYaw, initPubsub, landed, loiter,
getLatitude, getLongitude, getYaw, initPubsub, loiter,
setAirspeed, setMessage, setTargetCoordinates, std, triggerParachute,
Drone, Worker) {
// Every script is evaluated per drone
......@@ -58,7 +57,6 @@ import { Worker } from "os";
getSpeed: getAirspeed,
getClimbRate: getClimbRate,
id: configuration.id,
landed: landed,
loiter: loiter,
sendMsg: function (msg, id) {
if (id === undefined) { id = -1; }
......@@ -136,5 +134,5 @@ import { Worker } from "os";
}
};
}(console, getAltitude, getAltitudeRel, getInitialAltitude, getLatitude,
getLongitude, getYaw, initPubsub, landed, loiter, setAirspeed, setMessage,
getLongitude, getYaw, initPubsub, loiter, setAirspeed, setMessage,
setTargetCoordinates, std, triggerParachute, Drone, Worker));
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