Compare commits

2 Commits

Author SHA1 Message Date
n07070
f2d9006a12 Update webcam data management 2026-05-17 20:37:45 +02:00
n07070
52e0a09552 Add default signature 2026-05-17 20:37:23 +02:00
2 changed files with 8 additions and 1 deletions

View File

@@ -1,5 +1,8 @@
# Configuration file the LittlePrynter
[defaults]
signature = "Anonymous"
# Printer settings
[printer]
vendor_id = "0x04b8"

View File

@@ -193,7 +193,7 @@ function setup_events(){
ev.preventDefault();
try {
await countDownToPicture(); // wait for countdown to finish
const data = await take_picture(); // take_picture can be async
var data = await take_picture(); // take_picture can be async
print_picture(data);
} catch (e) {
alert("Failed to print a picture because : " + e);
@@ -212,6 +212,10 @@ function clear_canvas() {
}
function dataURLtoFile(dataurl, filename) {
if(dataurl === "") {
console.log("We didn't receive data");
}
var arr = dataurl.split(','), mime = arr[0].match(/:(.*?);/)[1],
bstr = atob(arr[1]), n = bstr.length, u8arr = new Uint8Array(n);
while(n--){