Skip to content

Commit

Permalink
Add A,B axes to machine editor plus bug fixes
Browse files Browse the repository at this point in the history
- Tooltips for machine editor were clipped to the left
- Tooltips caused machine editor values to be reset
  • Loading branch information
markwal committed Aug 5, 2015
1 parent 42a42d8 commit c2ce34f
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 5 deletions.
2 changes: 1 addition & 1 deletion GPX
Submodule GPX updated 1 files
+20 −0 src/gpx/gpx.c
8 changes: 5 additions & 3 deletions octoprint_GPX/static/js/gpx.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@ $(function() {
};

self.onAfterBinding = function() {
$('[data-toggle=tooltip]').tooltip({placement: 'left'});
$('#gpx_settings').find('[data-toggle=tooltip]').tooltip({placement: 'left'});
$('#gpx_machine_settings').find('[data-toggle=tooltip]').tooltip();
};

self.onSettingsShown = self.requestData;
Expand Down Expand Up @@ -113,8 +114,9 @@ $(function() {

self.machine = ko.mapping.fromJS(machineInitial);

$("#gpx_machine_settings").on("show", function() {
self.requestMachine();
$("#gpx_machine_settings").on("show", function(event) {
if (event.target.id == "gpx_machine_settings")
self.requestMachine();
});

self.requestMachine = function() {
Expand Down
12 changes: 11 additions & 1 deletion octoprint_GPX/templates/GPX_settings.jinja2
Original file line number Diff line number Diff line change
Expand Up @@ -145,24 +145,32 @@
<th>X</th>
<th>Y</th>
<th>Z</th>
<th>A</th>
<th>B</th>
</thead>
<tr data-toggle="tooltip" data-placement="bottom" title="{{ _('GPX will clip feedrates specified by the gcode above this value. Units are mm per min.') }}">
<td class="label-column text-right">{{ _('Max Feedrate:') }}</td>
<td><input type="number" step="1" class="input-mini text-right" data-bind="value: machine.x.max_feedrate"></td>
<td><input type="number" step="1" class="input-mini text-right" data-bind="value: machine.y.max_feedrate"></td>
<td><input type="number" step="1" class="input-mini text-right" data-bind="value: machine.z.max_feedrate"></td>
<td><input type="number" step="1" class="input-mini text-right" data-bind="value: machine.a.max_feedrate"></td>
<td><input type="number" step="1" class="input-mini text-right" data-bind="value: machine.b.max_feedrate"></td>
</tr>
<tr data-toggle="tooltip" data-placement="bottom" title="{{ _('Travel rate when executing "home" gcodes.') }}">
<tr data-toggle="tooltip" data-placement="bottom" title="{{ _('Travel rate when executing homing (G28 G161 G162) gcodes.') }}">
<td class="label-column text-right">{{ _('Home Feedrate:') }}</td>
<td><input type="number" step="1" class="input-mini text-right" data-bind="value: machine.x.home_feedrate"></td>
<td><input type="number" step="1" class="input-mini text-right" data-bind="value: machine.y.home_feedrate"></td>
<td><input type="number" step="1" class="input-mini text-right" data-bind="value: machine.z.home_feedrate"></td>
<td style="text-align: center">N/A</td>
<td style="text-align: center">N/A</td>
</tr>
<tr data-toggle="tooltip" data-placement="bottom" title="{{ _('Steps on the stepper motor per mm of linear travel along the axis.') }}">
<td class="label-column text-right">{{ _('Steps per mm:') }}</td>
<td><input type="number" step="0.000001" class="input-mini text-right no-spinner" data-bind="value: machine.x.steps_per_mm"></td>
<td><input type="number" step="0.000001" class="input-mini text-right no-spinner" data-bind="value: machine.y.steps_per_mm"></td>
<td><input type="number" step="0.000001" class="input-mini text-right no-spinner" data-bind="value: machine.z.steps_per_mm"></td>
<td><input type="number" step="0.000001" class="input-mini text-right no-spinner" data-bind="value: machine.a.steps_per_mm"></td>
<td><input type="number" step="0.000001" class="input-mini text-right no-spinner" data-bind="value: machine.b.steps_per_mm"></td>
</tr>
<tr data-toggle="tooltip" data-placement="top" title="{{ _('Direction of home on the axis. Maximum or minimum end of the axis.') }}">
<td class="label-column text-right">{{ _('Home:') }}</td>
Expand All @@ -181,6 +189,8 @@
<option value="0">{{ _('Min') }}</option>
<option value="1">{{ _('Max') }}</option>
</select></td>
<td style="text-align: center">N/A</td>
<td style="text-align: center">N/A</td>
</tr>
</table>
</form>
Expand Down

0 comments on commit c2ce34f

Please sign in to comment.