Skip to content

Commit

Permalink
Merge pull request #24 from benlye/benlye-devel
Browse files Browse the repository at this point in the history
Addressing #20 and #23
  • Loading branch information
benlye authored Jan 18, 2018
2 parents 8d9e2e3 + 5d0f127 commit a64fbef
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 9 deletions.
11 changes: 6 additions & 5 deletions octoprint_firmwareupdater/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,8 @@ def _start_flash_process(self, method, hex_file, printer_port):

def _flash_worker(self, method, firmware, printer_port):
try:
self._logger.info("Firmware update started")

if not method in self._flash_methods:
self._logger.error("Unsupported flashing method: {}".format(method))
return
Expand All @@ -169,11 +171,10 @@ def _flash_worker(self, method, firmware, printer_port):
if self._printer.is_operational():
_, current_port, current_baudrate, current_profile = self._printer.get_current_connection()

if current_port == printer_port:
reconnect = (current_port, current_baudrate, current_profile)
self._logger.info("Disconnecting from printer")
self._send_status("progress", subtype="disconnecting")
self._printer.disconnect()
reconnect = (current_port, current_baudrate, current_profile)
self._logger.info("Disconnecting from printer")
self._send_status("progress", subtype="disconnecting")
self._printer.disconnect()

self._send_status("progress", subtype="startingflash")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,9 @@
<div class="controls">
<select data-bind="value: configAvrdudeAvrMcu">
<option value=></option>
<option value=m1284p>Atmega1284p</option>
<option value=m2560>Atmega2560</option>
<option value=m1280>ATmega1280</option>
<option value=m1284p>ATmega1284p</option>
<option value=m2560>ATmega2560</option>
</select>
</div>
</div>
Expand All @@ -106,6 +107,7 @@
<select data-bind="value: configAvrdudeProgrammer">
<option value=></option>
<option value=arduino>arduino</option>
<option value=usbasp>usbasp</option>
<option value=wiring>wiring</option>
</select>
</div>
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@
plugin_name = "OctoPrint-FirmwareUpdater"

# The plugin's version. Can be overwritten within OctoPrint's internal data via __plugin_version__ in the plugin module
plugin_version = "0.2.0"
plugin_version = "0.3.0"

# The plugin's description. Can be overwritten within OctoPrint's internal data via __plugin_description__ in the plugin
# module
plugin_description = """Automatic Firmware Updater"""

# The plugin's author. Can be overwritten within OctoPrint's internal data via __plugin_author__ in the plugin module
plugin_author = "Gina Häußge, based on work by Nicanor Romero Venier"
plugin_author = "Gina Häußge and Ben Lye, based on work by Nicanor Romero Venier"

# The plugin's author's mail address.
plugin_author_email = "[email protected]"
Expand Down

0 comments on commit a64fbef

Please sign in to comment.