Skip to content

Commit

Permalink
Version 1.5.17
Browse files Browse the repository at this point in the history
Fixed 2.7 support.
  • Loading branch information
scottmudge committed Jan 27, 2021
1 parent a741f96 commit c3765e8
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
1 change: 1 addition & 0 deletions OctoPrint_MeatPack/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ def on_shutdown(self):
def create_serial_obj(self):
if not self._serial_obj:
self._serial_obj = PackingSerial(self._logger)

self._serial_obj.statsUpdateCallback = self.serial_obj_stats_update_callback

def serial_obj_stats_update_callback(self):
Expand Down
6 changes: 3 additions & 3 deletions OctoPrint_MeatPack/packing_serial.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def run(self):
if not self._running:
break

self._serial.write(bytes(note_text, "UTF-8"))
self._serial.write(note_text.encode("UTF-8"))
sleep_per = float(note_len_ms + note_len_offset_ms) / 1000.0
if sleep_per > 0.0:
time.sleep(sleep_per)
Expand Down Expand Up @@ -340,7 +340,7 @@ def _flush_buffer(self):
if len(self._buffer) > 0:
for line in self._buffer:
super(PackingSerial, self).write(self._process_line_bytes(line))
self._buffer.clear()
del self._buffer[:] # clear buffer

# -------------------------------------------------------------------------------
def _process_line_bytes(self, line):
Expand Down Expand Up @@ -373,7 +373,7 @@ def write(self, data):
return total_bytes

# -------------------------------------------------------------------------------
def query_config_state(self, force = False):
def query_config_state(self, force=False):
"""Queries the packing state from the system. Sends command and awaits response"""
if self.isOpen():

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ Getting to the **meat** of g-code. Easy, fast, effective, and automatic g-code c

## OctoPrint Support:

Should be compatible with any OctoPrint installation providing access to the `serial_factory_hook()`. According to the API documentation, this wasintoruced in OctoPrint version 1.2. As far as Python is concerned, version 1.5.14 should be compatible back to 2.7, but it is **highly** recommended to update to Python 3 if you have not yet done so.
Should be compatible with any OctoPrint installation providing access to the `serial_factory_hook()`. According to the API documentation, this wasintoruced in OctoPrint version 1.2. As far as Python is concerned, version 1.5.17 should be compatible back to 2.7, but it is **highly** recommended to update to Python 3 if you have not yet done so.

## Current Features (v1.5.14)
## Current Features (v1.5.17)

1. Fully working g-code compression ("MeatPack") support for compatible printer firmwares. Marlin FW now officially supprots MeatPack, but **[NOTE]** until **Prusa** approves these changes, please find builds of the official Prusa Firmware with compression support here: https://github.com/scottmudge/Prusa-Firmware-MeatPack
2. Added extra data to the "State" side-bar content, updated in real time. It shows transmission statistics:
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
plugin_name = "OctoPrint-MeatPack"

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

# The plugin's description. Can be overwritten within OctoPrint's internal data via __plugin_description__ in the plugin
# module
Expand Down

0 comments on commit c3765e8

Please sign in to comment.