Compare commits
5 commits
v2_proto
...
stable-1.2
| Author | SHA1 | Date | |
|---|---|---|---|
| ceca65577c | |||
| 47cd5345e8 | |||
| 3a24067560 | |||
|
|
ff8b77500b | ||
|
|
39c8f7886a |
6 changed files with 22 additions and 23 deletions
|
|
@ -1,5 +1,6 @@
|
||||||
OctoPrint
|
OctoPrint
|
||||||
=========
|
=========
|
||||||
|
What I did was take the MrBeam fork of Octoprint (because I have a MrBeam, and I like it) - and modify it for pen plotting with an axidraw v3 clone.
|
||||||
|
|
||||||
[](https://flattr.com/submit/auto?user_id=foosel&url=https://github.com/foosel/OctoPrint&title=OctoPrint&language=&tags=github&category=software)
|
[](https://flattr.com/submit/auto?user_id=foosel&url=https://github.com/foosel/OctoPrint&title=OctoPrint&language=&tags=github&category=software)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -97,7 +97,7 @@ def update_source(git_executable, folder, target, force=False):
|
||||||
raise RuntimeError("Could not update, \"git reset --hard\" failed with returncode %d: %s" % (returncode, stdout))
|
raise RuntimeError("Could not update, \"git reset --hard\" failed with returncode %d: %s" % (returncode, stdout))
|
||||||
|
|
||||||
print(">>> Running: git pull")
|
print(">>> Running: git pull")
|
||||||
returncode, stdout = _git(["pull"], folder, git_executable=git_executable)
|
returncode, stdout = _git(["pull", "origin", "stable-1.2.2"], folder, git_executable=git_executable)
|
||||||
if returncode != 0:
|
if returncode != 0:
|
||||||
raise RuntimeError("Could not update, \"git pull\" failed with returncode %d: %s" % (returncode, stdout))
|
raise RuntimeError("Could not update, \"git pull\" failed with returncode %d: %s" % (returncode, stdout))
|
||||||
print(stdout)
|
print(stdout)
|
||||||
|
|
|
||||||
|
|
@ -133,9 +133,15 @@ $(function(){
|
||||||
};
|
};
|
||||||
|
|
||||||
self.getXYCoord = function(evt){
|
self.getXYCoord = function(evt){
|
||||||
var scale = evt.target.parentElement.transform.baseVal[0].matrix.a;
|
if(/firefox/.test(navigator.userAgent.toLowerCase())) {
|
||||||
var x = self.px2mm(evt.offsetX) * scale;
|
var scale = evt.target.parentElement.transform.baseVal[0].matrix.a;
|
||||||
var y = self.px2mm(parseFloat(evt.target.attributes.height.value) - evt.offsetY) * scale;
|
var x = self.px2mm(evt.offsetX) * scale;
|
||||||
|
var y = self.px2mm(parseFloat(evt.target.attributes.height.value) - evt.offsetY) * scale;
|
||||||
|
} else
|
||||||
|
{
|
||||||
|
var x = self.px2mm(evt.offsetX);
|
||||||
|
var y = self.px2mm(parseFloat(evt.target.farthestViewportElement.clientHeight) - evt.offsetY);
|
||||||
|
}
|
||||||
x = Math.min(x, self.workingAreaWidthMM());
|
x = Math.min(x, self.workingAreaWidthMM());
|
||||||
y = Math.min(y, self.workingAreaHeightMM());
|
y = Math.min(y, self.workingAreaHeightMM());
|
||||||
return {x:x, y:y};
|
return {x:x, y:y};
|
||||||
|
|
|
||||||
BIN
src/octoprint/static/img/mr-draw-red_x120.png
Normal file
BIN
src/octoprint/static/img/mr-draw-red_x120.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 6.7 KiB |
|
|
@ -1,7 +1,7 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title data-bind="text: title">Mr Beam</title>
|
<title data-bind="text: title">Mr Draw</title>
|
||||||
|
|
||||||
<link rel="shortcut icon" href="{{ url_for('static', filename='img/favicon.png') }}">
|
<link rel="shortcut icon" href="{{ url_for('static', filename='img/favicon.png') }}">
|
||||||
<link rel="apple-touch-icon" sizes="114x114" href="{{ url_for('static', filename='img/apple-touch-icon-114x114.png') }}">
|
<link rel="apple-touch-icon" sizes="114x114" href="{{ url_for('static', filename='img/apple-touch-icon-114x114.png') }}">
|
||||||
|
|
@ -15,8 +15,8 @@
|
||||||
<nav class="navbar navbar-default navbar-fixed-top" role="navigation" id="navbar">
|
<nav class="navbar navbar-default navbar-fixed-top" role="navigation" id="navbar">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="navbar-header brand" style="min-width: 272px;">
|
<div class="navbar-header brand" style="min-width: 272px;">
|
||||||
<a class="navbar-brand" href="#" >
|
<a class="navbar-brand" href="#">
|
||||||
<img alt="Mr Beam Logo" src="{{ url_for('static', filename='img/mr-typo-red_x120.png') }}">
|
<img alt="Mr Draw Logo" src="{{ url_for('static', filename='img/mr-draw-red_x120.png') }}">
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<!-- Navbar -->
|
<!-- Navbar -->
|
||||||
|
|
@ -58,7 +58,7 @@
|
||||||
|
|
||||||
<div id="control" class="accordion-inner" data-bind="visible: isReady() || isLocked() || isFlashing()">
|
<div id="control" class="accordion-inner" data-bind="visible: isReady() || isLocked() || isFlashing()">
|
||||||
<div data-bind="visible: isLocked ">
|
<div data-bind="visible: isLocked ">
|
||||||
Mr Beam is in a locked state as it does not know its position.
|
Mr Draw is in a locked state as it does not know its position.
|
||||||
First remove any objects blocking the gantry's travel range.
|
First remove any objects blocking the gantry's travel range.
|
||||||
Then do a homing cycle.
|
Then do a homing cycle.
|
||||||
<div style='text-align: center; padding:.5em;'>
|
<div style='text-align: center; padding:.5em;'>
|
||||||
|
|
@ -160,7 +160,7 @@
|
||||||
-->
|
-->
|
||||||
{{ _('Approx. Total Job Time') }}: <strong data-bind="text: estimatedPrintTimeString"></strong><br>
|
{{ _('Approx. Total Job Time') }}: <strong data-bind="text: estimatedPrintTimeString"></strong><br>
|
||||||
<div data-bind="visible: isPrinting() || isPaused()">
|
<div data-bind="visible: isPrinting() || isPaused()">
|
||||||
|
|
||||||
<div class="progress">
|
<div class="progress">
|
||||||
<div class="bar" id="job_progressBar" data-bind="style: { width: progressString() + '%' }"> {{ _('Processed') }} : <strong data-bind="text: byteString"></strong></div>
|
<div class="bar" id="job_progressBar" data-bind="style: { width: progressString() + '%' }"> {{ _('Processed') }} : <strong data-bind="text: byteString"></strong></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -183,7 +183,7 @@
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<span>Passes</span>
|
<span>Passes</span>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -533,7 +533,7 @@
|
||||||
<i class="icon-camera icon-white"></i>
|
<i class="icon-camera icon-white"></i>
|
||||||
<span>{{ _('Photo') }}</span>
|
<span>{{ _('Photo') }}</span>
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div id="gcode_upload_progress" class="progress" style="width: 100%;">
|
<div id="gcode_upload_progress" class="progress" style="width: 100%;">
|
||||||
<div class="bar" style="width: 0%"></div>
|
<div class="bar" style="width: 0%"></div>
|
||||||
|
|
@ -657,12 +657,10 @@
|
||||||
<div class="span4">
|
<div class="span4">
|
||||||
<ul class="focus_steps">
|
<ul class="focus_steps">
|
||||||
<li>1. Place your material on the working area</li>
|
<li>1. Place your material on the working area</li>
|
||||||
<li>2. Move the laser over the material</li>
|
<li>2. Move the pen over the material</li>
|
||||||
<li>3. Put on your safety glasses</li>
|
<li>→ Now enable the pen calibration mode</li>
|
||||||
<li>4. Turn the laser safety switch to on</li>
|
<li>5. Adjust the pen until it touches the paper</li>
|
||||||
<li>→ Now enable the focus mode</li>
|
<li>→ Disable the pen calibration mode. </li>
|
||||||
<li>5. Adjust the focus until the laser beam is as small as possible</li>
|
|
||||||
<li>→ Disable the focus mode. </li>
|
|
||||||
</ul>
|
</ul>
|
||||||
<div style="text-align:center">
|
<div style="text-align:center">
|
||||||
<div class="btn-group" role="group" aria-label="focus mode control" style="">
|
<div class="btn-group" role="group" aria-label="focus mode control" style="">
|
||||||
|
|
|
||||||
|
|
@ -358,7 +358,6 @@ class MachineCom(object):
|
||||||
def _handle_ok_message(self):
|
def _handle_ok_message(self):
|
||||||
if self._state == self.STATE_HOMING:
|
if self._state == self.STATE_HOMING:
|
||||||
self._changeState(self.STATE_OPERATIONAL)
|
self._changeState(self.STATE_OPERATIONAL)
|
||||||
self._onHomingDone()
|
|
||||||
|
|
||||||
def _handle_error_message(self, line):
|
def _handle_error_message(self, line):
|
||||||
self._errorValue = line
|
self._errorValue = line
|
||||||
|
|
@ -558,11 +557,6 @@ class MachineCom(object):
|
||||||
payload = dict(port=self._port, baudrate=self._baudrate)
|
payload = dict(port=self._port, baudrate=self._baudrate)
|
||||||
eventManager().fire(Events.CONNECTED, payload)
|
eventManager().fire(Events.CONNECTED, payload)
|
||||||
|
|
||||||
def _onHomingDone(self):
|
|
||||||
self.sendCommand("G92X500Y0Z0")
|
|
||||||
self.sendCommand("G90")
|
|
||||||
self.sendCommand("G21")
|
|
||||||
|
|
||||||
def _detectPort(self, close):
|
def _detectPort(self, close):
|
||||||
self._log("Serial port list: %s" % (str(serialList())))
|
self._log("Serial port list: %s" % (str(serialList())))
|
||||||
for p in serialList():
|
for p in serialList():
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue