Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/application/ApplicationSettings.qml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ LocalSettings {
setValue("dro.showOffsets", false, false);
setValue("dro.showVelocity", true, false);
setValue("dro.showDistanceToGo", true, false);
setValue("dro.showSpindleSpeed", true, false);
setValue("preview.enable", false, false);
setValue("preview.showMachineLimits", true, false);
setValue("preview.showProgram", true, false);
Expand Down
3 changes: 3 additions & 0 deletions src/applicationcontrols/AbstractDigitalReadOut.qml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ ApplicationItem {
property bool distanceToGoVisible: settings.initialized && settings.values.dro.showDistanceToGo
property int positionFeedback: _ready ? status.config.positionFeedback : ApplicationStatus.ActualPositionFeedback
property int positionOffset: _ready ? status.config.positionOffset : ApplicationStatus.RelativePositionOffset
property double spindleSpeed: _ready ? Math.abs(status.motion.spindleSpeed) : 0.0
property int spindleDirection: _ready ? status.motion.spindleDirection: 0
property bool spindleSpeedVisible: _ready && settings.initialized ? settings.values.dro.showSpindleSpeed && status.ui.spindlePlusVisible : false

readonly property bool _ready: status.synced
readonly property var _axisNames: helper.ready ? helper.axisNames : ["x", "y", "z", "a"]
Expand Down
12 changes: 12 additions & 0 deletions src/applicationcontrols/DigitalReadOut.qml
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,18 @@ AbstractDigitalReadOut {
active: true
visible: !droRect.offsetsVisible && distanceToGoVisible
}

Loader {
sourceComponent: textLine
onLoaded: {
item.title = qsTr("S:")
item.type = Qt.binding(function() { return droRect.spindleDirection === 1 ? "⟳" : (droRect.spindleDirection === -1 ? "⟲" : ""); });
item.homed = false;
item.value = Qt.binding(function() { return droRect.spindleSpeed; });
}
active: true
visible: !droRect.offsetsVisible && spindleSpeedVisible
}
}

ColumnLayout {
Expand Down
16 changes: 3 additions & 13 deletions src/pathview/GCodeSync.qml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ Item {
|| status.task.execState === ApplicationStatus.TaskDone) : false
readonly property string file: status.synced ? status.task.file : ""
property int lastLine: 1
property string lastFile: ""
readonly property bool ready: status.synced

onCurrentLineChanged: updateLine()
Expand All @@ -45,22 +46,11 @@ Item {
return;
}

if (d.lastLine > d.currentLine) {
for (var line = 1; line <= d.lastLine; ++line) {
model.setData(file, line, false, GCodeProgramModel.ExecutedRole);
model.setData(file, line, false, GCodeProgramModel.ActiveRole);
}
d.lastLine = d.currentLine;
}

for (line = d.lastLine; line < d.currentLine; ++line) {
model.setData(file, line, true, GCodeProgramModel.ExecutedRole);
model.setData(file, line, false, GCodeProgramModel.ActiveRole);
}

model.setData(d.lastFile, d.lastLine, false, GCodeProgramModel.ActiveRole)
model.setData(file, currentLine, true, GCodeProgramModel.ActiveRole);

d.lastLine = d.currentLine;
d.lastFile = d.file;
}
}
}