diff options
author | Thomas Kroll <t.kroll@outlook.com> | 2021-01-25 19:45:44 +0100 |
---|---|---|
committer | KevinOConnor <kevin@koconnor.net> | 2021-01-31 19:35:40 -0500 |
commit | 60e4cddf36e00f196e16dd514fa8e9d66670693a (patch) | |
tree | f98e966de1d14908fe2c6d0aa1918b6539b05f7a /klippy/extras/display | |
parent | 58cd8da5d1b984f6812069d1f2129f3deca4f0e2 (diff) | |
download | kutter-60e4cddf36e00f196e16dd514fa8e9d66670693a.tar.gz kutter-60e4cddf36e00f196e16dd514fa8e9d66670693a.tar.xz kutter-60e4cddf36e00f196e16dd514fa8e9d66670693a.zip |
hd44780: Add hd44780 protocol init config
LDO OLED needs a different init string.
Fixes: #3722
Signed-off-by: Thomas Kroll <t.kroll@outlook.com>
Diffstat (limited to 'klippy/extras/display')
-rw-r--r-- | klippy/extras/display/hd44780.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/klippy/extras/display/hd44780.py b/klippy/extras/display/hd44780.py index 5601b567..7d7b5c6b 100644 --- a/klippy/extras/display/hd44780.py +++ b/klippy/extras/display/hd44780.py @@ -21,6 +21,8 @@ class HD44780: ppins = self.printer.lookup_object('pins') pins = [ppins.lookup_pin(config.get(name + '_pin')) for name in ['rs', 'e', 'd4', 'd5', 'd6', 'd7']] + self.hd44780_protocol_init = config.getboolean('hd44780_protocol_init', + True) self.line_length = config.getchoice('line_length', LINE_LENGTH_OPTIONS, LINE_LENGTH_DEFAULT) mcu = None @@ -89,7 +91,10 @@ class HD44780: curtime = self.printer.get_reactor().monotonic() print_time = self.mcu.estimated_print_time(curtime) # Program 4bit / 2-line mode and then issue 0x02 "Home" command - init = [[0x33], [0x33], [0x32], [0x28, 0x28, 0x02]] + if self.hd44780_protocol_init: + init = [[0x33], [0x33], [0x32], [0x28, 0x28, 0x02]] + else: + init = [[0x02]] # Reset (set positive direction ; enable display and hide cursor) init.append([0x06, 0x0c]) for i, cmds in enumerate(init): |