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

software/js-drone: fix unserializable position

Workaround for https://github.com/bellard/quickjs/issues/315 .
parent 7223774b
......@@ -46,4 +46,4 @@ md5sum = 3bbb0f80b644d86784aab99b03e88c2f
[worker]
_update_hash_filename_ = drone-scripts/worker.js.jinja2
md5sum = 2afbc5c18a453404f6c60e874f592577
md5sum = f3ad1e74bdb977c9444713f14a2ea6fe
......@@ -80,7 +80,15 @@ import { evalScript, fdopen, loadFile, open } from "std";
{% if isADrone -%}
getAltitudeAbs: getAltitude,
getClimbRate: getClimbRate,
getCurrentPosition: getPosition,
getCurrentPosition: function () {
const position = getPosition();
return {
latitude: position.latitude,
longitude: position.longitude,
altitude: position.altitude,
timestamp: position.timestamp
};
},
getInitialAltitude: getInitialAltitude,
gpsIsOk: gpsIsOk,
getMaxCommandFrequency: getMaxCommandFrequency,
......
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