Skip to content

Commit

Permalink
fixes and slashes
Browse files Browse the repository at this point in the history
  • Loading branch information
Kriechi committed Mar 20, 2018
1 parent fe680ce commit aa0e269
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 15 deletions.
10 changes: 1 addition & 9 deletions DuetRRFOutputDevice.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,7 @@ class DeviceType(Enum):


class DuetRRFOutputDevice(OutputDevice):
def __init__(
self,
name="DuetRRF",
url="http://printer.local",
duet_password="reprap",
http_user=None,
http_password=None,
device_type=DeviceType.print
):
def __init__(self, name, url, duet_password, http_user, http_password, device_type):
self._device_type = device_type
if device_type == DeviceType.print:
description = catalog.i18nc("@action:button", "Print on {0}").format(name)
Expand Down
2 changes: 2 additions & 0 deletions DuetRRFPlugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,8 @@ def saveInstance(self, oldName, name, url, duet_password, http_user, http_passwo
manager = self.getOutputDeviceManager()
if oldName and oldName != name:
self.removeInstance(name)
if not url.endswith('/'):
url += '/'
self._instances[name] = {
"url": url,
"duet_password": duet_password,
Expand Down
2 changes: 1 addition & 1 deletion DuetRRFPlugin.qml
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ UM.Dialog
Item { width: parent.width; height: displayNameLabel.height; }
Label {
visible: !instanceDialog.validUrl;
text: catalog.i18nc("@error", "URL not valid. Example: http://192.168.1.42");
text: catalog.i18nc("@error", "URL not valid. Example: http://192.168.1.42/");
}
}

Expand Down
18 changes: 14 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,18 +29,28 @@ above.
* From the menu bar choose: Extensions -> DuetRRF -> DuetRRF Connections
* Click "Add"
* Enter the name of your printer
* Enter the URL to your DuetRRF instance, e.g., http://printer.local or http://192.168.1.42
* Leave "HTTP Basic Auth" empty if you don't run a reverse-proxy
- e.g., `MyBigBox`
* Enter the URL to your DuetWifi/DuetEthernet board
- make sure this URL works if you copy & paste it into your browser
- if you browse to that URL, you should see the DuetWebControl (DWC)
- e.g., `http://printer.local/` or `http://192.168.1.42/`
* If you used `M551` in your `config.g`, enter the password
- e.g., `my_little!secret` or the default `reprap`
* If you use a reverse proxy to add *HTTP Basic Auth*, enter the credentials
- if you don't know what *HTTP Basic Auth* is, leave these fields empty
- e.g., username: `alice`, password: `ecila`
* Click "Ok"
* Done! Look at the bottom right - there should be the big blue button with you printer name on it!
* Done!

Look at the bottom right - there should be the big blue button with you printer name on it!

## Features

* Upload / Simulate / Print
* Works with HTTP and HTTPS connections and URLS
* Works with HTTP Basic Auth (optional)
* Works with RRF passwords (if you used `M551`, default is `reprap`)
* No support for UNC paths as URL
* No support for UNC paths, only IP addresses or resolvable domain names (DNS)


## Use
Expand Down
2 changes: 1 addition & 1 deletion plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
"name": "DuetRRF",
"author": "Thomas Kriechbaumer",
"description": "Provides direct upload of gcode to DuetRRF.",
"version": "0.0.10",
"version": "0.0.11",
"api": 4
}

0 comments on commit aa0e269

Please sign in to comment.