1
0
Fork 0

gipy: more interface tests

master
frederic wagner 2022-11-08 09:06:58 +01:00
parent 74204d7184
commit 6d656298af
1 changed files with 5 additions and 5 deletions

View File

@ -10,12 +10,16 @@
<input type="file" is="gpx_file" id="fileInput" accept=".gpx">
<script src="../../core/lib/interface.js"></script>
<script>
function onInit() {
}
</script>
<script type="module">
function uploadFile(fileid, contents) {
// TODO: use interface.js-provided stuff?
Puck.write(`\x10(function() {
require("Storage").write("${JSON.stringify(fileid)}",'${JSON.stringify(contents)}');
require("Storage").write("${fileid}",'${contents}');
Bluetooth.print("OK");
})()\n`, ret => {
console.log("uploadFile", ret);
@ -24,10 +28,6 @@
});
}
function onInit() {
}
import init, { convert_gpx_strings } from "./pkg/gpconv.js";
console.log("imported wasm");
document.getElementById('fileInput').addEventListener('change', function selectedFileChanged() {