Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f94402b94b | ||
|
|
91f2e9b6d8 | ||
|
|
0f955fbeb4 | ||
|
|
6282356ddd | ||
|
|
9057bea653 | ||
|
|
d19bf2ee05 |
No files matched your search
@@ -270,7 +270,7 @@ Now we can install Mainsail (static httpdocs).
|
||||
Now you can download the current mainsail static data
|
||||
```
|
||||
cd ~/mainsail
|
||||
wget -q -O mainsail.zip https://github.com/meteyou/mainsail/releases/download/v0.2.4/mainsail-beta-0.2.4.zip && unzip mainsail.zip && rm mainsail.zip
|
||||
wget -q -O mainsail.zip https://github.com/meteyou/mainsail/releases/download/v0.2.6/mainsail-beta-0.2.6.zip && unzip mainsail.zip && rm mainsail.zip
|
||||
```
|
||||
Now it should be possible to open the interface: `http://<printer-ip>/`.
|
||||
|
||||
|
||||
+1
-1
@@ -36,7 +36,7 @@ If you see a content like this
|
||||
```
|
||||
cd ~/mainsail
|
||||
rm -R ./*
|
||||
wget -q -O mainsail.zip https://github.com/meteyou/mainsail/releases/download/v0.2.4/mainsail-beta-0.2.4.zip && unzip mainsail.zip && rm mainsail.zip
|
||||
wget -q -O mainsail.zip https://github.com/meteyou/mainsail/releases/download/v0.2.6/mainsail-beta-0.2.6.zip && unzip mainsail.zip && rm mainsail.zip
|
||||
```
|
||||
### Move gui.json from gcodes to klipper_config
|
||||
This is only necessary if you update from 0.2.2 to 0.2.3 or higher. If you use MainsailOS, the virtual_sdcard directory is `gcode_files` instead of `sdcard`.
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "mainsail",
|
||||
"version": "0.2.5",
|
||||
"version": "0.2.6",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"serve": "vue-cli-service serve",
|
||||
|
||||
@@ -34,10 +34,10 @@
|
||||
|
||||
<template #item="{ item }">
|
||||
<tr>
|
||||
<td class="log-cell title-cell">
|
||||
{{ item.date.toLocaleString() }}
|
||||
<td class="log-cell title-cell pr-1 py-2">
|
||||
<small>{{ formatTime(item.date)}}</small>
|
||||
</td>
|
||||
<td class="log-cell content-cell" colspan="2">
|
||||
<td class="log-cell content-cell pl-1 py-2" colspan="2">
|
||||
<span v-if="item.message" class="message" v-html="formatMessage(item.message)"></span>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -82,6 +82,17 @@
|
||||
},
|
||||
methods: {
|
||||
|
||||
formatTime(date) {
|
||||
let hours = date.getHours();
|
||||
if (hours < 10) hours = "0"+hours.toString();
|
||||
let minutes = date.getMinutes();
|
||||
if (minutes < 10) minutes = "0"+minutes.toString();
|
||||
let seconds = date.getSeconds();
|
||||
if (seconds < 10) seconds = "0"+seconds.toString();
|
||||
|
||||
|
||||
return hours+":"+minutes+":"+seconds;
|
||||
},
|
||||
formatMessage(message) {
|
||||
message = message.replace(/(?:\r\n|\r|\n)/g, '<br>');
|
||||
|
||||
@@ -104,4 +115,4 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</script>
|
||||
@@ -24,30 +24,29 @@
|
||||
</v-toolbar-title>
|
||||
</v-toolbar>
|
||||
|
||||
<v-card-text class="pb-0">
|
||||
<v-card-text class="py-2">
|
||||
<tool-slider :target="fan.speed" :multi="100" command="M106" attribute-name="S" :attribute-scale="2.55" ></tool-slider>
|
||||
</v-card-text>
|
||||
</v-card>
|
||||
<v-card class="mt-6" v-if="['printing', 'paused'].includes(printer_state)">
|
||||
<v-toolbar flat dense >
|
||||
<v-toolbar-title>
|
||||
<span class="subheading"><v-icon class="mdi mdi-timer" left></v-icon>Speed Factor</span>
|
||||
<span class="subheading"><v-icon class="mdi mdi-printer-3d" left></v-icon>Print Settings</span>
|
||||
</v-toolbar-title>
|
||||
</v-toolbar>
|
||||
|
||||
<v-card-text class="pb-0">
|
||||
<tool-slider :target="speed_factor" :max="200" :multi="100" command="M220" attribute-name="S" ></tool-slider>
|
||||
</v-card-text>
|
||||
</v-card>
|
||||
<v-card class="mt-6" v-if="['printing', 'paused'].includes(printer_state)">
|
||||
<v-toolbar flat dense >
|
||||
<v-toolbar-title>
|
||||
<span class="subheading"><v-icon class="mdi mdi-texture" left></v-icon>Extrusion Factor</span>
|
||||
</v-toolbar-title>
|
||||
</v-toolbar>
|
||||
<v-card-text class="py-2">
|
||||
<v-row>
|
||||
<v-col class="py-0">
|
||||
<tool-slider prependIcon="mdi-timer" :target="speed_factor" :max="200" :multi="100" command="M220" attribute-name="S" ></tool-slider>
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-row>
|
||||
<v-col class="py-0">
|
||||
<tool-slider prependIcon="mdi-texture" :target="extrude_factor" :max="200" :multi="100" command="M221" attribute-name="S" ></tool-slider>
|
||||
</v-col>
|
||||
</v-row>
|
||||
|
||||
<v-card-text class="pb-0">
|
||||
<tool-slider :target="extrude_factor" :max="200" :multi="100" command="M221" attribute-name="S" ></tool-slider>
|
||||
</v-card-text>
|
||||
</v-card>
|
||||
</div>
|
||||
@@ -87,4 +86,4 @@
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</script>
|
||||
@@ -10,10 +10,10 @@
|
||||
<v-card-text class="px-0 pt-0 pb-2 content">
|
||||
<v-row class="px-6" >
|
||||
<v-col sm-12>
|
||||
<toolSlider label="VELOCITY" v-bind:target="max_velocity" :max="200" :extender="true" :extender-steps="100" command="SET_VELOCITY_LIMIT" attribute-name="VELOCITY=" class="mt-5" ></toolSlider>
|
||||
<toolSlider label="ACCEL" v-bind:target="max_accel" :max="5000" :extender="true" :extender-steps="500" command="SET_VELOCITY_LIMIT" attribute-name="ACCEL=" class="mt-5" ></toolSlider>
|
||||
<toolSlider label="DECEL" v-bind:target="max_accel_to_decel" :max="5000" :extender="true" :extender-steps="500" command="SET_VELOCITY_LIMIT" attribute-name="ACCEL_TO_DECEL=" class="mt-5" ></toolSlider>
|
||||
<toolSlider label="SCV" v-bind:target="square_corner_velocity" :max="10" :extender="true" :extender-steps="5" command="SET_VELOCITY_LIMIT" attribute-name="SQUARE_CORNER_VELOCITY=" class="mt-5" ></toolSlider>
|
||||
<toolSlider label="VELOCITY" v-bind:target="current_velocity" v-bind:max="max_velocity" command="SET_VELOCITY_LIMIT" attribute-name="VELOCITY=" ></toolSlider>
|
||||
<toolSlider label="ACCEL" v-bind:target="current_accel" v-bind:max="max_accel" command="SET_VELOCITY_LIMIT" attribute-name="ACCEL=" ></toolSlider>
|
||||
<toolSlider label="DECEL" v-bind:target="current_accel_to_decel" v-bind:max="max_accel_to_decel" command="SET_VELOCITY_LIMIT" attribute-name="ACCEL_TO_DECEL=" ></toolSlider>
|
||||
<toolSlider label="SCV" v-bind:target="current_square_corner_velocity" v-bind:max="max_square_corner_velocity" command="SET_VELOCITY_LIMIT" attribute-name="SQUARE_CORNER_VELOCITY=" ></toolSlider>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-card-text>
|
||||
@@ -30,19 +30,33 @@
|
||||
},
|
||||
data: function() {
|
||||
return {
|
||||
|
||||
max_velocity: 200,
|
||||
max_accel: 5000,
|
||||
max_accel_to_decel: 2500,
|
||||
max_square_corner_velocity: 10,
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapState({
|
||||
max_velocity: state => state.printer.toolhead.max_velocity,
|
||||
max_accel: state => state.printer.toolhead.max_accel,
|
||||
max_accel_to_decel: state => state.printer.toolhead.max_accel_to_decel,
|
||||
square_corner_velocity: state => state.printer.toolhead.square_corner_velocity,
|
||||
current_velocity: state => state.printer.toolhead.max_velocity,
|
||||
current_accel: state => state.printer.toolhead.max_accel,
|
||||
current_accel_to_decel: state => state.printer.toolhead.max_accel_to_decel,
|
||||
current_square_corner_velocity: state => state.printer.toolhead.square_corner_velocity,
|
||||
config: state => state.printer.configfile.config,
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
|
||||
},
|
||||
watch: {
|
||||
config: function(value) {
|
||||
if (value.printer) {
|
||||
this.max_velocity = parseInt(value.printer.max_velocity);
|
||||
this.max_accel = parseInt(value.printer.max_accel);
|
||||
this.max_accel_to_decel = parseInt(value.printer.max_accel_to_decel) || this.max_accel / 2;
|
||||
this.max_square_corner_velocity = parseInt(value.printer.square_corner_velocity);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</script>
|
||||
+29
-37
@@ -4,9 +4,29 @@
|
||||
|
||||
<template>
|
||||
<v-row>
|
||||
<v-col class="col-auto"><v-icon @click="decrement">mdi-minus</v-icon></v-col>
|
||||
<v-col class="col"><v-slider v-model="value" thumb-label="always" :label="label" :min="min" :max="variableMax" @change="sendCmd" hide-details></v-slider></v-col>
|
||||
<v-col class="col-auto"><v-icon @click="increment">mdi-plus</v-icon></v-col>
|
||||
<v-col class="py-1">
|
||||
<v-slider
|
||||
v-model="value"
|
||||
:label="label"
|
||||
:min="min"
|
||||
:max="max"
|
||||
@change="sendCmd"
|
||||
:prepend-icon="prependIcon"
|
||||
hide-details>
|
||||
|
||||
<template v-slot:append>
|
||||
<v-text-field
|
||||
v-model="value"
|
||||
class="mt-0 pt-0"
|
||||
hide-details
|
||||
single-line
|
||||
type="number"
|
||||
style="width: 80px"
|
||||
@change="sendCmd"
|
||||
></v-text-field>
|
||||
</template>
|
||||
</v-slider>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</template>
|
||||
|
||||
@@ -16,7 +36,6 @@
|
||||
data: function() {
|
||||
return {
|
||||
value: this.target * this.multi,
|
||||
variableMax: this.max,
|
||||
}
|
||||
},
|
||||
props: {
|
||||
@@ -38,6 +57,11 @@
|
||||
required: false,
|
||||
default: ''
|
||||
},
|
||||
prependIcon: {
|
||||
type: String,
|
||||
required: false,
|
||||
default: ''
|
||||
},
|
||||
attributeScale: {
|
||||
type: Number,
|
||||
required: false,
|
||||
@@ -76,45 +100,13 @@
|
||||
sendCmd() {
|
||||
this.$socket.sendObj('printer.gcode.script', { script: this.command+' '+this.attributeName+(this.value*this.attributeScale).toFixed(0) });
|
||||
},
|
||||
decrement() {
|
||||
this.value--;
|
||||
this.sendCmd();
|
||||
},
|
||||
increment() {
|
||||
this.value++;
|
||||
this.sendCmd();
|
||||
},
|
||||
checkExpand() {
|
||||
if (this.value > 0) {
|
||||
if (this.value > this.variableMax) {
|
||||
let tmpMulti = Math.ceil((this.value - this.variableMax) / this.extenderSteps);
|
||||
this.variableMax += tmpMulti * this.extenderSteps;
|
||||
} else if (this.value > (this.variableMax - this.extenderSteps)) {
|
||||
this.variableMax += this.extenderSteps;
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
target: function() {
|
||||
this.value = this.target * this.multi;
|
||||
},
|
||||
value: function() {
|
||||
if (this.extender) {
|
||||
|
||||
setTimeout(() => {
|
||||
this.checkExpand();
|
||||
}, 1000);
|
||||
}
|
||||
}
|
||||
},
|
||||
created: function() {
|
||||
if (this.extender && this.value > this.variableMax) {
|
||||
let tmpMulti = Math.ceil((this.value - this.variableMax) / this.extenderSteps);
|
||||
this.variableMax += tmpMulti * this.extenderSteps;
|
||||
|
||||
if (this.variableMax === this.value) this.variableMax += this.extenderSteps;
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</script>
|
||||
+6
-3
@@ -319,7 +319,10 @@
|
||||
methods: {
|
||||
uploadFile: function() {
|
||||
if (this.$refs.fileUpload.files.length) {
|
||||
this.doUploadFile(this.$refs.fileUpload.files[0]);
|
||||
this.doUploadFile(this.$refs.fileUpload.files[0]).finally(() => {
|
||||
this.$refs.fileUpload.value = '';
|
||||
});
|
||||
|
||||
}
|
||||
},
|
||||
doUploadFile: function(file) {
|
||||
@@ -330,7 +333,7 @@
|
||||
formData.append('file', file, (this.currentPath+"/"+filename).substring(7));
|
||||
this.$store.commit('setLoading', { name: 'loadingGcodeUpload' });
|
||||
|
||||
axios.post('//' + this.hostname + ':' + this.port + '/server/files/upload',
|
||||
return axios.post('//' + this.hostname + ':' + this.port + '/server/files/upload',
|
||||
formData, {
|
||||
headers: { 'Content-Type': 'multipart/form-data' }
|
||||
}
|
||||
@@ -624,4 +627,4 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</script>
|
||||
@@ -249,7 +249,7 @@ export default {
|
||||
|
||||
if (parent) {
|
||||
if (parent.findIndex(element => (!element.isDirectory && element.filename === filename)) < 0) {
|
||||
let modified = new Date(data.item.modified);
|
||||
let modified = new Date(data.item.modified * 1000);
|
||||
|
||||
parent.push({
|
||||
isDirectory: false,
|
||||
@@ -342,7 +342,7 @@ export default {
|
||||
parent.push({
|
||||
isDirectory: true,
|
||||
filename: dir.dirname,
|
||||
modified: Date.parse(dir.modified),
|
||||
modified: new Date(dir.modified * 1000),
|
||||
childrens: [],
|
||||
});
|
||||
|
||||
@@ -359,7 +359,7 @@ export default {
|
||||
parent.push({
|
||||
isDirectory: false,
|
||||
filename: file.filename,
|
||||
modified: Date.parse(file.modified),
|
||||
modified: new Date(file.modified * 1000),
|
||||
size: parseInt(file.size),
|
||||
metadataPulled: false,
|
||||
});
|
||||
@@ -394,7 +394,7 @@ export default {
|
||||
slicer_version: safeDefault(data.slicer_version),
|
||||
thumbnails: safeDefault(data.thumbnails),
|
||||
metadataPulled: true,
|
||||
modified: Date.parse(data.modified),
|
||||
modified: new Date(data.modified * 1000),
|
||||
size: parseInt(data.size),
|
||||
};
|
||||
|
||||
|
||||
Reference in new issue
Block a user