From 840c63e5ec7ac825e17b2c10024f149f67958a6e Mon Sep 17 00:00:00 2001 From: Alfred <59073967+slimer37@users.noreply.github.com> Date: Sat, 21 Dec 2024 02:31:08 -0800 Subject: [PATCH 1/3] Fix 'NaN' identifier when using Arduino single bitmap mode Removed unary '+' causing conversion --- js/script.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/script.js b/js/script.js index 9a62e28..b9de561 100644 --- a/js/script.js +++ b/js/script.js @@ -936,7 +936,7 @@ function generateOutputString() { outputString = outputString.replace(/,\s*$/, ''); outputString = `const ${getImageType()} ${ - +getIdentifier() + getIdentifier() } [] PROGMEM = {` + `\n${outputString}\n};`; break; From ef9d7737cebbe77ff9e150b98ced3b7c68a92f7f Mon Sep 17 00:00:00 2001 From: Alfred <59073967+slimer37@users.noreply.github.com> Date: Sat, 21 Dec 2024 02:33:01 -0800 Subject: [PATCH 2/3] Add missing closing quote in arduino_single mode comments --- js/script.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/script.js b/js/script.js index b9de561..68c6073 100644 --- a/js/script.js +++ b/js/script.js @@ -948,7 +948,7 @@ function generateOutputString() { images.each((image) => { code = imageToString(image); code = `\t${code.split('\n').join('\n\t')}\n`; - comment = `\t// '${image.glyph}, ${image.canvas.width}x${image.canvas.height}px\n`; + comment = `\t// '${image.glyph}', ${image.canvas.width}x${image.canvas.height}px\n`; outputString += comment + code; if (image.glyph.length === 1) { useGlyphs++; From deb36b6f13a8ff4522113149e15df5f2ca3e02ca Mon Sep 17 00:00:00 2001 From: Alfred <59073967+slimer37@users.noreply.github.com> Date: Sat, 21 Dec 2024 02:40:07 -0800 Subject: [PATCH 3/3] Update preview when changing draw mode --- js/script.js | 1 + 1 file changed, 1 insertion(+) diff --git a/js/script.js b/js/script.js index 68c6073..0d27b4d 100644 --- a/js/script.js +++ b/js/script.js @@ -1060,6 +1060,7 @@ function updateDrawMode(elm) { if (conversionFunction) { settings.conversionFunction = conversionFunction; } + updateAllImages(); } // Updates Arduino code check-box