Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/MarlinFirmware/MarlinDocumentation.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/_tools
diff options
context:
space:
mode:
authorEric Julius <ejulius86@gmail.com>2019-12-25 09:21:44 +0300
committerLuu Lac <45380455+shitcreek@users.noreply.github.com>2019-12-25 09:21:44 +0300
commit1f8be91794c1224755eb7168ecf1d68c8616f1a9 (patch)
treea364f920fea3169ef53095e85c7ef2d9f29aacf0 /_tools
parent4cad88a2fba762d2fdfebd116130d9d4d1568657 (diff)
Tools: Linear Advance K-Factor Bugfixes (#264)
Thanks.
Diffstat (limited to '_tools')
-rw-r--r--_tools/lin_advance/k-factor.js14
1 files changed, 8 insertions, 6 deletions
diff --git a/_tools/lin_advance/k-factor.js b/_tools/lin_advance/k-factor.js
index 68b0bba7..9c20df2c 100644
--- a/_tools/lin_advance/k-factor.js
+++ b/_tools/lin_advance/k-factor.js
@@ -24,9 +24,9 @@ const SETTINGS_VERSION = '1.0';
function genGcode() {
// get the values from the HTML elements
- var PRINTER = parseFloat(document.getElementById('PRINTER').value),
- FILAMENT = parseFloat(document.getElementById('FILAMENT').value),
- FILENAME = parseFloat(document.getElementById('FILENAME').value),
+ var PRINTER = document.getElementById('PRINTER').value,
+ FILAMENT = document.getElementById('FILAMENT').value,
+ FILENAME = document.getElementById('FILENAME').value,
FILAMENT_DIAMETER = parseFloat(document.getElementById('FIL_DIA').value),
NOZZLE_DIAMETER = parseFloat(document.getElementById('NOZ_DIA').value),
NOZZLE_TEMP = parseInt(document.getElementById('NOZZLE_TEMP').value),
@@ -128,8 +128,8 @@ function genGcode() {
txtArea.value = '; ### Marlin K-Factor Calibration Pattern ###\n' +
'; -------------------------------------------\n' +
';\n' +
- '; Printer: ' + PRINTER + ' mm\n' +
- '; Filament: ' + FILAMENT + ' mm\n' +
+ '; Printer: ' + PRINTER + '\n' +
+ '; Filament: ' + FILAMENT + '\n' +
'; Created: ' + new Date() + '\n' +
';\n' +
'; Settings Printer:\n' +
@@ -320,7 +320,9 @@ function genGcode() {
function saveTextAsFile() {
var textToWrite = document.getElementById('textarea').value,
textFileAsBlob = new Blob([textToWrite], {type: 'text/plain'}),
- fileNameToSaveAs = FILENAME + 'kfactor.gcode';
+ usersFilename = document.getElementById('FILENAME').value,
+ filename = usersFilename || '',
+ fileNameToSaveAs = filename + 'kfactor.gcode';
if (textToWrite) {
saveAs(textFileAsBlob, fileNameToSaveAs);
} else {