From 58aa8673f84e1b3798fc0e9fd82524c24899ef7e Mon Sep 17 00:00:00 2001 From: Franziska Kunsmann Date: Sat, 26 Sep 2020 11:12:36 +0200 Subject: [PATCH] prepare for plugin repository --- octoprint_hd44780/__init__.py | 15 ++++++++------- setup.py | 10 +++++----- 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/octoprint_hd44780/__init__.py b/octoprint_hd44780/__init__.py index 6e0597a..1a02b0a 100644 --- a/octoprint_hd44780/__init__.py +++ b/octoprint_hd44780/__init__.py @@ -1,7 +1,5 @@ # coding=utf-8 -from __future__ import absolute_import - __author__ = "Franziska Kunsmann " __license__ = "GNU Affero General Public License http://www.gnu.org/licenses/agpl.html" __copyright__ = "Copyright (C) 2017 Franziska Kunsmann - Released under terms of the AGPLv3 License" @@ -20,6 +18,7 @@ class LCD_HD44780(octoprint.plugin.StartupPlugin, self._pin_to_gpio_rev3 = [-1, -1, -1, 2, -1, 3, -1, 4, 14, -1, 15, 17, 18, 27, -1, 22, 23, -1, 24, 10, -1, 9, 25, 11, 8, -1, 7, -1, -1, 5, -1, 6, 12, 13, -1, 19, 16, 26, 20, -1, 21 ] self._configuredGPIOPins = [] + # FIXME hardcoded GPIO pins self.pin_rs = 15 self.pin_e = 16 self.pin_d4 = 21 @@ -95,6 +94,7 @@ class LCD_HD44780(octoprint.plugin.StartupPlugin, self._configuredGPIOPins = [self._gpio_get_pin(self.pin_rs), self._gpio_get_pin(self.pin_e), self._gpio_get_pin(self.pin_d4), self._gpio_get_pin(self.pin_d5), self._gpio_get_pin(self.pin_d6), self._gpio_get_pin(self.pin_d7)] + # FIXME hardcoded LCD size self._lcd_send_byte(0x33, self._lcd_cmd) self._lcd_send_byte(0x32, self._lcd_cmd) self._lcd_send_byte(0x28, self._lcd_cmd) @@ -146,11 +146,11 @@ class LCD_HD44780(octoprint.plugin.StartupPlugin, GPIO.output(self._gpio_get_pin(self.pin_d6), GPIO.HIGH) if bits & 0x80 == 0x80: GPIO.output(self._gpio_get_pin(self.pin_d7), GPIO.HIGH) - time.sleep(self._lcd_delay) + time.sleep(self._lcd_delay) GPIO.output(self._gpio_get_pin(self.pin_e), GPIO.HIGH) time.sleep(self._lcd_pulse) GPIO.output(self._gpio_get_pin(self.pin_e), GPIO.LOW) - time.sleep(self._lcd_delay) + time.sleep(self._lcd_delay) GPIO.output(self._gpio_get_pin(self.pin_d4), GPIO.LOW) GPIO.output(self._gpio_get_pin(self.pin_d5), GPIO.LOW) GPIO.output(self._gpio_get_pin(self.pin_d6), GPIO.LOW) @@ -163,11 +163,11 @@ class LCD_HD44780(octoprint.plugin.StartupPlugin, GPIO.output(self._gpio_get_pin(self.pin_d6), GPIO.HIGH) if bits&0x08==0x08: GPIO.output(self._gpio_get_pin(self.pin_d7), GPIO.HIGH) - time.sleep(self._lcd_delay) + time.sleep(self._lcd_delay) GPIO.output(self._gpio_get_pin(self.pin_e), GPIO.HIGH) time.sleep(self._lcd_pulse) GPIO.output(self._gpio_get_pin(self.pin_e), GPIO.LOW) - time.sleep(self._lcd_delay) + time.sleep(self._lcd_delay) def on_printer_add_temperature(self, data): if not self._ClosedOrError: @@ -209,7 +209,8 @@ class LCD_HD44780(octoprint.plugin.StartupPlugin, __plugin_name__ = "LCD: HD44780-compatible" - +__plugin_author__ = "Kunsi" +__plugin_pythoncompat__ = ">=3,<4" def __plugin_load__(): global __plugin_implementation__ __plugin_implementation__ = LCD_HD44780() diff --git a/setup.py b/setup.py index a86cdfc..a382a88 100644 --- a/setup.py +++ b/setup.py @@ -1,20 +1,20 @@ # coding=utf-8 import setuptools -######################################################################################################################## +######################################################################## plugin_identifier = "hd44780" plugin_package = "octoprint_%s" % plugin_identifier plugin_name = "OctoPrint-LCD-HD44780" plugin_version = "0.1" plugin_description = "Display useful information on a connected HD44780 compatible display." -plugin_author = "Felix Kunsmann" -plugin_author_email = "felix@kunsmann.eu" -plugin_url = "https://github.com/Kunsi/Octoprint-LCD-HD44780" +plugin_author = "Franziska Kunsmann" +plugin_author_email = "hi@kunsmann.eu" +plugin_url = "https://git.kunsmann.eu/kunsi/Octoprint-LCD-HD44780" plugin_license = "AGPLv3" plugin_additional_data = [] -######################################################################################################################## +######################################################################## def package_data_dirs(source, sub_folders): import os