aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2018-09-20 11:10:51 -0400
committerKevinOConnor <kevin@koconnor.net>2018-09-21 16:39:38 -0400
commit2857255ef18fc12a4e04a2850556d7300f8e36f2 (patch)
tree69bec5fa4636a50978ad491fd3d14a0f5f88aa84
parent3d4ee9e9622d9baab28d6ad23fac10fccf191e2a (diff)
downloadkutter-2857255ef18fc12a4e04a2850556d7300f8e36f2.tar.gz
kutter-2857255ef18fc12a4e04a2850556d7300f8e36f2.tar.xz
kutter-2857255ef18fc12a4e04a2850556d7300f8e36f2.zip
icons: Add the bed to the bed heating animations
It isn't necessary to use the st7920's xor capabilities when drawing the bed heating animations. This makes it easier to use the icons for other displays. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
-rw-r--r--klippy/extras/display/display.py12
-rw-r--r--klippy/extras/display/icons.py12
2 files changed, 14 insertions, 10 deletions
diff --git a/klippy/extras/display/display.py b/klippy/extras/display/display.py
index 607f23e5..99d4d197 100644
--- a/klippy/extras/display/display.py
+++ b/klippy/extras/display/display.py
@@ -9,7 +9,10 @@ import logging
import hd44780, st7920, uc1701, icons
import menu
-LCD_chips = { 'st7920': st7920.ST7920, 'hd44780': hd44780.HD44780, 'uc1701' : uc1701.UC1701 }
+LCD_chips = {
+ 'st7920': st7920.ST7920, 'hd44780': hd44780.HD44780,
+ 'uc1701' : uc1701.UC1701
+}
M73_TIMEOUT = 5.
class PrinterLCD:
@@ -46,8 +49,8 @@ class PrinterLCD:
self.gcode.register_command('M73', self.cmd_M73)
self.gcode.register_command('M117', self.cmd_M117)
# Load glyphs
- self.load_glyph(self.BED1_GLYPH, icons.heat1_icon)
- self.load_glyph(self.BED2_GLYPH, icons.heat2_icon)
+ self.load_glyph(self.BED1_GLYPH, icons.bed_heat1_icon)
+ self.load_glyph(self.BED2_GLYPH, icons.bed_heat2_icon)
self.load_glyph(self.FAN1_GLYPH, icons.fan1_icon)
self.load_glyph(self.FAN2_GLYPH, icons.fan2_icon)
# Start screen update timer
@@ -172,10 +175,11 @@ class PrinterLCD:
extruder_count = 2
if self.heater_bed is not None:
info = self.heater_bed.get_status(eventtime)
- self.draw_icon(0, extruder_count, icons.bed_icon)
if info['target']:
self.animate_glyphs(eventtime, 0, extruder_count,
self.BED1_GLYPH, True)
+ else:
+ self.draw_icon(0, extruder_count, icons.bed_icon)
self.draw_heater(2, extruder_count, info)
# Fan speed
if self.fan is not None:
diff --git a/klippy/extras/display/icons.py b/klippy/extras/display/icons.py
index 6ad89397..94701176 100644
--- a/klippy/extras/display/icons.py
+++ b/klippy/extras/display/icons.py
@@ -42,7 +42,7 @@ bed_icon = [
0b0000000000000000
]
-heat1_icon = [
+bed_heat1_icon = [
0b0000000000000000,
0b0000000000000000,
0b0010001000100000,
@@ -55,13 +55,13 @@ heat1_icon = [
0b0001000100010000,
0b0000100010001000,
0b0000000000000000,
- 0b0000000000000000,
- 0b0000000000000000,
+ 0b0111111111111110,
+ 0b0111111111111110,
0b0000000000000000,
0b0000000000000000
]
-heat2_icon = [
+bed_heat2_icon = [
0b0000000000000000,
0b0000000000000000,
0b0000100010001000,
@@ -74,8 +74,8 @@ heat2_icon = [
0b0000100010001000,
0b0001000100010000,
0b0000000000000000,
- 0b0000000000000000,
- 0b0000000000000000,
+ 0b0111111111111110,
+ 0b0111111111111110,
0b0000000000000000,
0b0000000000000000
]