Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
cadriel committed Feb 21, 2021
2 parents 54fe688 + 061f3ab commit 1bdff67
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
11 changes: 5 additions & 6 deletions src/components/widgets/configuration/BedMeshWidget.vue
Original file line number Diff line number Diff line change
Expand Up @@ -221,8 +221,7 @@ export default class BedMeshWidget extends Mixins(UtilsMixin) {
}
rules = [
(v: string) => !!v || 'Required.',
(v: string) => v.indexOf(' ') === -1 || 'Spaces are not allowed.'
(v: string) => !!v || 'Required.'
]
@Watch('saveDialog', { deep: true })
Expand Down Expand Up @@ -268,22 +267,22 @@ export default class BedMeshWidget extends Mixins(UtilsMixin) {
}
loadProfile (name: string) {
this.sendGcode('BED_MESH_PROFILE LOAD=' + name)
this.sendGcode(`BED_MESH_PROFILE LOAD="${name}"`)
}
removeProfile (name: string) {
this.sendGcode('BED_MESH_PROFILE REMOVE=' + name)
this.sendGcode(`BED_MESH_PROFILE REMOVE="${name}"`)
this.sendGcode('SAVE_CONFIG')
}
saveToConfig () {
const valid = this.form.validate()
if (valid) {
if (this.saveDialog.profileName !== this.currentMesh.profile_name) {
this.sendGcode('BED_MESH_PROFILE SAVE=' + this.saveDialog.profileName)
this.sendGcode(`BED_MESH_PROFILE SAVE="${this.saveDialog.profileName}"`)
}
if (this.saveDialog.removeDefault) {
this.sendGcode('BED_MESH_PROFILE REMOVE=' + this.currentMesh.profile_name)
this.sendGcode(`BED_MESH_PROFILE REMOVE="${this.currentMesh.profile_name}"`)
}
this.sendGcode('SAVE_CONFIG')
}
Expand Down
4 changes: 3 additions & 1 deletion src/store/socket/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ export const actions: ActionTree<SocketState, RootState> = {
async onSocketOpen ({ commit }, payload) {
commit('onSocketOpen', payload)
SocketActions.printerInfo()
// SocketActions.serverInfo()
// We run this here so that we can get the status of power devices
// without necessarily having connection to the printer.
SocketActions.serverInfo()
},

/**
Expand Down
2 changes: 1 addition & 1 deletion src/store/socket/getters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ export const getters: GetterTree<SocketState, RootState> = {
const meshSettings = Object.keys(config).filter(key => key.startsWith('bed_mesh'))
for (const key of meshSettings) {
if (key === 'bed_mesh') continue // The mesh configuration.
const profile_name = key.split(' ')[1]
const profile_name = key.split(' ').splice(1).join(' ')
if (
profile_name !== currentProfile
) {
Expand Down

0 comments on commit 1bdff67

Please sign in to comment.