Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
31546f0020 | ||
|
|
aac58bd885 | ||
|
|
7ca118de86 | ||
|
|
7420f38b15 | ||
|
|
6aa7f56231 | ||
|
|
504d395661 | ||
|
|
a77134d63b | ||
|
|
c763bd5a5b | ||
|
|
228994b2f2 | ||
|
|
3a5427c7f0 | ||
|
|
b42043bc79 | ||
|
|
b3268223bb | ||
|
|
430284b7a1 | ||
|
|
8ad21ab7cb | ||
|
|
8ba28fde1c | ||
|
|
7078e52a4f | ||
|
|
b555768980 | ||
|
|
2c6a853a80 | ||
|
|
3ea0b09863 | ||
|
|
618c9ac0e8 | ||
|
|
a84cb63f8b | ||
|
|
0a8e757054 | ||
|
|
0fb2046615 | ||
|
|
583397ebeb | ||
|
|
4bace34847 | ||
|
|
dd72e7d46a | ||
|
|
013b50985f | ||
|
|
dc9cf760db | ||
|
|
979217502d | ||
|
|
1ff0616457 | ||
|
|
e09d72f12d | ||
|
|
ab38dab291 | ||
|
|
c33659c6f7 | ||
|
|
c81836542a | ||
|
|
cdb57f73bb | ||
|
|
1e7c065ce4 | ||
|
|
b7d58a7ffb |
No files matched your search
@@ -2,17 +2,14 @@
|
||||
|
||||
KlipperScreen is a touchscreen GUI that interfaces with [Klipper](https://github.com/kevinOConnor/klipper) via [Moonraker](https://github.com/arksine/moonraker). It can switch between multiple printers to access them from a single location, and it doesn't even need to run on the same host, you can install it on another device and configure the IP address to access the printer.
|
||||
|
||||
### Documentation
|
||||
### Documentation [](https://klipperscreen.readthedocs.io/en/latest/?badge=latest)
|
||||
|
||||
[Click here to access the documentation.](https://klipperscreen.readthedocs.io/en/latest/)
|
||||
|
||||
|
||||
### Inspiration
|
||||
KlipperScreen was inspired by [OctoScreen](https://github.com/Z-Bolt/OctoScreen/) and the need for a touchscreen GUI that
|
||||
will natively work with [Klipper](https://github.com/kevinOConnor/klipper) and [Moonraker](https://github.com/arksine/moonraker).
|
||||
|
||||
[](https://klipperscreen.readthedocs.io/en/latest/Panels/)
|
||||
|
||||

|
||||
|
||||
|
||||
[More Screenshots](https://klipperscreen.readthedocs.io/en/latest/Panels/)
|
||||
[More Screenshots](https://klipperscreen.readthedocs.io/en/latest/Panels/)
|
||||
@@ -106,6 +106,14 @@ temperature_fan: 40
|
||||
gcode: MY_HEATSOAK_MACRO
|
||||
```
|
||||
|
||||
There is an special preheat setting named cooldown to do additional things when the _cooldown_ button is pressed
|
||||
for example:
|
||||
|
||||
```
|
||||
[preheat cooldown]
|
||||
gcode: M107
|
||||
```
|
||||
|
||||
## Bed Screws
|
||||
```
|
||||
[bed_screws]
|
||||
|
||||
@@ -19,13 +19,11 @@ Check the file `/var/log/Xorg.0.log` where you can find issues with the X server
|
||||
xf86OpenConsole: Cannot open virtual console 2 (Permission denied)
|
||||
```
|
||||
|
||||
* Check /etc/X11/Xwrapper.conf
|
||||
Run `cat /etc/X11/Xwrapper.conf`
|
||||
* Run `cat /etc/X11/Xwrapper.config`
|
||||
|
||||
This should have the line `allowed_users=anybody` in it
|
||||
|
||||
* Check /etc/group
|
||||
Run `cat /etc/group | grep tty`
|
||||
* Run `cat /etc/group | grep tty`
|
||||
|
||||
If your username is not listed under that line, you need to add it with the following command:
|
||||
|
||||
@@ -33,6 +31,7 @@ If your username is not listed under that line, you need to add it with the foll
|
||||
|
||||
If it's still failing, try: `sudo apt install xserver-xorg-legacy`
|
||||
|
||||
As a last resort add `needs_root_rights=yes` to `/etc/X11/Xwrapper.config`
|
||||
|
||||
## Screen shows console instead of KlipperScreen
|
||||
|
||||
@@ -75,7 +74,11 @@ to:
|
||||
and reboot, that should make the touch work, if your screen is rotated 180 degrees, then you may need to adjust
|
||||
[the touch rotation](Hardware.md) as described in the Hardware page.
|
||||
|
||||
## OctoPrint
|
||||
|
||||
KlipperScreen was never intended to be used with OctoPrint, and there is no support for it.
|
||||
|
||||
## Other issues
|
||||
|
||||
If you found an issue not listed here, or can't make it work, please provide all the log files
|
||||
a description of your hw, and a description of the issue when asking for support.
|
||||
a description of your hw, and a description of the issue when asking for support.
|
||||
@@ -0,0 +1,2 @@
|
||||
jinja2<3.1
|
||||
mkdocs
|
||||
+25
-88
@@ -7,8 +7,6 @@ import pathlib
|
||||
gi.require_version("Gtk", "3.0")
|
||||
from gi.repository import Gdk, GdkPixbuf, Gio, Gtk, Pango
|
||||
|
||||
klipperscreendir = pathlib.Path(__file__).parent.resolve().parent
|
||||
|
||||
class KlippyGtk:
|
||||
labels = {}
|
||||
keyboard_ratio = .22
|
||||
@@ -19,7 +17,8 @@ class KlippyGtk:
|
||||
self.screen = screen
|
||||
self.width = width
|
||||
self.height = height
|
||||
self.theme = theme
|
||||
self.themedir = os.path.join(pathlib.Path(__file__).parent.resolve().parent, "styles", theme, "images")
|
||||
|
||||
if self.screen.vertical_mode:
|
||||
self.font_ratio = [33, 49]
|
||||
else:
|
||||
@@ -114,61 +113,23 @@ class KlippyGtk:
|
||||
la.get_style_context().add_class(style)
|
||||
return la
|
||||
|
||||
def ImageLabel(self, image_name, text, size=20, style=False, width_scale=.32, height_scale=.32):
|
||||
box1 = Gtk.Box(orientation=Gtk.Orientation.HORIZONTAL, spacing=15)
|
||||
pixbuf = GdkPixbuf.Pixbuf.new_from_file_at_scale(
|
||||
os.path.join(klipperscreendir, "styles", self.theme, "images", str(image_name) + ".svg"),
|
||||
int(round(self.img_width * width_scale)), int(round(self.img_height * height_scale)), True)
|
||||
|
||||
image = Gtk.Image.new_from_pixbuf(pixbuf)
|
||||
|
||||
label = Gtk.Label()
|
||||
label.set_markup(text)
|
||||
box1.add(image)
|
||||
box1.add(label)
|
||||
|
||||
if style is not False:
|
||||
ctx = box1.get_style_context()
|
||||
ctx.add_class(style)
|
||||
|
||||
return {"l": label, "b": box1}
|
||||
|
||||
def ImageMenuButton(self, image_name, text, size=20, style=False, width_scale=.32, height_scale=.32, popover=False):
|
||||
box1 = Gtk.Box(orientation=Gtk.Orientation.HORIZONTAL, spacing=15)
|
||||
pixbuf = GdkPixbuf.Pixbuf.new_from_file_at_scale(
|
||||
os.path.join(klipperscreendir, "styles", self.theme, "images", str(image_name) + ".svg"),
|
||||
int(round(self.img_width * width_scale)), int(round(self.img_height * height_scale)), True)
|
||||
|
||||
image = Gtk.Image.new_from_pixbuf(pixbuf)
|
||||
|
||||
mb = Gtk.MenuButton(label="", popover=popover)
|
||||
label = mb.get_label()
|
||||
box1.add(image)
|
||||
box1.add(mb)
|
||||
|
||||
if style is not False:
|
||||
ctx = box1.get_style_context()
|
||||
ctx.add_class(style)
|
||||
|
||||
return {"l": label, "mb": mb, "b": box1}
|
||||
|
||||
def Image(self, image_name, style=False, width_scale=1, height_scale=1):
|
||||
pixbuf = GdkPixbuf.Pixbuf.new_from_file_at_scale(
|
||||
os.path.join(klipperscreendir, "styles", self.theme, "images", str(image_name)),
|
||||
int(round(self.img_width * width_scale)), int(round(self.img_height * height_scale)), True)
|
||||
|
||||
return Gtk.Image.new_from_pixbuf(pixbuf)
|
||||
|
||||
def ImageFromFile(self, filename, style=False, width_scale=1, height_scale=1):
|
||||
pixbuf = GdkPixbuf.Pixbuf.new_from_file_at_scale(
|
||||
filename, int(round(self.img_width * width_scale)), int(round(self.img_height * height_scale)), True)
|
||||
|
||||
return Gtk.Image.new_from_pixbuf(pixbuf)
|
||||
def Image(self, image_name, scale=1):
|
||||
filename = os.path.join(self.themedir, str(image_name) + ".svg")
|
||||
if os.path.exists(filename):
|
||||
pixbuf = GdkPixbuf.Pixbuf.new_from_file_at_scale(filename,
|
||||
int(round(self.img_width * scale)),
|
||||
int(round(self.img_height * scale)),
|
||||
True)
|
||||
return Gtk.Image.new_from_pixbuf(pixbuf)
|
||||
else:
|
||||
logging.error("Unable to find image %s", filename)
|
||||
return Gtk.Image()
|
||||
|
||||
def PixbufFromFile(self, filename, style=False, width_scale=1, height_scale=1):
|
||||
pixbuf = GdkPixbuf.Pixbuf.new_from_file_at_scale(
|
||||
filename, int(round(self.img_width * width_scale)), int(round(self.img_height * height_scale)), True)
|
||||
|
||||
pixbuf = GdkPixbuf.Pixbuf.new_from_file_at_scale(filename,
|
||||
int(round(self.img_width * width_scale)),
|
||||
int(round(self.img_height * height_scale)),
|
||||
True)
|
||||
return pixbuf
|
||||
|
||||
def PixbufFromHttp(self, resource, style=False, width_scale=1, height_scale=1):
|
||||
@@ -176,9 +137,10 @@ class KlippyGtk:
|
||||
if response is False:
|
||||
return None
|
||||
stream = Gio.MemoryInputStream.new_from_data(response, None)
|
||||
pixbuf = GdkPixbuf.Pixbuf.new_from_stream_at_scale(
|
||||
stream, int(round(self.img_width * width_scale)), int(round(self.img_height * height_scale)), True)
|
||||
|
||||
pixbuf = GdkPixbuf.Pixbuf.new_from_stream_at_scale(stream,
|
||||
int(round(self.img_width * width_scale)),
|
||||
int(round(self.img_height * height_scale)),
|
||||
True)
|
||||
return pixbuf
|
||||
|
||||
def ProgressBar(self, style=False):
|
||||
@@ -202,31 +164,16 @@ class KlippyGtk:
|
||||
b.connect("clicked", self.screen.reset_screensaver_timeout)
|
||||
return b
|
||||
|
||||
def ButtonImage(self, image_name, label=None, style=None, width_scale=1.38, height_scale=1.38,
|
||||
def ButtonImage(self, image_name, label=None, style=None, scale=1.38,
|
||||
position=Gtk.PositionType.TOP, word_wrap=True):
|
||||
filename = os.path.join(klipperscreendir, "styles", self.theme, "images", str(image_name) + ".svg")
|
||||
if not os.path.exists(filename):
|
||||
logging.error("Unable to find button image (theme, image): (%s, %s)" % (self.theme, str(image_name)))
|
||||
filename = os.path.join(klipperscreendir, "styles", self.theme, "images", "warning.svg")
|
||||
|
||||
b = Gtk.Button(label=label)
|
||||
|
||||
if os.path.exists(filename):
|
||||
pixbuf = GdkPixbuf.Pixbuf.new_from_file_at_scale(
|
||||
filename,
|
||||
int(round(self.img_width * width_scale)),
|
||||
int(round(self.img_height * height_scale)),
|
||||
True
|
||||
)
|
||||
img = Gtk.Image.new_from_pixbuf(pixbuf)
|
||||
b.set_image(img)
|
||||
|
||||
b.set_hexpand(True)
|
||||
b.set_vexpand(True)
|
||||
b.set_can_focus(False)
|
||||
b.set_image(self.Image(image_name, scale))
|
||||
b.set_image_position(position)
|
||||
b.set_always_show_image(True)
|
||||
b.props.relief = Gtk.ReliefStyle.NONE
|
||||
|
||||
if word_wrap is True:
|
||||
try:
|
||||
@@ -276,25 +223,15 @@ class KlippyGtk:
|
||||
return dialog
|
||||
|
||||
|
||||
def ToggleButtonImage(self, image_name, label, style=False, width_scale=1.38, height_scale=1.38):
|
||||
filename = os.path.join(klipperscreendir, "styles", self.theme, "images", str(image_name) + ".svg")
|
||||
pixbuf = GdkPixbuf.Pixbuf.new_from_file_at_scale(
|
||||
filename,
|
||||
int(round(self.img_width * width_scale)),
|
||||
int(round(self.img_height * height_scale)),
|
||||
True
|
||||
)
|
||||
|
||||
img = Gtk.Image.new_from_pixbuf(pixbuf)
|
||||
def ToggleButtonImage(self, image_name, label, style=False, scale=1.38):
|
||||
|
||||
b = Gtk.ToggleButton(label=label)
|
||||
b.set_image(img)
|
||||
b.set_hexpand(True)
|
||||
b.set_vexpand(True)
|
||||
b.set_can_focus(False)
|
||||
b.set_image(self.Image(image_name, scale))
|
||||
b.set_image_position(Gtk.PositionType.TOP)
|
||||
b.set_always_show_image(True)
|
||||
b.props.relief = Gtk.ReliefStyle.NONE
|
||||
|
||||
if style is not False:
|
||||
ctx = b.get_style_context()
|
||||
|
||||
@@ -154,6 +154,12 @@ name: {{ gettext('Network') }}
|
||||
icon: network
|
||||
panel: network
|
||||
|
||||
[menu __main config retraction]
|
||||
name: {{ gettext('Retraction') }}
|
||||
icon: retract
|
||||
panel: retraction
|
||||
enable: {{ printer.firmware_retraction }}
|
||||
|
||||
[menu __main config system]
|
||||
name: {{ gettext('System') }}
|
||||
icon: info
|
||||
@@ -222,6 +228,12 @@ name: {{ gettext('Network') }}
|
||||
icon: network
|
||||
panel: network
|
||||
|
||||
[menu __print retraction]
|
||||
name: {{ gettext('Retraction') }}
|
||||
icon: retract
|
||||
panel: retraction
|
||||
enable: {{ printer.firmware_retraction }}
|
||||
|
||||
[menu __print system]
|
||||
name: {{ gettext('System') }}
|
||||
icon: info
|
||||
|
||||
+10
-3
@@ -151,14 +151,21 @@ class KlippyFiles():
|
||||
return False
|
||||
|
||||
def get_thumbnail_location(self, filename):
|
||||
if not self.has_thumbnail(filename):
|
||||
return None
|
||||
|
||||
thumb = self.files[filename]['thumbnails'][0]
|
||||
if thumb['local'] is False:
|
||||
return ['http', thumb['path']]
|
||||
return ['file', thumb['path']]
|
||||
|
||||
def get_thumbnail_scale(self, filename):
|
||||
width = self.files[filename]['thumbnails'][0]['width']
|
||||
height = self.files[filename]['thumbnails'][0]['height']
|
||||
logging.info("Thumb size: %d %d" % (width, height))
|
||||
w = 400 / width
|
||||
h = 300 / height
|
||||
factor = min(w, h)
|
||||
logging.info("Thumb scale w:%.2f h:%.2f final:%.2f" % (w, h, factor))
|
||||
return factor
|
||||
|
||||
def has_thumbnail(self, filename):
|
||||
if filename not in self.files:
|
||||
return False
|
||||
|
||||
Binary file not shown.
@@ -202,7 +202,7 @@ msgid ""
|
||||
"Restart"
|
||||
msgstr ""
|
||||
"Firmware\n"
|
||||
"Újrakezd"
|
||||
"Újraindítása"
|
||||
|
||||
msgid "Font Size"
|
||||
msgstr "Betűméret"
|
||||
@@ -215,7 +215,7 @@ msgstr ""
|
||||
"Frissítés"
|
||||
|
||||
msgid "Go Back"
|
||||
msgstr "Menj vissza"
|
||||
msgstr "Visszalépés"
|
||||
|
||||
msgid "Hidden"
|
||||
msgstr "Rejtett"
|
||||
@@ -282,7 +282,7 @@ msgid ""
|
||||
"Restart"
|
||||
msgstr ""
|
||||
"Klipper\n"
|
||||
"Újrakezd"
|
||||
"Újraindítása"
|
||||
|
||||
msgid "Klipper has disconnected"
|
||||
msgstr "Klipper szétkapcsolt"
|
||||
@@ -491,7 +491,7 @@ msgid "Slicer"
|
||||
msgstr "Szeletelő"
|
||||
|
||||
msgid "Slicer Time correction (%)"
|
||||
msgstr "Szeletelő idő korrekciója (%)"
|
||||
msgstr "Szeletelő idő javítása (%)"
|
||||
|
||||
msgid "Small"
|
||||
msgstr "Kicsi"
|
||||
@@ -566,9 +566,8 @@ msgid "Up To Date"
|
||||
msgstr "Naprakész"
|
||||
|
||||
msgid "Update"
|
||||
msgstr "Frissítés"
|
||||
msgstr "Frissít"
|
||||
|
||||
#, fuzzy
|
||||
msgid "Updating"
|
||||
msgstr "Frissítés"
|
||||
|
||||
@@ -603,7 +602,7 @@ msgid "Z Position"
|
||||
msgstr "Z Pozíció"
|
||||
|
||||
msgid "Z Tilt"
|
||||
msgstr "Z Dönt"
|
||||
msgstr "Z Dőlés"
|
||||
|
||||
msgid "Z+"
|
||||
msgstr "Z+"
|
||||
|
||||
Binary file not shown.
@@ -0,0 +1,673 @@
|
||||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
|
||||
# This file is distributed under the same license as the PACKAGE package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: \n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2022-03-31 11:25-0300\n"
|
||||
"PO-Revision-Date: 2022-04-15 17:25+0200\n"
|
||||
"Last-Translator: \n"
|
||||
"Language-Team: \n"
|
||||
"Language: sv_SE\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||
"X-Generator: Poedit 3.0.1\n"
|
||||
|
||||
#, python-format
|
||||
msgid "%s will be updated to version"
|
||||
msgstr "%s uppdateras till version"
|
||||
|
||||
msgid "(default)"
|
||||
msgstr "(standard)"
|
||||
|
||||
msgid "24 Hour Time"
|
||||
msgstr "24 timmars tid"
|
||||
|
||||
msgid "A FIRMWARE_RESTART may fix the issue."
|
||||
msgstr "En FIRMWARE_RESTART kan lösa problemet."
|
||||
|
||||
msgid "Abort"
|
||||
msgstr "Avbryt"
|
||||
|
||||
msgid "Accept"
|
||||
msgstr "Godkänn"
|
||||
|
||||
msgid "Actions"
|
||||
msgstr "Åtgärder"
|
||||
|
||||
msgid "Add Printer"
|
||||
msgstr "Lägg till skrivare"
|
||||
|
||||
msgid "Add bed mesh profile"
|
||||
msgstr "Lägg till mesh profil"
|
||||
|
||||
msgid "Are you sure you want to run Emergency Stop?"
|
||||
msgstr "Är du säker på att du vill köra Nödstopp?"
|
||||
|
||||
msgid "Are you sure you wish to cancel this print?"
|
||||
msgstr "Är du säker på att du vill avbryta denna utskrift?"
|
||||
|
||||
msgid "Are you sure you wish to disable motors?"
|
||||
msgstr "Är du säker på att du vill inaktivera motorer?"
|
||||
|
||||
msgid "Are you sure you wish to reboot the system?"
|
||||
msgstr "Är du säker på att du vill starta om systemet?"
|
||||
|
||||
msgid "Are you sure you wish to shutdown the system?"
|
||||
msgstr "Är du säker på att du vill stänga av systemet?"
|
||||
|
||||
msgid "Auto"
|
||||
msgstr "Automatisk"
|
||||
|
||||
msgid "Auto-scroll"
|
||||
msgstr "Auto-scrolla"
|
||||
|
||||
#, fuzzy
|
||||
msgid "Bed Level"
|
||||
msgstr "Bed Level"
|
||||
|
||||
#, fuzzy
|
||||
msgid "Bed Mesh"
|
||||
msgstr "Bed Mesh"
|
||||
|
||||
msgid "Bltouch found applied offset"
|
||||
msgstr "Bltouch hittade tillämpad offset"
|
||||
|
||||
msgid "Calibrate"
|
||||
msgstr "Kalibrera"
|
||||
|
||||
msgid "Calibrated, save configuration to make it permanent"
|
||||
msgstr "Kalibrerad, spara konfiguration för att göra den permanent"
|
||||
|
||||
msgid "Can't set above the maximum:"
|
||||
msgstr "Kan inte ställa in över maxgränsen:"
|
||||
|
||||
msgid "Cancel"
|
||||
msgstr "Avbryt"
|
||||
|
||||
msgid "Cancel Print"
|
||||
msgstr "Avbryt utskrift"
|
||||
|
||||
msgid "Cancelled"
|
||||
msgstr "Avbruten"
|
||||
|
||||
msgid "Cancelling"
|
||||
msgstr "Avbryter"
|
||||
|
||||
msgid "Cannot connect to Moonraker"
|
||||
msgstr "Kan inte ansluta till Moonraker"
|
||||
|
||||
#, fuzzy
|
||||
msgid "Channel"
|
||||
msgstr "Kanal"
|
||||
|
||||
msgid ""
|
||||
"Check /tmp/KlipperScreen.log for more information.\n"
|
||||
"Please submit an issue on GitHub for help."
|
||||
msgstr ""
|
||||
"Kontrollera /tmp/KlipperScreen.log för mer information.\n"
|
||||
"Skicka in ett problem på GitHub för hjälp."
|
||||
|
||||
msgid "Close"
|
||||
msgstr "Stäng"
|
||||
|
||||
msgid "Complete"
|
||||
msgstr "Färdig"
|
||||
|
||||
msgid "Configuration"
|
||||
msgstr "Konfiguration"
|
||||
|
||||
msgid "Confirm Emergency Stop"
|
||||
msgstr "Bekräfta nödstopp"
|
||||
|
||||
msgid "Connected"
|
||||
msgstr "Ansluten"
|
||||
|
||||
#, python-format
|
||||
msgid "Connecting to %s"
|
||||
msgstr "Ansluter till %s"
|
||||
|
||||
msgid "Console"
|
||||
msgstr "Konsol"
|
||||
|
||||
msgid "Continue"
|
||||
msgstr "Fortsätt"
|
||||
|
||||
msgid "Cooldown"
|
||||
msgstr "Nedkylning"
|
||||
|
||||
msgid "Date"
|
||||
msgstr "Datum"
|
||||
|
||||
msgid "Decrease"
|
||||
msgstr "Minska"
|
||||
|
||||
msgid "Delete"
|
||||
msgstr "Radera"
|
||||
|
||||
msgid "Deselect"
|
||||
msgstr "Avmarkera"
|
||||
|
||||
msgid "Disable Motors"
|
||||
msgstr "Inaktivera motorer"
|
||||
|
||||
msgid "Disable XY"
|
||||
msgstr "Inaktivera XY"
|
||||
|
||||
msgid "Displayed Macros"
|
||||
msgstr "Makron visas"
|
||||
|
||||
msgid "Distance (mm)"
|
||||
msgstr "Avstånd (mm)"
|
||||
|
||||
#, python-format
|
||||
msgid "Do you want to recover %s?"
|
||||
msgstr "Vill du återställa %s?"
|
||||
|
||||
msgid "Elapsed:"
|
||||
msgstr "Förfluten:"
|
||||
|
||||
msgid "Error"
|
||||
msgstr "Fel"
|
||||
|
||||
#, fuzzy
|
||||
msgid "Estimated Time Method"
|
||||
msgstr "Uppskattad tid metod"
|
||||
|
||||
msgid "Extrude"
|
||||
msgstr "Extrudera"
|
||||
|
||||
msgid "Extrusion +"
|
||||
msgstr "Extrudering +"
|
||||
|
||||
msgid "Extrusion -"
|
||||
msgstr "Extrudering -"
|
||||
|
||||
msgid "Failed, adjust position first"
|
||||
msgstr "Misslyckades, justera positionen först"
|
||||
|
||||
msgid "Fan"
|
||||
msgstr "Fläkt"
|
||||
|
||||
#, fuzzy
|
||||
msgid "Filament Used"
|
||||
msgstr "Filament använt"
|
||||
|
||||
msgid "File"
|
||||
msgstr "Fil"
|
||||
|
||||
msgid "Fine Tuning"
|
||||
msgstr "Finjustering"
|
||||
|
||||
msgid "Finish"
|
||||
msgstr "Slutför"
|
||||
|
||||
msgid ""
|
||||
"Firmware\n"
|
||||
"Restart"
|
||||
msgstr ""
|
||||
"Firmware\n"
|
||||
"Omstart"
|
||||
|
||||
msgid "Font Size"
|
||||
msgstr "Textstorlek"
|
||||
|
||||
msgid ""
|
||||
"Full\n"
|
||||
"Update"
|
||||
msgstr ""
|
||||
"Fullständig\n"
|
||||
"Uppdatering"
|
||||
|
||||
msgid "Go Back"
|
||||
msgstr "Gå tillbaka"
|
||||
|
||||
msgid "Hidden"
|
||||
msgstr "Dold"
|
||||
|
||||
msgid "Hide"
|
||||
msgstr "Dölj"
|
||||
|
||||
msgid "Hide sensors in Temp."
|
||||
msgstr "Dölj sensorer i Temp."
|
||||
|
||||
msgid "Home"
|
||||
msgstr "Hem"
|
||||
|
||||
msgid "Home All"
|
||||
msgstr "Hem Alla"
|
||||
|
||||
msgid "Home X"
|
||||
msgstr "Hem X"
|
||||
|
||||
msgid "Home XY"
|
||||
msgstr "Hem XY"
|
||||
|
||||
msgid "Home Y"
|
||||
msgstr "Hem Y"
|
||||
|
||||
msgid "Home Z"
|
||||
msgstr "Hem Z"
|
||||
|
||||
#, fuzzy
|
||||
msgid "Homing"
|
||||
msgstr "Homing"
|
||||
|
||||
msgid "Hostname"
|
||||
msgstr "Värdnamn"
|
||||
|
||||
msgid "Icon Theme"
|
||||
msgstr "Ikon tema"
|
||||
|
||||
msgid "Increase"
|
||||
msgstr "Öka"
|
||||
|
||||
msgid "Initializing"
|
||||
msgstr "Initierar"
|
||||
|
||||
msgid "Initializing printer..."
|
||||
msgstr "Initierar skrivaren..."
|
||||
|
||||
msgid "Interface"
|
||||
msgstr "Gränssnitt"
|
||||
|
||||
msgid "Invalid"
|
||||
msgstr "Ogiltig"
|
||||
|
||||
msgid "Invert X"
|
||||
msgstr "Invertera X"
|
||||
|
||||
msgid "Invert Y"
|
||||
msgstr "Invertera Y"
|
||||
|
||||
msgid "Invert Z"
|
||||
msgstr "Invertera Z"
|
||||
|
||||
msgid ""
|
||||
"Klipper\n"
|
||||
"Restart"
|
||||
msgstr ""
|
||||
"Klipper\n"
|
||||
"Omstart"
|
||||
|
||||
#, fuzzy
|
||||
msgid "Klipper has disconnected"
|
||||
msgstr "Klipper har kopplat från"
|
||||
|
||||
msgid "Klipper has encountered an error."
|
||||
msgstr "Klipper har stött på ett fel."
|
||||
|
||||
msgid "Klipper has shutdown"
|
||||
msgstr "Klipper har stängts av"
|
||||
|
||||
msgid "Klipper is attempting to start"
|
||||
msgstr "Klipper försöker starta"
|
||||
|
||||
msgid "Klipper will reboot"
|
||||
msgstr "Klipper kommer att starta om"
|
||||
|
||||
msgid "Language"
|
||||
msgstr "Språk"
|
||||
|
||||
msgid "Large"
|
||||
msgstr "Stor"
|
||||
|
||||
msgid "Left:"
|
||||
msgstr "Återstående:"
|
||||
|
||||
msgid "Limits"
|
||||
msgstr "Begränsningar"
|
||||
|
||||
msgid "Load"
|
||||
msgstr "Ladda"
|
||||
|
||||
msgid "Lower Nozzle"
|
||||
msgstr "Sänk munstycket"
|
||||
|
||||
msgid "Macro shortcut on sidebar"
|
||||
msgstr "Makro genväg på sidofältet"
|
||||
|
||||
msgid "Macros"
|
||||
msgstr "Makron"
|
||||
|
||||
msgid "Main Menu"
|
||||
msgstr "Huvudmeny"
|
||||
|
||||
#, fuzzy
|
||||
msgid "Max Accelation"
|
||||
msgstr "Maximal acceleration"
|
||||
|
||||
#, fuzzy
|
||||
msgid "Max Acceleration to Deceleration"
|
||||
msgstr "Maximal acceleration till inbromsning"
|
||||
|
||||
#, fuzzy
|
||||
msgid "Max Velocity"
|
||||
msgstr "Maximal hastighet"
|
||||
|
||||
msgid "Medium"
|
||||
msgstr "Medium"
|
||||
|
||||
msgid "Menu"
|
||||
msgstr "Meny"
|
||||
|
||||
msgid "Modified"
|
||||
msgstr "Ändrad"
|
||||
|
||||
msgid "Moonraker: connected"
|
||||
msgstr "Moonraker: ansluten"
|
||||
|
||||
msgid "Move"
|
||||
msgstr "Flytta"
|
||||
|
||||
msgid "Move Distance (mm)"
|
||||
msgstr "Förflyttningsavstånd (mm)"
|
||||
|
||||
msgid "Name"
|
||||
msgstr "Namn"
|
||||
|
||||
msgid "Network"
|
||||
msgstr "Nätverk"
|
||||
|
||||
msgid "Nothing selected"
|
||||
msgstr "Inget valt"
|
||||
|
||||
msgid "Off"
|
||||
msgstr "Avstängd"
|
||||
|
||||
#, fuzzy, python-format
|
||||
msgid "Outdated by %d"
|
||||
msgstr "Föråldrad med %d"
|
||||
|
||||
msgid "PSK for"
|
||||
msgstr "PSK för"
|
||||
|
||||
msgid "Package will be updated"
|
||||
msgid_plural "Packages will be updated"
|
||||
msgstr[0] "Paketet kommer att uppdateras"
|
||||
msgstr[1] "Paketen kommer att uppdateras"
|
||||
|
||||
msgid "Password saved"
|
||||
msgstr "Lösenordet har sparats"
|
||||
|
||||
msgid "Pause"
|
||||
msgstr "Pausa"
|
||||
|
||||
msgid "Paused"
|
||||
msgstr "Pausad"
|
||||
|
||||
msgid "Perform a full upgrade?"
|
||||
msgstr "Utför en fullständig uppgradering?"
|
||||
|
||||
msgid "Please recompile and flash the micro-controller."
|
||||
msgstr "Vänligen kompilera om och flasha mikrokontrollern."
|
||||
|
||||
msgid "Power"
|
||||
msgstr "Ström"
|
||||
|
||||
msgid "Power On Printer"
|
||||
msgstr "Slå på skrivaren"
|
||||
|
||||
msgid "Print"
|
||||
msgstr "Skriv ut"
|
||||
|
||||
msgid "Print Control"
|
||||
msgstr "Utskriftskontroll"
|
||||
|
||||
#, fuzzy
|
||||
msgid "Print Time"
|
||||
msgstr "Tid för utskrift"
|
||||
|
||||
#, fuzzy
|
||||
msgid "Printer Connections"
|
||||
msgstr "Skrivaranslutningar"
|
||||
|
||||
msgid "Printing"
|
||||
msgstr "Skriver ut"
|
||||
|
||||
#, fuzzy
|
||||
msgid "Probe found applied offset"
|
||||
msgstr "Sond hittat tillämpad offset"
|
||||
|
||||
msgid "Profile Name:"
|
||||
msgstr "Profilens namn:"
|
||||
|
||||
#, fuzzy
|
||||
msgid "Quad Gantry Level"
|
||||
msgstr "Quad Gantry nivå"
|
||||
|
||||
#, fuzzy
|
||||
msgid "Raise Nozzle"
|
||||
msgstr "Höj munstycket"
|
||||
|
||||
#, fuzzy
|
||||
msgid "Recover Hard"
|
||||
msgstr "Återhämta Hårt"
|
||||
|
||||
#, fuzzy
|
||||
msgid "Recover Soft"
|
||||
msgstr "Återhämta Mjukt"
|
||||
|
||||
msgid "Reference"
|
||||
msgstr "Referens"
|
||||
|
||||
msgid "Restart"
|
||||
msgstr "Starta om"
|
||||
|
||||
msgid "Resume"
|
||||
msgstr "Återuppta"
|
||||
|
||||
#, fuzzy
|
||||
msgid "Retract"
|
||||
msgstr "Dra tillbaka"
|
||||
|
||||
#, fuzzy, python-format
|
||||
msgid "Retry #%s"
|
||||
msgstr "Försök #%s"
|
||||
|
||||
msgid "Save"
|
||||
msgstr "Spara"
|
||||
|
||||
msgid "Save Config"
|
||||
msgstr "Spara konfiguration"
|
||||
|
||||
msgid "Save configuration"
|
||||
msgstr "Spara konfigurationen"
|
||||
|
||||
#, fuzzy
|
||||
msgid "Screen DPMS"
|
||||
msgstr "DPMS för skärm"
|
||||
|
||||
msgid "Screen Power Off Time"
|
||||
msgstr "Avstängningstid för skärmen"
|
||||
|
||||
#, fuzzy
|
||||
msgid "Screws Adjust"
|
||||
msgstr "Justera skruvar"
|
||||
|
||||
msgid "Select"
|
||||
msgstr "Välj"
|
||||
|
||||
msgid "Send"
|
||||
msgstr "Skicka"
|
||||
|
||||
#, python-format
|
||||
msgid "Sending Power ON signal to: %s"
|
||||
msgstr "Skickar ström PÅ-signal till: %s"
|
||||
|
||||
#, fuzzy
|
||||
msgid "Set Temp"
|
||||
msgstr "Ställ in temp"
|
||||
|
||||
msgid "Settings"
|
||||
msgstr "Inställningar"
|
||||
|
||||
msgid "Show"
|
||||
msgstr "Visa"
|
||||
|
||||
msgid "Size"
|
||||
msgstr "Storlek"
|
||||
|
||||
#, fuzzy
|
||||
msgid "Slicer"
|
||||
msgstr "Slicer"
|
||||
|
||||
#, fuzzy
|
||||
msgid "Slicer Time correction (%)"
|
||||
msgstr "Slicer Tidskorrigering (%)"
|
||||
|
||||
msgid "Small"
|
||||
msgstr "Liten"
|
||||
|
||||
msgid "Sort by: "
|
||||
msgstr "Sortera efter: "
|
||||
|
||||
msgid "Speed (mm/s)"
|
||||
msgstr "Hastighet (mm/s)"
|
||||
|
||||
msgid "Speed +"
|
||||
msgstr "Hastighet +"
|
||||
|
||||
msgid "Speed -"
|
||||
msgstr "Hastighet -"
|
||||
|
||||
#, fuzzy
|
||||
msgid "Square Corner Velocity"
|
||||
msgstr "Fyrkantig hörnhastighet"
|
||||
|
||||
msgid "Start"
|
||||
msgstr "Starta"
|
||||
|
||||
#, fuzzy
|
||||
msgid "Starting WiFi Association"
|
||||
msgstr "Startar WiFi Association"
|
||||
|
||||
#, fuzzy
|
||||
msgid "Starting recovery for"
|
||||
msgstr "Startar återhämtning för"
|
||||
|
||||
#, fuzzy
|
||||
msgid "Starting update for"
|
||||
msgstr "Startar uppdatering för"
|
||||
|
||||
msgid "System"
|
||||
msgstr "System"
|
||||
|
||||
msgid ""
|
||||
"System\n"
|
||||
"Restart"
|
||||
msgstr ""
|
||||
"System\n"
|
||||
"Omstart"
|
||||
|
||||
msgid ""
|
||||
"System\n"
|
||||
"Shutdown"
|
||||
msgstr ""
|
||||
"System\n"
|
||||
"Avstängning"
|
||||
|
||||
msgid "Temp (°C)"
|
||||
msgstr "Temperatur (°C)"
|
||||
|
||||
msgid "Temperature"
|
||||
msgstr "Temperatur"
|
||||
|
||||
#, python-format
|
||||
msgid "To apply %s KlipperScreen needs to be restarted"
|
||||
msgstr "För att tillämpa %s måste KlipperScreen startas om"
|
||||
|
||||
msgid "Tool"
|
||||
msgstr "Verktyg"
|
||||
|
||||
#, fuzzy
|
||||
msgid "Total:"
|
||||
msgstr "Sammanlagt:"
|
||||
|
||||
msgid "Unknown Heater"
|
||||
msgstr "Okänt värmeelement"
|
||||
|
||||
#, fuzzy
|
||||
msgid "Unload"
|
||||
msgstr "Lasta av"
|
||||
|
||||
msgid "Up To Date"
|
||||
msgstr "Aktuellt"
|
||||
|
||||
msgid "Update"
|
||||
msgstr "Uppdatera"
|
||||
|
||||
msgid "Updating"
|
||||
msgstr "Uppdaterar"
|
||||
|
||||
msgid "Uploaded"
|
||||
msgstr "Uppladdad"
|
||||
|
||||
#, fuzzy
|
||||
msgid "View Mesh"
|
||||
msgstr "Visa Mesh"
|
||||
|
||||
msgid "X+"
|
||||
msgstr "X+"
|
||||
|
||||
msgid "X-"
|
||||
msgstr "X-"
|
||||
|
||||
msgid "XY Move Speed (mm/s)"
|
||||
msgstr "XY rörelsehastighet (mm/s)"
|
||||
|
||||
msgid "Y+"
|
||||
msgstr "Y+"
|
||||
|
||||
msgid "Y-"
|
||||
msgstr "Y-"
|
||||
|
||||
msgid "Z Calibrate"
|
||||
msgstr "Z Kalibrering"
|
||||
|
||||
msgid "Z Move Speed (mm/s)"
|
||||
msgstr "Z rörelsehastighet (mm/s)"
|
||||
|
||||
msgid "Z Position"
|
||||
msgstr "Z Position"
|
||||
|
||||
#, fuzzy
|
||||
msgid "Z Tilt"
|
||||
msgstr "Z Lutning"
|
||||
|
||||
msgid "Z+"
|
||||
msgstr "Z+"
|
||||
|
||||
msgid "Z-"
|
||||
msgstr "Z-"
|
||||
|
||||
#, fuzzy
|
||||
msgid "commit"
|
||||
msgid_plural "commits"
|
||||
msgstr[0] "commit"
|
||||
msgstr[1] "commits"
|
||||
|
||||
msgid "dBm"
|
||||
msgstr "dBm"
|
||||
|
||||
msgid "hour"
|
||||
msgid_plural "hours"
|
||||
msgstr[0] "timme"
|
||||
msgstr[1] "timmar"
|
||||
|
||||
msgid "minutes"
|
||||
msgstr "minuter"
|
||||
|
||||
msgid "mm"
|
||||
msgstr "mm"
|
||||
|
||||
msgid "mm/s"
|
||||
msgstr "mm/s"
|
||||
|
||||
msgid "mm/s^2"
|
||||
msgstr "mm/s^2"
|
||||
@@ -120,7 +120,9 @@ class Printer:
|
||||
'print_stats',
|
||||
'toolhead',
|
||||
'virtual_sdcard',
|
||||
'webhooks'
|
||||
'webhooks',
|
||||
'fimware_retraction',
|
||||
'motion_report'
|
||||
]
|
||||
|
||||
for x in (self.get_tools() + self.get_heaters()):
|
||||
@@ -216,7 +218,9 @@ class Printer:
|
||||
return self.data
|
||||
|
||||
def get_fans(self):
|
||||
fans = ["fan"] if len(self.get_config_section_list("fan")) > 0 else []
|
||||
fans = []
|
||||
if self.config_section_exists("fan"):
|
||||
fans.append("fan")
|
||||
fan_types = ["controller_fan", "fan_generic", "heater_fan"]
|
||||
for type in fan_types:
|
||||
for f in self.get_config_section_list("%s " % type):
|
||||
@@ -259,7 +263,8 @@ class Printer:
|
||||
"power_devices": {
|
||||
"count": len(self.get_power_devices())
|
||||
},
|
||||
"probe": self.config_section_exists("probe")
|
||||
"probe": self.config_section_exists("probe"),
|
||||
"firmware_retraction": self.config_section_exists("firmware_retraction")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -310,7 +315,7 @@ class Printer:
|
||||
return None
|
||||
|
||||
def get_fan_speed(self, fan="fan", speed=None):
|
||||
if fan not in self.config:
|
||||
if fan not in self.config or fan not in self.data:
|
||||
logging.debug("Error getting %s config", fan)
|
||||
return speed if speed is not None else 0
|
||||
if speed is None and "speed" in self.data[fan]:
|
||||
|
||||
@@ -34,9 +34,9 @@ class Keypad(Gtk.Box):
|
||||
for i in range(len(keys)):
|
||||
id = 'button_' + str(keys[i][0])
|
||||
if keys[i][0] == "B":
|
||||
self.labels[id] = self._gtk.ButtonImage("backspace", None, None, 1, 1)
|
||||
self.labels[id] = self._gtk.ButtonImage("backspace", None, None, 1)
|
||||
elif keys[i][0] == "E":
|
||||
self.labels[id] = self._gtk.ButtonImage("complete", None, None, 1, 1)
|
||||
self.labels[id] = self._gtk.ButtonImage("complete", None, None, 1)
|
||||
else:
|
||||
self.labels[id] = Gtk.Button(keys[i][0])
|
||||
self.labels[id].connect('clicked', self.update_entry, keys[i][0])
|
||||
@@ -48,7 +48,7 @@ class Keypad(Gtk.Box):
|
||||
self.labels['entry'].props.xalign = 0.5
|
||||
self.labels['entry'].connect("activate", self.update_entry, "E")
|
||||
|
||||
b = self._gtk.ButtonImage('cancel', _('Close'), None, 1, 1)
|
||||
b = self._gtk.ButtonImage('cancel', _('Close'), None, 1)
|
||||
b.connect("clicked", close_function)
|
||||
|
||||
self.add(self.labels['entry'])
|
||||
|
||||
+29
-25
@@ -34,24 +34,22 @@ class BasePanel(ScreenPanel):
|
||||
self.control_grid.set_size_request(action_bar_width, action_bar_height)
|
||||
self.control_grid.get_style_context().add_class('action_bar')
|
||||
|
||||
self.control['back'] = self._gtk.ButtonImage('back', None, None, 1, 1)
|
||||
self.control['back'] = self._gtk.ButtonImage('back', None, None, 1)
|
||||
self.control['back'].connect("clicked", self.back)
|
||||
self.control['home'] = self._gtk.ButtonImage('main', None, None, 1, 1)
|
||||
self.control['home'] = self._gtk.ButtonImage('main', None, None, 1)
|
||||
self.control['home'].connect("clicked", self.menu_return, True)
|
||||
|
||||
if len(self._config.get_printers()) > 1:
|
||||
self.control['printer_select'] = self._gtk.ButtonImage(
|
||||
'shuffle', None, None, 1, 1)
|
||||
self.control['printer_select'] = self._gtk.ButtonImage('shuffle', None, None, 1)
|
||||
self.control['printer_select'].connect("clicked", self._screen.show_printer_select)
|
||||
|
||||
self.control['macro_shortcut'] = self._gtk.ButtonImage(
|
||||
'custom-script', None, None, 1, 1)
|
||||
self.control['macro_shortcut'] = self._gtk.ButtonImage('custom-script', None, None, 1)
|
||||
self.control['macro_shortcut'].connect("clicked", self.menu_item_clicked, "gcode_macros", {
|
||||
"name": "Macros",
|
||||
"panel": "gcode_macros"
|
||||
})
|
||||
|
||||
self.control['estop'] = self._gtk.ButtonImage('emergency', None, None, 1, 1)
|
||||
self.control['estop'] = self._gtk.ButtonImage('emergency', None, None, 1)
|
||||
self.control['estop'].connect("clicked", self.emergency_stop)
|
||||
|
||||
self.locations = {
|
||||
@@ -140,31 +138,35 @@ class BasePanel(ScreenPanel):
|
||||
for child in self.control['temp_box'].get_children():
|
||||
self.control['temp_box'].remove(child)
|
||||
|
||||
if show is False or self._printer.get_temp_store_devices() is None:
|
||||
if (not show or self._screen.printer.get_temp_store_devices() is None):
|
||||
return
|
||||
|
||||
for device in self._printer.get_temp_store_devices():
|
||||
for device in self._screen.printer.get_temp_store_devices():
|
||||
logging.info(device)
|
||||
self.labels[device + '_box'] = Gtk.Box(spacing=0)
|
||||
self.labels[device] = Gtk.Label(label="100º")
|
||||
self.labels[device].set_ellipsize(True)
|
||||
self.labels[device].set_ellipsize(Pango.EllipsizeMode.START)
|
||||
if device.startswith("extruder"):
|
||||
if self._printer.extrudercount > 1:
|
||||
if self._screen.printer.extrudercount > 1:
|
||||
if device == "extruder":
|
||||
ext_img = self._gtk.Image("extruder-0.svg", None, .5, .5)
|
||||
ext_img = self._gtk.Image("extruder-0", .5)
|
||||
else:
|
||||
ext_img = self._gtk.Image("extruder-%s.svg" % device[8:], None, .5, .5)
|
||||
ext_img = self._gtk.Image("extruder-%s" % device[8:], .5)
|
||||
else:
|
||||
ext_img = self._gtk.Image("extruder.svg", None, .5, .5)
|
||||
ext_img = self._gtk.Image("extruder", .5)
|
||||
self.labels[device + '_box'].pack_start(ext_img, True, True, 3)
|
||||
elif device.startswith("heater_bed"):
|
||||
bed_img = self._gtk.Image("bed.svg", None, .5, .5)
|
||||
bed_img = self._gtk.Image("bed", .5)
|
||||
self.labels[device + '_box'].pack_start(bed_img, True, True, 3)
|
||||
elif device.startswith("temperature_fan"):
|
||||
fan_img = self._gtk.Image("fan.svg", None, .5, .5)
|
||||
fan_img = self._gtk.Image("fan", .5)
|
||||
self.labels[device + '_box'].pack_start(fan_img, True, True, 3)
|
||||
elif device.startswith("heater_generic"):
|
||||
heat_img = self._gtk.Image("heater", .5)
|
||||
self.labels[device + '_box'].pack_start(heat_img, True, True, 3)
|
||||
else:
|
||||
temp_img = self._gtk.Image("heat-up.svg", None, .5, .5)
|
||||
temp_img = self._gtk.Image("heat-up", .5)
|
||||
self.labels[device + '_box'].pack_start(temp_img, True, True, 3)
|
||||
self.labels[device + '_box'].pack_start(self.labels[device], True, True, 0)
|
||||
|
||||
@@ -176,12 +178,12 @@ class BasePanel(ScreenPanel):
|
||||
nlimit = 5
|
||||
|
||||
n = 0
|
||||
if self._printer.get_tools():
|
||||
self.current_extruder = self._printer.get_stat("toolhead", "extruder")
|
||||
if self._screen.printer.get_tools():
|
||||
self.current_extruder = self._screen.printer.get_stat("toolhead", "extruder")
|
||||
self.control['temp_box'].pack_start(self.labels["%s_box" % self.current_extruder], True, True, 3)
|
||||
n += 1
|
||||
|
||||
if self._printer.has_heated_bed():
|
||||
if self._screen.printer.has_heated_bed():
|
||||
self.control['temp_box'].pack_start(self.labels['heater_bed_box'], True, True, 3)
|
||||
n += 1
|
||||
|
||||
@@ -194,7 +196,7 @@ class BasePanel(ScreenPanel):
|
||||
logging.info("Titlebar items: %s", titlebar_items)
|
||||
self.titlebar_name_type = printer_cfg.get("titlebar_name_type", None)
|
||||
logging.info("Titlebar name type: %s", self.titlebar_name_type)
|
||||
for device in self._printer.get_temp_store_devices():
|
||||
for device in self._screen.printer.get_temp_store_devices():
|
||||
# Users can fill the bar if they want
|
||||
if n >= nlimit + 1:
|
||||
break
|
||||
@@ -209,12 +211,13 @@ class BasePanel(ScreenPanel):
|
||||
break
|
||||
|
||||
# If there is enough space fill with heater_generic
|
||||
for device in self._printer.get_temp_store_devices():
|
||||
for device in self._screen.printer.get_temp_store_devices():
|
||||
if n >= nlimit:
|
||||
break
|
||||
if device.startswith("heater_generic"):
|
||||
self.control['temp_box'].pack_start(self.labels["%s_box" % device], True, True, 3)
|
||||
n += 1
|
||||
self.control['temp_box'].show_all()
|
||||
|
||||
def activate(self):
|
||||
if self.time_update is None:
|
||||
@@ -242,10 +245,10 @@ class BasePanel(ScreenPanel):
|
||||
return self.layout
|
||||
|
||||
def process_update(self, action, data):
|
||||
if action != "notify_status_update" or self._printer is None:
|
||||
if action != "notify_status_update" or self._screen.printer is None:
|
||||
return
|
||||
|
||||
devices = self._printer.get_temp_store_devices()
|
||||
devices = self._screen.printer.get_temp_store_devices()
|
||||
if devices is not None:
|
||||
for device in devices:
|
||||
name = ""
|
||||
@@ -254,8 +257,9 @@ class BasePanel(ScreenPanel):
|
||||
name = device.split(" ")[1:][0].capitalize().replace("_", " ") + ": "
|
||||
elif self.titlebar_name_type == "short":
|
||||
name = device.split(" ")[1:][0][:1].upper() + ": "
|
||||
self.labels[device].set_label("%s%d°" % (name,
|
||||
round(self._printer.get_dev_stat(device, "temperature"))))
|
||||
temp = self._screen.printer.get_dev_stat(device, "temperature")
|
||||
if temp is not None:
|
||||
self.labels[device].set_label("%s%d°" % (name, round(temp)))
|
||||
|
||||
if "toolhead" in data and "extruder" in data["toolhead"]:
|
||||
if data["toolhead"]["extruder"] != self.current_extruder:
|
||||
|
||||
+8
-8
@@ -114,14 +114,14 @@ class BedLevelPanel(ScreenPanel):
|
||||
|
||||
logging.debug("Using %d-screw locations [x,y] [%dx%d]", len(self.screws), self.x_cnt, self.y_cnt)
|
||||
|
||||
self.labels['bl'] = self._gtk.ButtonImage("bed-level-t-l", None, None, 2.5, 2.5)
|
||||
self.labels['br'] = self._gtk.ButtonImage("bed-level-t-r", None, None, 2.5, 2.5)
|
||||
self.labels['fl'] = self._gtk.ButtonImage("bed-level-b-l", None, None, 2.5, 2.5)
|
||||
self.labels['fr'] = self._gtk.ButtonImage("bed-level-b-r", None, None, 2.5, 2.5)
|
||||
self.labels['lm'] = self._gtk.ButtonImage("bed-level-l-m", None, None, 2.5, 2.5)
|
||||
self.labels['rm'] = self._gtk.ButtonImage("bed-level-r-m", None, None, 2.5, 2.5)
|
||||
self.labels['fm'] = self._gtk.ButtonImage("bed-level-b-m", None, None, 2.5, 2.5)
|
||||
self.labels['bm'] = self._gtk.ButtonImage("bed-level-t-m", None, None, 2.5, 2.5)
|
||||
self.labels['bl'] = self._gtk.ButtonImage("bed-level-t-l", None, None, 2.5)
|
||||
self.labels['br'] = self._gtk.ButtonImage("bed-level-t-r", None, None, 2.5)
|
||||
self.labels['fl'] = self._gtk.ButtonImage("bed-level-b-l", None, None, 2.5)
|
||||
self.labels['fr'] = self._gtk.ButtonImage("bed-level-b-r", None, None, 2.5)
|
||||
self.labels['lm'] = self._gtk.ButtonImage("bed-level-l-m", None, None, 2.5)
|
||||
self.labels['rm'] = self._gtk.ButtonImage("bed-level-r-m", None, None, 2.5)
|
||||
self.labels['fm'] = self._gtk.ButtonImage("bed-level-b-m", None, None, 2.5)
|
||||
self.labels['bm'] = self._gtk.ButtonImage("bed-level-t-m", None, None, 2.5)
|
||||
|
||||
bedgrid = Gtk.Grid()
|
||||
bedgrid.attach(self.labels['bl'], 1, 0, 1, 1)
|
||||
|
||||
+1
-1
@@ -39,7 +39,7 @@ class BedMeshPanel(ScreenPanel):
|
||||
|
||||
|
||||
addprofile = self._gtk.ButtonImage("increase", " %s" % _("Add bed mesh profile"),
|
||||
"color1", .5, .5, Gtk.PositionType.LEFT, False)
|
||||
"color1", .5, Gtk.PositionType.LEFT, False)
|
||||
addprofile.connect("clicked", self.show_create_profile)
|
||||
addprofile.set_size_request(60, 0)
|
||||
addprofile.set_hexpand(False)
|
||||
|
||||
+32
-6
@@ -1,6 +1,7 @@
|
||||
import gi
|
||||
import logging
|
||||
import time
|
||||
import re
|
||||
|
||||
gi.require_version("Gtk", "3.0")
|
||||
from gi.repository import Gtk
|
||||
@@ -24,22 +25,37 @@ class ConsolePanel(ScreenPanel):
|
||||
def initialize(self, panel_name):
|
||||
_ = self.lang.gettext
|
||||
self.autoscroll = True
|
||||
self.hidetemps = True
|
||||
|
||||
gcodes = self._screen._ws.send_method("server.gcode_store", {"count": 100}, self.gcode_response)
|
||||
|
||||
o1_lbl = Gtk.Label(_("Auto-scroll"))
|
||||
o1_lbl.set_halign(Gtk.Align.END)
|
||||
o1_switch = Gtk.Switch()
|
||||
o1_switch.set_property("width-request", round(self._gtk.get_font_size()*6))
|
||||
o1_switch.set_property("height-request", round(self._gtk.get_font_size()*3))
|
||||
o1_switch.set_property("width-request", round(self._gtk.get_font_size()*5))
|
||||
o1_switch.set_property("height-request", round(self._gtk.get_font_size()*2.5))
|
||||
o1_switch.set_active(self.autoscroll)
|
||||
o1_switch.connect("notify::active", self.set_autoscroll)
|
||||
|
||||
o2_lbl = Gtk.Label(_("Hide temp."))
|
||||
o2_lbl.set_halign(Gtk.Align.END)
|
||||
o2_switch = Gtk.Switch()
|
||||
o2_switch.set_property("width-request", round(self._gtk.get_font_size()*5))
|
||||
o2_switch.set_property("height-request", round(self._gtk.get_font_size()*2.5))
|
||||
o2_switch.set_active(self.hidetemps)
|
||||
o2_switch.connect("notify::active", self.hide_temps)
|
||||
|
||||
o3_button = self._gtk.ButtonImage("refresh", _('Clear') + " ", None, .66, Gtk.PositionType.RIGHT, False)
|
||||
o3_button.connect("clicked", self.clear)
|
||||
|
||||
options = Gtk.HBox()
|
||||
options.set_hexpand(True)
|
||||
options.set_vexpand(False)
|
||||
options.add(o1_lbl)
|
||||
options.pack_start(o1_switch, False, 0, 5)
|
||||
options.add(o2_lbl)
|
||||
options.pack_start(o2_switch, False, 0, 5)
|
||||
options.add(o3_button)
|
||||
|
||||
sw = Gtk.ScrolledWindow()
|
||||
sw.set_hexpand(True)
|
||||
@@ -65,7 +81,7 @@ class ConsolePanel(ScreenPanel):
|
||||
entry.connect("focus-out-event", self._remove_keyboard)
|
||||
entry.connect("activate", self._send_command)
|
||||
|
||||
enter = self._gtk.Button(_("Send"))
|
||||
enter = self._gtk.ButtonImage("resume", " " + _('Send') + " ", None, .66, Gtk.PositionType.RIGHT, False)
|
||||
enter.set_hexpand(False)
|
||||
enter.connect("clicked", self._send_command)
|
||||
|
||||
@@ -81,11 +97,14 @@ class ConsolePanel(ScreenPanel):
|
||||
})
|
||||
|
||||
content_box = Gtk.VBox()
|
||||
content_box.pack_start(options, False, 0, 0)
|
||||
content_box.pack_start(options, False, 0, 5)
|
||||
content_box.add(sw)
|
||||
content_box.pack_end(ebox, False, 0, 0)
|
||||
self.content.add(content_box)
|
||||
|
||||
def clear(self, widget):
|
||||
self.labels['tb'].set_text("")
|
||||
|
||||
def add_gcode(self, type, time, message):
|
||||
if type == "command":
|
||||
color = COLORS['command']
|
||||
@@ -94,10 +113,12 @@ class ConsolePanel(ScreenPanel):
|
||||
color = COLORS['error']
|
||||
elif message.startswith("//"):
|
||||
color = COLORS['warning']
|
||||
elif self.hidetemps and re.match('^(?:ok\\s+)?(B|C|T\\d*):', message):
|
||||
return
|
||||
else:
|
||||
color = COLORS['response']
|
||||
|
||||
message = '<span color="%s">%s</span>' % (color, message)
|
||||
message = '<span color="%s"><b>%s</b></span>' % (color, message)
|
||||
|
||||
message = message.replace('\n', '\n ')
|
||||
|
||||
@@ -106,6 +127,9 @@ class ConsolePanel(ScreenPanel):
|
||||
'\n<span color="%s">%s</span> %s' % (COLORS['time'], datetime.fromtimestamp(time).strftime("%H:%M:%S"),
|
||||
message), -1
|
||||
)
|
||||
# Limit the length
|
||||
if self.labels['tb'].get_line_count() > 999:
|
||||
self.labels['tb'].delete(self.labels['tb'].get_iter_at_line(0), self.labels['tb'].get_iter_at_line(1))
|
||||
|
||||
def gcode_response(self, result, method, params):
|
||||
if method != "server.gcode_store":
|
||||
@@ -118,9 +142,11 @@ class ConsolePanel(ScreenPanel):
|
||||
if action == "notify_gcode_response":
|
||||
self.add_gcode("response", time.time(), data)
|
||||
|
||||
def hide_temps(self, *args):
|
||||
self.hidetemps ^= True
|
||||
|
||||
def set_autoscroll(self, *args):
|
||||
self.autoscroll ^= True
|
||||
logging.debug(self.autoscroll)
|
||||
|
||||
def _autoscroll(self, *args):
|
||||
if self.autoscroll:
|
||||
|
||||
+4
-3
@@ -46,6 +46,7 @@ class ExtrudePanel(ScreenPanel):
|
||||
|
||||
extgrid = self._gtk.HomogeneousGrid()
|
||||
self.current_extruder = self._printer.get_stat("toolhead", "extruder")
|
||||
limit = 5
|
||||
for i, extruder in enumerate(self._printer.get_tools()):
|
||||
if self._printer.extrudercount > 1:
|
||||
self.labels[extruder] = self._gtk.ButtonImage("extruder-%s" % i, _("Tool") + " %s" % str(i))
|
||||
@@ -54,10 +55,10 @@ class ExtrudePanel(ScreenPanel):
|
||||
self.labels[extruder].connect("clicked", self.change_extruder, extruder)
|
||||
if extruder == self.current_extruder:
|
||||
self.labels[extruder].get_style_context().add_class("button_active")
|
||||
if i < 5:
|
||||
if i < limit:
|
||||
extgrid.attach(self.labels[extruder], i, 0, 1, 1)
|
||||
if i < 3:
|
||||
extgrid.attach(self.labels['temperature'], i+1, 0, 1, 1)
|
||||
if i < (limit - 1):
|
||||
extgrid.attach(self.labels['temperature'], i+1, 0, 1, 1)
|
||||
|
||||
|
||||
grid.attach(extgrid, 0, 0, 4, 1)
|
||||
|
||||
+15
-15
@@ -82,17 +82,17 @@ class FineTunePanel(ScreenPanel):
|
||||
self.labels['z+'] = self._gtk.ButtonImage("z-farther", _("Z+"), "color1")
|
||||
self.labels['z-'] = self._gtk.ButtonImage("z-closer", _("Z-"), "color1")
|
||||
self.labels['zoffset'] = self._gtk.ButtonImage("refresh", " 0.00" + _("mm"),
|
||||
"color1", .6, .6, Gtk.PositionType.LEFT, False)
|
||||
"color1", .6, Gtk.PositionType.LEFT, False)
|
||||
|
||||
self.labels['speed+'] = self._gtk.ButtonImage("speed+", _("Speed +"), "color3")
|
||||
self.labels['speed-'] = self._gtk.ButtonImage("speed-", _("Speed -"), "color3")
|
||||
self.labels['speedfactor'] = self._gtk.ButtonImage("refresh", " 100%",
|
||||
"color3", .6, .6, Gtk.PositionType.LEFT, False)
|
||||
"color3", .6, Gtk.PositionType.LEFT, False)
|
||||
|
||||
self.labels['extrude+'] = self._gtk.ButtonImage("flow+", _("Extrusion +"), "color4")
|
||||
self.labels['extrude-'] = self._gtk.ButtonImage("flow-", _("Extrusion -"), "color4")
|
||||
self.labels['extrudefactor'] = self._gtk.ButtonImage("refresh", " 100%",
|
||||
"color4", .6, .6, Gtk.PositionType.LEFT, False)
|
||||
"color4", .6, Gtk.PositionType.LEFT, False)
|
||||
|
||||
grid.attach(self.labels['z+'], 0, 0, 1, 1)
|
||||
grid.attach(self.labels['z-'], 1, 0, 1, 1)
|
||||
@@ -110,17 +110,17 @@ class FineTunePanel(ScreenPanel):
|
||||
else:
|
||||
self.labels['z+'] = self._gtk.ButtonImage("z-farther", _("Z+"), "color1")
|
||||
self.labels['zoffset'] = self._gtk.ButtonImage("refresh", " 0.00" + _("mm"),
|
||||
"color1", .6, .6, Gtk.PositionType.LEFT, False)
|
||||
"color1", .6, Gtk.PositionType.LEFT, False)
|
||||
self.labels['z-'] = self._gtk.ButtonImage("z-closer", _("Z-"), "color1")
|
||||
|
||||
self.labels['speed+'] = self._gtk.ButtonImage("speed+", _("Speed +"), "color3")
|
||||
self.labels['speedfactor'] = self._gtk.ButtonImage("refresh", " 100%",
|
||||
"color3", .6, .6, Gtk.PositionType.LEFT, False)
|
||||
"color3", .6, Gtk.PositionType.LEFT, False)
|
||||
self.labels['speed-'] = self._gtk.ButtonImage("speed-", _("Speed -"), "color3")
|
||||
|
||||
self.labels['extrude+'] = self._gtk.ButtonImage("flow+", _("Extrusion +"), "color4")
|
||||
self.labels['extrudefactor'] = self._gtk.ButtonImage("refresh", " 100%",
|
||||
"color4", .6, .6, Gtk.PositionType.LEFT, False)
|
||||
"color4", .6, Gtk.PositionType.LEFT, False)
|
||||
self.labels['extrude-'] = self._gtk.ButtonImage("flow-", _("Extrusion -"), "color4")
|
||||
grid.attach(self.labels['zoffset'], 0, 0, 1, 1)
|
||||
grid.attach(self.labels['z+'], 0, 1, 1, 1)
|
||||
@@ -134,15 +134,15 @@ class FineTunePanel(ScreenPanel):
|
||||
grid.attach(self.labels['extrude-'], 2, 2, 1, 1)
|
||||
grid.attach(deltgrid, 1, 3, 2, 1)
|
||||
|
||||
self.labels['z+'].connect("clicked", self.change_babystepping, "+")
|
||||
self.labels['zoffset'].connect("clicked", self.change_babystepping, "reset")
|
||||
self.labels['z-'].connect("clicked", self.change_babystepping, "-")
|
||||
self.labels['speed+'].connect("clicked", self.change_speed, "+")
|
||||
self.labels['speedfactor'].connect("clicked", self.change_speed, "reset")
|
||||
self.labels['speed-'].connect("clicked", self.change_speed, "-")
|
||||
self.labels['extrude+'].connect("clicked", self.change_extrusion, "+")
|
||||
self.labels['extrudefactor'].connect("clicked", self.change_extrusion, "reset")
|
||||
self.labels['extrude-'].connect("clicked", self.change_extrusion, "-")
|
||||
self.labels['z+'].connect("clicked", self.change_babystepping, "+")
|
||||
self.labels['zoffset'].connect("clicked", self.change_babystepping, "reset")
|
||||
self.labels['z-'].connect("clicked", self.change_babystepping, "-")
|
||||
self.labels['speed+'].connect("clicked", self.change_speed, "+")
|
||||
self.labels['speedfactor'].connect("clicked", self.change_speed, "reset")
|
||||
self.labels['speed-'].connect("clicked", self.change_speed, "-")
|
||||
self.labels['extrude+'].connect("clicked", self.change_extrusion, "+")
|
||||
self.labels['extrudefactor'].connect("clicked", self.change_extrusion, "reset")
|
||||
self.labels['extrude-'].connect("clicked", self.change_extrusion, "-")
|
||||
|
||||
self.content.add(grid)
|
||||
|
||||
|
||||
+514
-259
@@ -1,12 +1,12 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
import gi
|
||||
import logging
|
||||
import math
|
||||
import os
|
||||
import time
|
||||
|
||||
gi.require_version("Gtk", "3.0")
|
||||
from gi.repository import GLib, Gtk, Pango
|
||||
|
||||
from numpy import sqrt, pi, dot, array, median
|
||||
from ks_includes.screen_panel import ScreenPanel
|
||||
|
||||
def create_panel(*args):
|
||||
@@ -14,261 +14,387 @@ def create_panel(*args):
|
||||
|
||||
class JobStatusPanel(ScreenPanel):
|
||||
is_paused = False
|
||||
filename = None
|
||||
file_metadata = {}
|
||||
progress = 0
|
||||
filename = state_timeout = prev_pos = prev_gpos = vel_timeout = None
|
||||
file_metadata = labels = {}
|
||||
state = "standby"
|
||||
timeleft_type = "file"
|
||||
progress = zoffset = flowrate = vel = 0
|
||||
main_status_displayed = True
|
||||
close_timeouts = velstore = flowstore = []
|
||||
|
||||
def __init__(self, screen, title, back=False):
|
||||
super().__init__(screen, title, False)
|
||||
|
||||
def initialize(self, panel_name):
|
||||
_ = self.lang.gettext
|
||||
self.timeleft_type = "file"
|
||||
self.state_timeout = None
|
||||
self.close_timeouts = []
|
||||
|
||||
data = ['pos_x', 'pos_y', 'pos_z', 'time_left', 'duration', 'slicer_time', 'file_time',
|
||||
'filament_time', 'est_time', 'speed_factor', 'req_speed', 'max_accel', 'extrude_factor', 'zoffset',
|
||||
'zoffset', 'filament_used', 'filament_total', 'advance', 'fan', 'layer', 'total_layers', 'height',
|
||||
'flowrate']
|
||||
|
||||
for item in data:
|
||||
self.labels[item] = Gtk.Label("-")
|
||||
self.labels[item].set_vexpand(True)
|
||||
self.labels[item].set_hexpand(True)
|
||||
|
||||
self.labels['left'] = Gtk.Label(_("Left:"))
|
||||
self.labels['elapsed'] = Gtk.Label(_("Elapsed:"))
|
||||
self.labels['total'] = Gtk.Label(_("Total:"))
|
||||
self.labels['slicer'] = Gtk.Label(_("Slicer:"))
|
||||
self.labels['file_tlbl'] = Gtk.Label(_("File:"))
|
||||
self.labels['fila_tlbl'] = Gtk.Label(_("Filament:"))
|
||||
self.labels['speed_lbl'] = Gtk.Label(_("Speed:"))
|
||||
self.labels['accel_lbl'] = Gtk.Label(_("Acceleration:"))
|
||||
self.labels['flow'] = Gtk.Label(_("Flow:"))
|
||||
self.labels['zoffset_lbl'] = Gtk.Label(_("Z offset:"))
|
||||
self.labels['fila_used_lbl'] = Gtk.Label(_("Filament used:"))
|
||||
self.labels['fila_total_lbl'] = Gtk.Label(_("Filament total:"))
|
||||
self.labels['pa_lbl'] = Gtk.Label(_("Pressure Advance:"))
|
||||
self.labels['flowrate_lbl'] = Gtk.Label(_("Flowrate:"))
|
||||
self.labels['height_lbl'] = Gtk.Label(_("Height:"))
|
||||
self.labels['layer_lbl'] = Gtk.Label(_("Layer:"))
|
||||
|
||||
self.fans = {}
|
||||
for fan in self._printer.get_fans():
|
||||
# fan_types = ["controller_fan", "fan_generic", "heater_fan"]
|
||||
if fan == "fan":
|
||||
name = " "
|
||||
elif fan.startswith("fan_generic"):
|
||||
name = fan.split(" ")[1:][0][:1].upper() + ":"
|
||||
if name.startswith("_"):
|
||||
continue
|
||||
else:
|
||||
continue
|
||||
self.fans[fan] = {
|
||||
"name": name,
|
||||
"speed": "-"
|
||||
}
|
||||
|
||||
self.create_buttons()
|
||||
self.buttons['button_grid'] = self._gtk.HomogeneousGrid()
|
||||
self.buttons['button_grid'].set_vexpand(False)
|
||||
|
||||
grid = self._gtk.HomogeneousGrid()
|
||||
grid.set_row_homogeneous(False)
|
||||
self.labels['file'] = Gtk.Label("Filename")
|
||||
self.labels['file'].get_style_context().add_class("printing-filename")
|
||||
self.labels['file'].set_hexpand(True)
|
||||
self.labels['status'] = Gtk.Label("Status")
|
||||
self.labels['status'].get_style_context().add_class("printing-status")
|
||||
self.labels['lcdmessage'] = Gtk.Label("")
|
||||
self.labels['lcdmessage'].get_style_context().add_class("printing-status")
|
||||
|
||||
self.labels['button_grid'] = self._gtk.HomogeneousGrid()
|
||||
self.labels['button_grid'].set_vexpand(False)
|
||||
for label in self.labels:
|
||||
self.labels[label].set_halign(Gtk.Align.START)
|
||||
self.labels[label].set_ellipsize(True)
|
||||
self.labels[label].set_ellipsize(Pango.EllipsizeMode.END)
|
||||
|
||||
fi_box = Gtk.VBox(spacing=0)
|
||||
fi_box.set_hexpand(True)
|
||||
fi_box.set_vexpand(False)
|
||||
fi_box.set_halign(Gtk.Align.START)
|
||||
|
||||
self.labels['file'] = Gtk.Label(label="file")
|
||||
self.labels['file'].set_halign(Gtk.Align.START)
|
||||
self.labels['file'].set_vexpand(False)
|
||||
self.labels['file'].get_style_context().add_class("printing-filename")
|
||||
self.labels['file'].set_ellipsize(True)
|
||||
self.labels['file'].set_ellipsize(Pango.EllipsizeMode.END)
|
||||
self.labels['status'] = Gtk.Label()
|
||||
self.labels['status'].set_halign(Gtk.Align.START)
|
||||
self.labels['status'].set_vexpand(False)
|
||||
self.labels['status'].get_style_context().add_class("printing-status")
|
||||
self.labels['status'].set_line_wrap(True)
|
||||
self.labels['lcdmessage'] = Gtk.Label("")
|
||||
self.labels['lcdmessage'].set_halign(Gtk.Align.START)
|
||||
self.labels['lcdmessage'].set_vexpand(False)
|
||||
self.labels['lcdmessage'].get_style_context().add_class("printing-status")
|
||||
self.labels['lcdmessage'].set_ellipsize(True)
|
||||
self.labels['lcdmessage'].set_ellipsize(Pango.EllipsizeMode.END)
|
||||
|
||||
fi_box.add(self.labels['file'])
|
||||
fi_box.add(self.labels['status'])
|
||||
fi_box.add(self.labels['lcdmessage'])
|
||||
fi_box.set_valign(Gtk.Align.CENTER)
|
||||
|
||||
info = Gtk.Box(orientation=Gtk.Orientation.VERTICAL)
|
||||
info.props.valign = Gtk.Align.CENTER
|
||||
info.set_hexpand(True)
|
||||
info.set_vexpand(True)
|
||||
|
||||
self.labels['darea'] = Gtk.DrawingArea()
|
||||
self.labels['darea'].connect("draw", self.on_draw)
|
||||
|
||||
box = Gtk.Box()
|
||||
box.set_hexpand(True)
|
||||
box.set_vexpand(True)
|
||||
box.set_halign(Gtk.Align.CENTER)
|
||||
self.labels['progress_text'] = Gtk.Label()
|
||||
self.labels['progress_text'] = Gtk.Label("0%")
|
||||
self.labels['progress_text'].get_style_context().add_class("printing-progress-text")
|
||||
box.add(self.labels['progress_text'])
|
||||
|
||||
overlay = Gtk.Overlay()
|
||||
overlay.set_hexpand(True)
|
||||
overlay.set_vexpand(True)
|
||||
overlay.add(self.labels['darea'])
|
||||
overlay.add_overlay(box)
|
||||
|
||||
self.labels['thumbnail'] = self._gtk.Image("file.svg", False, 1.6, 1.6)
|
||||
|
||||
i = 0
|
||||
for extruder in self._printer.get_tools():
|
||||
self.labels[extruder + '_box'] = Gtk.Box(spacing=0)
|
||||
self.labels[extruder] = Gtk.Label(label="")
|
||||
self.labels[extruder].get_style_context().add_class("printing-info")
|
||||
if i <= 4:
|
||||
ext_img = self._gtk.Image("extruder-%s.svg" % i, None, .6, .6)
|
||||
self.labels[extruder + '_box'].add(ext_img)
|
||||
self.labels[extruder + '_box'].add(self.labels[extruder])
|
||||
i += 1
|
||||
|
||||
temp_grid = self._gtk.HomogeneousGrid()
|
||||
self.current_extruder = self._printer.get_stat("toolhead", "extruder")
|
||||
temp_grid.attach(self.labels[self.current_extruder + '_box'], 0, 0, 1, 1)
|
||||
if self._printer.has_heated_bed():
|
||||
heater_bed = self._gtk.Image("bed.svg", None, .6, .6)
|
||||
self.labels['heater_bed'] = Gtk.Label(label="")
|
||||
self.labels['heater_bed'].get_style_context().add_class("printing-info")
|
||||
heater_bed_box = Gtk.Box(spacing=0)
|
||||
heater_bed_box.add(heater_bed)
|
||||
heater_bed_box.add(self.labels['heater_bed'])
|
||||
temp_grid.attach(heater_bed_box, 1, 0, 1, 1)
|
||||
self.labels['temp_grid'] = temp_grid
|
||||
|
||||
# Create time remaining items
|
||||
hourglass = self._gtk.Image("hourglass.svg", None, .6, .6)
|
||||
self.labels['left'] = Gtk.Label(label=_("Left:"))
|
||||
self.labels['left'].get_style_context().add_class("printing-info")
|
||||
self.labels['time_left'] = Gtk.Label(label="0s")
|
||||
self.labels['time_left'].get_style_context().add_class("printing-info")
|
||||
itl_box = Gtk.Box(spacing=0)
|
||||
itl_box.add(hourglass)
|
||||
itl_box.add(self.labels['left'])
|
||||
itl_box.add(self.labels['time_left'])
|
||||
self.labels['itl_box'] = itl_box
|
||||
|
||||
# Create overall items
|
||||
clock = self._gtk.Image("clock.svg", None, .6, .6)
|
||||
self.labels['elapsed'] = Gtk.Label(label=_("Elapsed:"))
|
||||
self.labels['elapsed'].get_style_context().add_class("printing-info")
|
||||
self.labels['duration'] = Gtk.Label(label="0s")
|
||||
self.labels['duration'].get_style_context().add_class("printing-info")
|
||||
self.labels['total'] = Gtk.Label(label=_("Total:"))
|
||||
self.labels['total'].get_style_context().add_class("printing-info")
|
||||
self.labels['est_time'] = Gtk.Label(label="0s")
|
||||
self.labels['est_time'].get_style_context().add_class("printing-info")
|
||||
timegrid = Gtk.Grid()
|
||||
it1_box = Gtk.Box(spacing=0)
|
||||
it1_box.add(self.labels['elapsed'])
|
||||
it1_box.add(self.labels['duration'])
|
||||
it2_box = Gtk.Box(spacing=0)
|
||||
it2_box.add(self.labels['total'])
|
||||
it2_box.add(self.labels['est_time'])
|
||||
timegrid.attach(clock, 0, 0, 1, 2)
|
||||
timegrid.attach(it1_box, 1, 0, 1, 1)
|
||||
timegrid.attach(it2_box, 1, 1, 1, 1)
|
||||
self.labels['timegrid'] = timegrid
|
||||
|
||||
position = self._gtk.Image("move.svg", None, .6, .6)
|
||||
self.labels['pos_x'] = Gtk.Label(label="X: 0")
|
||||
self.labels['pos_x'].get_style_context().add_class("printing-info")
|
||||
self.labels['pos_y'] = Gtk.Label(label="Y: 0")
|
||||
self.labels['pos_y'].get_style_context().add_class("printing-info")
|
||||
self.labels['pos_z'] = Gtk.Label(label="Z: 0")
|
||||
self.labels['pos_z'].get_style_context().add_class("printing-info")
|
||||
pos_box = Gtk.Box(spacing=0)
|
||||
posgrid = self._gtk.HomogeneousGrid()
|
||||
posgrid.set_hexpand(True)
|
||||
posgrid.attach(self.labels['pos_x'], 0, 0, 1, 1)
|
||||
posgrid.attach(self.labels['pos_y'], 1, 0, 1, 1)
|
||||
posgrid.attach(self.labels['pos_z'], 2, 0, 1, 1)
|
||||
pos_box.add(position)
|
||||
pos_box.add(posgrid)
|
||||
self.labels['pos_box'] = pos_box
|
||||
|
||||
speed = self._gtk.Image("speed+.svg", None, .6, .6)
|
||||
self.labels['speed'] = Gtk.Label(label="")
|
||||
self.labels['speed'].get_style_context().add_class("printing-info")
|
||||
speed_box = Gtk.Box(spacing=0)
|
||||
speed_box.add(speed)
|
||||
speed_box.add(self.labels['speed'])
|
||||
extrusion = self._gtk.Image("extrude.svg", None, .6, .6)
|
||||
self.labels['extrusion'] = Gtk.Label(label="")
|
||||
self.labels['extrusion'].get_style_context().add_class("printing-info")
|
||||
extrusion_box = Gtk.Box(spacing=0)
|
||||
extrusion_box.add(extrusion)
|
||||
extrusion_box.add(self.labels['extrusion'])
|
||||
fan = self._gtk.Image("fan.svg", None, .6, .6)
|
||||
self.labels['fan'] = Gtk.Label(label="")
|
||||
self.labels['fan'].get_style_context().add_class("printing-info")
|
||||
fan_box = Gtk.Box(spacing=0)
|
||||
fan_box.add(fan)
|
||||
fan_box.add(self.labels['fan'])
|
||||
sfe_grid = self._gtk.HomogeneousGrid()
|
||||
sfe_grid.set_hexpand(True)
|
||||
sfe_grid.attach(speed_box, 0, 0, 1, 1)
|
||||
sfe_grid.attach(extrusion_box, 1, 0, 1, 1)
|
||||
sfe_grid.attach(fan_box, 2, 0, 1, 1)
|
||||
self.labels['sfe_grid'] = sfe_grid
|
||||
|
||||
self.labels['i1_box'] = Gtk.HBox(spacing=0)
|
||||
self.labels['i1_box'].set_vexpand(True)
|
||||
self.labels['i1_box'].get_style_context().add_class("printing-info-box")
|
||||
self.labels['i1_box'].set_valign(Gtk.Align.CENTER)
|
||||
self.labels['i2_box'] = Gtk.VBox(spacing=0)
|
||||
self.labels['i2_box'].set_vexpand(True)
|
||||
self.labels['i2_box'].get_style_context().add_class("printing-info-box")
|
||||
self.labels['i2_box'].set_valign(Gtk.Align.CENTER)
|
||||
self.labels['info_grid'] = self._gtk.HomogeneousGrid()
|
||||
self.labels['thumbnail'] = self._gtk.Image("file", 2)
|
||||
if self._screen.vertical_mode:
|
||||
self.labels['info_grid'].attach(self.labels['i1_box'], 0, 0, 1, 1)
|
||||
self.labels['info_grid'].attach(self.labels['i2_box'], 0, 1, 1, 1)
|
||||
self.labels['thumbnail'].set_size_request(0, self._screen.height/4)
|
||||
else:
|
||||
self.labels['info_grid'].attach(self.labels['i1_box'], 0, 0, 2, 1)
|
||||
self.labels['info_grid'].attach(self.labels['i2_box'], 2, 0, 3, 1)
|
||||
self.labels['thumbnail'].set_size_request(self._screen.width/3, 0)
|
||||
|
||||
grid.attach(overlay, 0, 0, 1, 1)
|
||||
grid.attach(fi_box, 1, 0, 3, 1)
|
||||
grid.attach(self.labels['info_grid'], 0, 1, 4, 2)
|
||||
grid.attach(self.labels['button_grid'], 0, 3, 4, 1)
|
||||
self.labels['info_grid'] = Gtk.Grid()
|
||||
self.labels['info_grid'].attach(self.labels['thumbnail'], 0, 0, 1, 1)
|
||||
self.create_status_grid()
|
||||
|
||||
self.add_labels()
|
||||
self.grid = self._gtk.HomogeneousGrid()
|
||||
self.grid.set_row_homogeneous(False)
|
||||
self.grid.attach(overlay, 0, 0, 1, 1)
|
||||
self.grid.attach(fi_box, 1, 0, 3, 1)
|
||||
self.grid.attach(self.labels['info_grid'], 0, 1, 4, 2)
|
||||
self.grid.attach(self.buttons['button_grid'], 0, 3, 4, 1)
|
||||
|
||||
self.grid = grid
|
||||
self.content.add(grid)
|
||||
self.content.add(self.grid)
|
||||
self._screen.wake_screen()
|
||||
|
||||
self.current_extruder = self._printer.get_stat("toolhead", "extruder")
|
||||
# the diameter may change with extruders but is highly unusual
|
||||
diameter = float(self._printer.get_config_section(self.current_extruder)['filament_diameter'])
|
||||
self.fila_section = pi * ((diameter / 2) ** 2)
|
||||
|
||||
def create_status_grid(self, widget=None):
|
||||
_ = self.lang.gettext
|
||||
self.main_status_displayed = True
|
||||
|
||||
self.labels['temp_grid'] = Gtk.Grid()
|
||||
if self._screen.width <= 480:
|
||||
nlimit = 2
|
||||
else:
|
||||
nlimit = 3
|
||||
n = 0
|
||||
self.extruder_button = {}
|
||||
if self._screen.printer.get_tools():
|
||||
for i, extruder in enumerate(self._printer.get_tools()):
|
||||
self.labels[extruder] = Gtk.Label("-")
|
||||
self.extruder_button[extruder] = self._gtk.ButtonImage("extruder-%s" % i,
|
||||
None, None, .6, Gtk.PositionType.LEFT)
|
||||
self.extruder_button[extruder].set_label(self.labels[extruder].get_text())
|
||||
self.extruder_button[extruder].connect("clicked", self.menu_item_clicked, "temperature",
|
||||
{"panel": "temperature", "name": _("Temperature")})
|
||||
self.extruder_button[extruder].set_halign(Gtk.Align.START)
|
||||
self.current_extruder = self._printer.get_stat("toolhead", "extruder")
|
||||
self.labels['temp_grid'].attach(self.extruder_button[self.current_extruder], n, 0, 1, 1)
|
||||
n += 1
|
||||
else:
|
||||
self.current_extruder = None
|
||||
self.heater_button = {}
|
||||
if self._printer.has_heated_bed():
|
||||
self.heater_button['heater_bed'] = self._gtk.ButtonImage("bed",
|
||||
None, None, .6, Gtk.PositionType.LEFT)
|
||||
self.labels['heater_bed'] = Gtk.Label("-")
|
||||
self.heater_button['heater_bed'].set_label(self.labels['heater_bed'].get_text())
|
||||
self.heater_button['heater_bed'].connect("clicked", self.menu_item_clicked, "temperature",
|
||||
{"panel": "temperature", "name": _("Temperature")})
|
||||
self.heater_button['heater_bed'].set_halign(Gtk.Align.START)
|
||||
self.labels['temp_grid'].attach(self.heater_button['heater_bed'], n, 0, 1, 1)
|
||||
n += 1
|
||||
for device in self._screen.printer.get_heaters():
|
||||
if n >= nlimit:
|
||||
break
|
||||
if device.startswith("heater_generic"):
|
||||
self.heater_button[device] = self._gtk.ButtonImage("heater",
|
||||
None, None, .6, Gtk.PositionType.LEFT)
|
||||
self.labels[device] = Gtk.Label("-")
|
||||
self.heater_button[device].set_label(self.labels[device].get_text())
|
||||
self.heater_button[device].connect("clicked", self.menu_item_clicked, "temperature",
|
||||
{"panel": "temperature", "name": _("Temperature")})
|
||||
self.heater_button[device].set_halign(Gtk.Align.START)
|
||||
self.labels['temp_grid'].attach(self.heater_button[device], n, 0, 1, 1)
|
||||
n += 1
|
||||
extra_item = True
|
||||
printer_cfg = self._config.get_printer_config(self._screen.connected_printer)
|
||||
if printer_cfg is not None:
|
||||
titlebar_items = printer_cfg.get("titlebar_items", "")
|
||||
if titlebar_items is not None:
|
||||
titlebar_items = [str(i.strip()) for i in titlebar_items.split(',')]
|
||||
logging.info("Titlebar items: %s", titlebar_items)
|
||||
for device in self._screen.printer.get_heaters():
|
||||
if device.startswith("temperature_sensor"):
|
||||
name = device.split(" ")[1:][0]
|
||||
for item in titlebar_items:
|
||||
if name == item:
|
||||
if extra_item:
|
||||
extra_item = False
|
||||
nlimit += 1
|
||||
if n >= nlimit:
|
||||
break
|
||||
self.heater_button[device] = self._gtk.ButtonImage("heat-up", None, None, .6,
|
||||
Gtk.PositionType.LEFT)
|
||||
self.labels[device] = Gtk.Label("-")
|
||||
self.heater_button[device].set_label(self.labels[device].get_text())
|
||||
self.heater_button[device].connect("clicked", self.menu_item_clicked, "temperature",
|
||||
{"panel": "temperature", "name": _("Temperature")})
|
||||
self.heater_button[device].set_halign(Gtk.Align.START)
|
||||
self.labels['temp_grid'].attach(self.heater_button[device], n, 0, 1, 1)
|
||||
n += 1
|
||||
break
|
||||
|
||||
self.z_button = self._gtk.ButtonImage("home-z", None, None, .6, Gtk.PositionType.LEFT)
|
||||
self.z_button.set_label(self.labels['pos_z'].get_text())
|
||||
self.z_button.connect("clicked", self.create_move_grid)
|
||||
self.z_button.set_halign(Gtk.Align.START)
|
||||
|
||||
self.speed_button = self._gtk.ButtonImage("speed+", None, None, .6, Gtk.PositionType.LEFT)
|
||||
self.speed_button.set_label(self.labels['speed_factor'].get_text())
|
||||
self.speed_button.connect("clicked", self.create_move_grid)
|
||||
self.speed_button.set_halign(Gtk.Align.START)
|
||||
|
||||
self.extrusion_button = self._gtk.ButtonImage("extrude", None, None, .6, Gtk.PositionType.LEFT)
|
||||
self.extrusion_button.set_label(self.labels['extrude_factor'].get_text())
|
||||
self.extrusion_button.connect("clicked", self.create_extrusion_grid)
|
||||
self.extrusion_button.set_halign(Gtk.Align.START)
|
||||
|
||||
self.fan_button = self._gtk.ButtonImage("fan", None, None, .6, Gtk.PositionType.LEFT)
|
||||
self.fan_button.set_label(self.labels['fan'].get_text())
|
||||
self.fan_button.connect("clicked", self.menu_item_clicked, "fan", {"panel": "fan", "name": _("Fan")})
|
||||
self.fan_button.set_halign(Gtk.Align.START)
|
||||
|
||||
elapsed_label = self.labels['elapsed'].get_text() + " " + self.labels['duration'].get_text()
|
||||
self.elapsed_button = self._gtk.ButtonImage("clock", elapsed_label, None, .6, Gtk.PositionType.LEFT, False)
|
||||
self.elapsed_button.connect("clicked", self.create_time_grid)
|
||||
self.elapsed_button.set_halign(Gtk.Align.START)
|
||||
|
||||
remaining_label = self.labels['left'].get_text() + " " + self.labels['time_left'].get_text()
|
||||
self.left_button = self._gtk.ButtonImage("hourglass", remaining_label, None, .6, Gtk.PositionType.LEFT, False)
|
||||
self.left_button.connect("clicked", self.create_time_grid)
|
||||
self.left_button.set_halign(Gtk.Align.START)
|
||||
|
||||
szfe = Gtk.Grid()
|
||||
szfe.attach(self.speed_button, 0, 0, 1, 1)
|
||||
szfe.attach(self.z_button, 1, 0, 1, 1)
|
||||
szfe.attach(self.extrusion_button, 0, 1, 1, 1)
|
||||
szfe.attach(self.fan_button, 1, 1, 1, 1)
|
||||
|
||||
|
||||
info = Gtk.VBox(spacing=0)
|
||||
info.get_style_context().add_class("printing-info")
|
||||
info.add(self.labels['temp_grid'])
|
||||
info.add(szfe)
|
||||
info.add(self.elapsed_button)
|
||||
info.add(self.left_button)
|
||||
self.switch_info(info)
|
||||
|
||||
def create_extrusion_grid(self, widget=None):
|
||||
self.main_status_displayed = False
|
||||
goback = self._gtk.ButtonImage("back", None, "color1", .66, Gtk.PositionType.TOP, False)
|
||||
goback.connect("clicked", self.create_status_grid)
|
||||
goback.set_hexpand(False)
|
||||
goback.get_style_context().add_class("printing-info")
|
||||
|
||||
info = Gtk.Grid()
|
||||
info.set_hexpand(True)
|
||||
info.set_vexpand(True)
|
||||
info.set_halign(Gtk.Align.START)
|
||||
info.get_style_context().add_class("printing-info-secondary")
|
||||
info.attach(goback, 0, 0, 1, 6)
|
||||
info.attach(self.labels['flow'], 1, 0, 1, 1)
|
||||
info.attach(self.labels['extrude_factor'], 2, 0, 1, 1)
|
||||
info.attach(self.labels['flowrate_lbl'], 1, 1, 1, 1)
|
||||
info.attach(self.labels['flowrate'], 2, 1, 1, 1)
|
||||
info.attach(self.labels['pa_lbl'], 1, 2, 1, 1)
|
||||
info.attach(self.labels['advance'], 2, 2, 1, 1)
|
||||
info.attach(self.labels['fila_used_lbl'], 1, 3, 1, 1)
|
||||
info.attach(self.labels['filament_used'], 2, 3, 1, 1)
|
||||
info.attach(self.labels['fila_total_lbl'], 1, 4, 1, 1)
|
||||
info.attach(self.labels['filament_total'], 2, 4, 1, 1)
|
||||
self.switch_info(info)
|
||||
|
||||
def create_move_grid(self, widget=None):
|
||||
self.main_status_displayed = False
|
||||
goback = self._gtk.ButtonImage("back", None, "color2", .66, Gtk.PositionType.TOP, False)
|
||||
goback.connect("clicked", self.create_status_grid)
|
||||
goback.set_hexpand(False)
|
||||
goback.get_style_context().add_class("printing-info")
|
||||
|
||||
pos_box = Gtk.HBox(spacing=5)
|
||||
pos_box.add(self.labels['pos_x'])
|
||||
pos_box.add(self.labels['pos_y'])
|
||||
pos_box.add(self.labels['pos_z'])
|
||||
|
||||
info = Gtk.Grid()
|
||||
info.set_hexpand(True)
|
||||
info.set_vexpand(True)
|
||||
info.set_halign(Gtk.Align.START)
|
||||
info.get_style_context().add_class("printing-info-secondary")
|
||||
info.attach(goback, 0, 0, 1, 6)
|
||||
info.attach(self.labels['speed_lbl'], 1, 0, 1, 1)
|
||||
info.attach(self.labels['req_speed'], 2, 0, 1, 1)
|
||||
info.attach(self.labels['accel_lbl'], 1, 1, 1, 1)
|
||||
info.attach(self.labels['max_accel'], 2, 1, 1, 1)
|
||||
info.attach(pos_box, 1, 2, 2, 1)
|
||||
info.attach(self.labels['zoffset_lbl'], 1, 3, 1, 1)
|
||||
info.attach(self.labels['zoffset'], 2, 3, 1, 1)
|
||||
info.attach(self.labels['height_lbl'], 1, 4, 1, 1)
|
||||
info.attach(self.labels['height'], 2, 4, 1, 1)
|
||||
info.attach(self.labels['layer_lbl'], 1, 5, 1, 1)
|
||||
info.attach(self.labels['layer'], 2, 5, 1, 1)
|
||||
self.switch_info(info)
|
||||
|
||||
def create_time_grid(self, widget=None):
|
||||
self.main_status_displayed = False
|
||||
goback = self._gtk.ButtonImage("back", None, "color3", .66, Gtk.PositionType.TOP, False)
|
||||
goback.connect("clicked", self.create_status_grid)
|
||||
goback.set_hexpand(False)
|
||||
|
||||
info = Gtk.Grid()
|
||||
info.get_style_context().add_class("printing-info-secondary")
|
||||
info.attach(goback, 0, 0, 1, 6)
|
||||
info.attach(self.labels['elapsed'], 1, 0, 1, 1)
|
||||
info.attach(self.labels['duration'], 2, 0, 1, 1)
|
||||
info.attach(self.labels['total'], 1, 1, 1, 1)
|
||||
info.attach(self.labels['est_time'], 2, 1, 1, 1)
|
||||
info.attach(self.labels['left'], 1, 2, 1, 1)
|
||||
info.attach(self.labels['time_left'], 2, 2, 1, 1)
|
||||
info.attach(self.labels['slicer'], 1, 3, 1, 1)
|
||||
info.attach(self.labels['slicer_time'], 2, 3, 1, 1)
|
||||
info.attach(self.labels['file_tlbl'], 1, 4, 1, 1)
|
||||
info.attach(self.labels['file_time'], 2, 4, 1, 1)
|
||||
info.attach(self.labels['fila_tlbl'], 1, 5, 1, 1)
|
||||
info.attach(self.labels['filament_time'], 2, 5, 1, 1)
|
||||
self.switch_info(info)
|
||||
|
||||
def switch_info(self, info):
|
||||
if self._screen.vertical_mode:
|
||||
self.labels['info_grid'].remove_row(1)
|
||||
self.labels['info_grid'].attach(info, 0, 1, 1, 1)
|
||||
else:
|
||||
self.labels['info_grid'].remove_column(1)
|
||||
self.labels['info_grid'].attach(info, 1, 0, 1, 1)
|
||||
self.labels['info_grid'].show_all()
|
||||
|
||||
def on_draw(self, da, ctx):
|
||||
w = da.get_allocated_width()
|
||||
h = da.get_allocated_height()
|
||||
r = min(w, h)*.4
|
||||
r = min(w, h)*.42
|
||||
|
||||
ctx.set_source_rgb(0.6, 0.6, 0.6)
|
||||
ctx.set_source_rgb(0.13, 0.13, 0.13)
|
||||
ctx.set_line_width(self._gtk.get_font_size() * .75)
|
||||
ctx.translate(w / 2, h / 2)
|
||||
ctx.arc(0, 0, r, 0, 2*math.pi)
|
||||
ctx.arc(0, 0, r, 0, 2*pi)
|
||||
ctx.stroke()
|
||||
|
||||
ctx.set_source_rgb(1, 0, 0)
|
||||
ctx.arc(0, 0, r, 3/2*math.pi, 3/2*math.pi+(self.progress*2*math.pi))
|
||||
ctx.set_source_rgb(0.718, 0.110, 0.110)
|
||||
ctx.arc(0, 0, r, 3/2*pi, 3/2*pi+(self.progress*2*pi))
|
||||
ctx.stroke()
|
||||
|
||||
|
||||
def activate(self):
|
||||
_ = self.lang.gettext
|
||||
ps = self._printer.get_stat("print_stats")
|
||||
self.set_state(ps['state'])
|
||||
if self.state_timeout is None:
|
||||
self.state_timeout = GLib.timeout_add_seconds(1, self.state_check)
|
||||
|
||||
def add_labels(self):
|
||||
for child in self.labels['i1_box'].get_children():
|
||||
self.labels['i1_box'].remove(child)
|
||||
for child in self.labels['i2_box'].get_children():
|
||||
self.labels['i2_box'].remove(child)
|
||||
|
||||
self.labels['i1_box'].add(self.labels['thumbnail'])
|
||||
self.labels['i2_box'].add(self.labels['temp_grid'])
|
||||
self.labels['i2_box'].add(self.labels['pos_box'])
|
||||
self.labels['i2_box'].add(self.labels['sfe_grid'])
|
||||
self.labels['i2_box'].add(self.labels['timegrid'])
|
||||
self.labels['i2_box'].add(self.labels['itl_box'])
|
||||
|
||||
self.create_status_grid()
|
||||
|
||||
def create_buttons(self):
|
||||
_ = self.lang.gettext
|
||||
self.labels['cancel'] = self._gtk.ButtonImage("stop", _("Cancel"), "color2")
|
||||
self.labels['cancel'].connect("clicked", self.cancel)
|
||||
self.labels['control'] = self._gtk.ButtonImage("settings", _("Settings"), "color3")
|
||||
self.labels['control'].connect("clicked", self._screen._go_to_submenu, "")
|
||||
self.labels['fine_tune'] = self._gtk.ButtonImage("fine-tune", _("Fine Tuning"), "color4")
|
||||
self.labels['fine_tune'].connect("clicked", self.menu_item_clicked, "fine_tune", {
|
||||
self.buttons = {
|
||||
'cancel': self._gtk.ButtonImage("stop", _("Cancel"), "color2"),
|
||||
'control': self._gtk.ButtonImage("settings", _("Settings"), "color3"),
|
||||
'fine_tune': self._gtk.ButtonImage("fine-tune", _("Fine Tuning"), "color4"),
|
||||
'menu': self._gtk.ButtonImage("complete", _("Main Menu"), "color4"),
|
||||
'pause': self._gtk.ButtonImage("pause", _("Pause"), "color1"),
|
||||
'restart': self._gtk.ButtonImage("refresh", _("Restart"), "color3"),
|
||||
'resume': self._gtk.ButtonImage("resume", _("Resume"), "color1"),
|
||||
'save_offset_probe': self._gtk.ButtonImage("home-z", _("Save Z") + "\n" + "Probe", "color1"),
|
||||
'save_offset_endstop': self._gtk.ButtonImage("home-z", _("Save Z") + "\n" + "Endstop", "color2"),
|
||||
}
|
||||
self.buttons['cancel'].connect("clicked", self.cancel)
|
||||
self.buttons['control'].connect("clicked", self._screen._go_to_submenu, "")
|
||||
self.buttons['fine_tune'].connect("clicked", self.menu_item_clicked, "fine_tune", {
|
||||
"panel": "fine_tune", "name": _("Fine Tuning")})
|
||||
self.labels['menu'] = self._gtk.ButtonImage("complete", _("Main Menu"), "color4")
|
||||
self.labels['menu'].connect("clicked", self.close_panel)
|
||||
self.labels['pause'] = self._gtk.ButtonImage("pause", _("Pause"), "color1")
|
||||
self.labels['pause'].connect("clicked", self.pause)
|
||||
self.labels['restart'] = self._gtk.ButtonImage("refresh", _("Restart"), "color3")
|
||||
self.labels['restart'].connect("clicked", self.restart)
|
||||
self.labels['resume'] = self._gtk.ButtonImage("resume", _("Resume"), "color1")
|
||||
self.labels['resume'].connect("clicked", self.resume)
|
||||
self.buttons['menu'].connect("clicked", self.close_panel)
|
||||
self.buttons['pause'].connect("clicked", self.pause)
|
||||
self.buttons['restart'].connect("clicked", self.restart)
|
||||
self.buttons['resume'].connect("clicked", self.resume)
|
||||
self.buttons['save_offset_probe'].connect("clicked", self.save_offset_probe)
|
||||
self.buttons['save_offset_endstop'].connect("clicked", self.save_offset_endstop)
|
||||
|
||||
def save_offset_probe(self, widget):
|
||||
self._screen._ws.klippy.gcode_script("Z_OFFSET_APPLY_PROBE")
|
||||
self._screen._ws.klippy.gcode_script("SAVE_CONFIG")
|
||||
|
||||
def save_offset_endstop(self, widget):
|
||||
self._screen._ws.klippy.gcode_script("Z_OFFSET_APPLY_ENDSTOP")
|
||||
self._screen._ws.klippy.gcode_script("SAVE_CONFIG")
|
||||
|
||||
def restart(self, widget):
|
||||
if self.filename != "none":
|
||||
@@ -334,11 +460,11 @@ class JobStatusPanel(ScreenPanel):
|
||||
|
||||
def enable_button(self, *args):
|
||||
for arg in args:
|
||||
self.labels[arg].set_sensitive(True)
|
||||
self.buttons[arg].set_sensitive(True)
|
||||
|
||||
def disable_button(self, *args):
|
||||
for arg in args:
|
||||
self.labels[arg].set_sensitive(False)
|
||||
self.buttons[arg].set_sensitive(False)
|
||||
|
||||
def _callback_metadata(self, newfiles, deletedfiles, modifiedfiles):
|
||||
if bool(self.file_metadata) is False and self.filename in modifiedfiles:
|
||||
@@ -365,60 +491,150 @@ class JobStatusPanel(ScreenPanel):
|
||||
return
|
||||
_ = self.lang.gettext
|
||||
|
||||
if self._printer.has_heated_bed():
|
||||
self.update_temp(
|
||||
"heater_bed",
|
||||
self._printer.get_dev_stat("heater_bed", "temperature"),
|
||||
self._printer.get_dev_stat("heater_bed", "target")
|
||||
)
|
||||
for x in self._printer.get_tools():
|
||||
self.update_temp(
|
||||
x,
|
||||
self._printer.get_dev_stat(x, "temperature"),
|
||||
self._printer.get_dev_stat(x, "target")
|
||||
)
|
||||
if self.main_status_displayed:
|
||||
for x in self._printer.get_tools():
|
||||
self.update_temp(
|
||||
x,
|
||||
self._printer.get_dev_stat(x, "temperature"),
|
||||
self._printer.get_dev_stat(x, "target")
|
||||
)
|
||||
self.extruder_button[x].set_label(self.labels[x].get_text())
|
||||
for x in self._printer.get_heaters():
|
||||
if x in self.labels:
|
||||
self.update_temp(
|
||||
x,
|
||||
self._printer.get_dev_stat(x, "temperature"),
|
||||
self._printer.get_dev_stat(x, "target")
|
||||
)
|
||||
self.heater_button[x].set_label(self.labels[x].get_text())
|
||||
|
||||
ps = self._printer.get_stat("print_stats")
|
||||
self.update_message()
|
||||
|
||||
if "toolhead" in data:
|
||||
if "extruder" in data["toolhead"]:
|
||||
if data["toolhead"]["extruder"] != self.current_extruder:
|
||||
self.labels['temp_grid'].remove_column(0)
|
||||
self.labels['temp_grid'].insert_column(0)
|
||||
self.current_extruder = data["toolhead"]["extruder"]
|
||||
self.labels['temp_grid'].attach(self.labels[self.current_extruder + '_box'], 0, 0, 1, 1)
|
||||
self._screen.show_all()
|
||||
if "toolhead" in data and "extruder" in data["toolhead"]:
|
||||
if self.current_extruder is not None and data["toolhead"]["extruder"] != self.current_extruder:
|
||||
self.labels['temp_grid'].remove_column(0)
|
||||
self.labels['temp_grid'].insert_column(0)
|
||||
self.current_extruder = data["toolhead"]["extruder"]
|
||||
self.labels['temp_grid'].attach(self.extruder_button[self.current_extruder], 0, 0, 1, 1)
|
||||
self._screen.show_all()
|
||||
if "max_accel" in data["toolhead"]:
|
||||
self.labels['max_accel'].set_text("%d mm/s2" % (data["toolhead"]["max_accel"]))
|
||||
|
||||
if "gcode_move" in data and "gcode_position" in data["gcode_move"]:
|
||||
self.labels['pos_x'].set_text("X: %.2f" % (data["gcode_move"]["gcode_position"][0]))
|
||||
self.labels['pos_y'].set_text("Y: %.2f" % (data["gcode_move"]["gcode_position"][1]))
|
||||
self.labels['pos_z'].set_text("Z: %.2f" % (data["gcode_move"]["gcode_position"][2]))
|
||||
if "extruder" in data and "pressure_advance" in data['extruder']:
|
||||
self.labels['advance'].set_text("%.2f" % data['extruder']['pressure_advance'])
|
||||
|
||||
if "gcode_move" in data:
|
||||
if "gcode_position" in data["gcode_move"]:
|
||||
self.labels['pos_x'].set_text("X: %6.2f" % (data["gcode_move"]["gcode_position"][0]))
|
||||
self.labels['pos_y'].set_text("Y: %6.2f" % (data["gcode_move"]["gcode_position"][1]))
|
||||
self.labels['pos_z'].set_text("Z: %6.2f" % (data["gcode_move"]["gcode_position"][2]))
|
||||
self.pos_z = data["gcode_move"]["gcode_position"][2]
|
||||
if self.main_status_displayed:
|
||||
self.z_button.set_label(self.labels['pos_z'].get_text())
|
||||
now = time.time()
|
||||
pos = data["gcode_move"]["gcode_position"]
|
||||
if self.prev_gpos is not None:
|
||||
interval = now - self.prev_gpos[1]
|
||||
# Calculate Velocity
|
||||
vel = [(pos[0] - self.prev_gpos[0][0]),
|
||||
(pos[1] - self.prev_gpos[0][1]),
|
||||
(pos[2] - self.prev_gpos[0][2])]
|
||||
vel = array(vel)
|
||||
self.velstore.append(sqrt(vel.dot(vel)) / interval)
|
||||
self.prev_gpos = [pos, now]
|
||||
if "extrude_factor" in data["gcode_move"]:
|
||||
self.extrusion = int(round(data["gcode_move"]["extrude_factor"]*100))
|
||||
self.labels['extrusion'].set_text("%3d%%" % self.extrusion)
|
||||
self.extrusion = int(round(data["gcode_move"]["extrude_factor"] * 100))
|
||||
self.labels['extrude_factor'].set_text("%3d%%" % self.extrusion)
|
||||
if self.main_status_displayed:
|
||||
self.extrusion_button.set_label("%3d%%" % self.extrusion)
|
||||
if "speed_factor" in data["gcode_move"]:
|
||||
self.speed = int(round(data["gcode_move"]["speed_factor"]*100))
|
||||
self.labels['speed'].set_text("%3d%%" % self.speed)
|
||||
self.speed = int(round(data["gcode_move"]["speed_factor"] * 100))
|
||||
self.speed_factor = float(data["gcode_move"]["speed_factor"])
|
||||
self.labels['speed_factor'].set_text("%3d%%" % self.speed)
|
||||
if "speed" in data["gcode_move"]:
|
||||
self.req_speed = int(round(data["gcode_move"]["speed"] / 60 * self.speed_factor))
|
||||
self.labels['req_speed'].set_text("%d mm/s" % self.req_speed)
|
||||
if "homing_origin" in data["gcode_move"]:
|
||||
self.zoffset = data["gcode_move"]["homing_origin"][2]
|
||||
self.labels['zoffset'].set_text("%.2f" % self.zoffset)
|
||||
if "motion_report" in data:
|
||||
if 'live_position' in data["motion_report"]:
|
||||
now = time.time()
|
||||
pos = data["motion_report"]["live_position"]
|
||||
if self.prev_pos is not None:
|
||||
interval = (now - self.prev_pos[1])
|
||||
# Calculate Flowrate
|
||||
evelocity = (pos[3] - self.prev_pos[0][3]) / interval
|
||||
self.flowstore.append(self.fila_section * evelocity)
|
||||
# Calculate Velocity
|
||||
vel = [(pos[0] - self.prev_pos[0][0]),
|
||||
(pos[1] - self.prev_pos[0][1]),
|
||||
(pos[2] - self.prev_pos[0][2])]
|
||||
vel = array(vel)
|
||||
self.velstore.append(sqrt(vel.dot(vel)) / interval)
|
||||
self.prev_pos = [pos, now]
|
||||
if "live_velocity" in data["motion_report"]:
|
||||
self.velstore.append(data["motion_report"]["live_velocity"])
|
||||
if "live_extruder_velocity" in data["motion_report"]:
|
||||
self.flowstore.append(self.flowrate)
|
||||
|
||||
if "fan" in data and "speed" in data['fan']:
|
||||
self.fan = int(round(self._printer.get_fan_speed("fan", data['fan']['speed']), 2)*100)
|
||||
self.labels['fan'].set_text("%3d%%" % self.fan)
|
||||
for fan in self.fans:
|
||||
if fan in data and "speed" in data[fan]:
|
||||
fan_speed = int(round(self._printer.get_fan_speed(fan, data[fan]["speed"]), 2)*100)
|
||||
self.fans[fan]['speed'] = ("%3d%%" % fan_speed)
|
||||
fan_label = ""
|
||||
for fan in self.fans:
|
||||
fan_label += self.fans[fan]['name'] + self.fans[fan]['speed'] + " "
|
||||
self.labels['fan'].set_text(fan_label[:12])
|
||||
|
||||
if "layer_height" in self.file_metadata:
|
||||
layer_label = str(1 + round((self.pos_z - self.f_layer_h) / self.layer_h))
|
||||
layer_label += " / " + self.labels['total_layers'].get_text()
|
||||
self.labels['layer'].set_label(layer_label)
|
||||
|
||||
self.state_check()
|
||||
if self.state not in ["printing", "paused"]:
|
||||
return
|
||||
|
||||
if ps['filename'] and (ps['filename'] != self.filename):
|
||||
ps = self._printer.get_stat("print_stats")
|
||||
if int(ps['print_duration']) == 0 and self.progress > 0.001:
|
||||
# Print duration remains at 0 when using No-extusion tests
|
||||
duration = ps['total_duration']
|
||||
else:
|
||||
duration = ps['print_duration']
|
||||
if 'filament_used' in ps:
|
||||
fila_used = float(ps['filament_used'])
|
||||
self.labels['filament_used'].set_text("%.1f m" % (fila_used / 1000))
|
||||
if 'filename' in ps and (ps['filename'] != self.filename):
|
||||
logging.debug("Changing filename: '%s' to '%s'" % (self.filename, ps['filename']))
|
||||
self.update_filename()
|
||||
else:
|
||||
self.update_percent_complete()
|
||||
self.update_text("duration", str(self._gtk.formatTimeString(duration)))
|
||||
self.update_text("time_left", self.calculate_time_left(duration, ps['filament_used']))
|
||||
|
||||
self.update_text("duration", str(self._gtk.formatTimeString(ps['print_duration'])))
|
||||
self.update_text("time_left", self.calculate_time_left(ps['print_duration'], ps['filament_used']))
|
||||
if self.main_status_displayed:
|
||||
self.fan_button.set_label(self.labels['fan'].get_text())
|
||||
elapsed_label = self.labels['elapsed'].get_text() + " " + self.labels['duration'].get_text()
|
||||
self.elapsed_button.set_label(elapsed_label)
|
||||
remaining_label = self.labels['left'].get_text() + " " + self.labels['time_left'].get_text()
|
||||
self.left_button.set_label(remaining_label)
|
||||
if self.vel_timeout is None:
|
||||
self.vel_timeout = GLib.timeout_add_seconds(1, self.update_velocity)
|
||||
|
||||
def update_velocity(self):
|
||||
if len(self.velstore) > 0:
|
||||
self.vel = (self.vel + median(array(self.velstore))) / 2
|
||||
self.labels['req_speed'].set_text("%d/%d mm/s" % (self.vel, self.req_speed))
|
||||
self.velstore = []
|
||||
if len(self.flowstore) > 0:
|
||||
self.flowrate = (self.flowrate + median(array(self.flowstore))) / 2
|
||||
self.labels['flowrate'].set_label("%.1f mm3/s" % self.flowrate)
|
||||
self.flowstore = []
|
||||
if self.main_status_displayed:
|
||||
self.speed_button.set_label("%3d%% %5d mm/s" % (self.speed, self.vel))
|
||||
self.extrusion_button.set_label("%3d%% %5.1f mm3/s" % (self.extrusion, self.flowrate))
|
||||
return True
|
||||
|
||||
def calculate_time_left(self, duration=0, filament_used=0):
|
||||
total_duration = None
|
||||
@@ -427,7 +643,7 @@ class JobStatusPanel(ScreenPanel):
|
||||
timeleft_type = self._config.get_config()['main'].get('print_estimate_method', 'auto')
|
||||
slicer_correction = (self._config.get_config()['main'].getint('print_estimate_compensation', 100) / 100)
|
||||
# speed_factor compensation based on empirical testing
|
||||
spdcomp = math.sqrt(self.speed / 100)
|
||||
spdcomp = sqrt(self.speed_factor)
|
||||
|
||||
if "estimated_time" in self.file_metadata:
|
||||
if self.file_metadata['estimated_time'] > 0:
|
||||
@@ -468,6 +684,12 @@ class JobStatusPanel(ScreenPanel):
|
||||
if total_duration is None:
|
||||
return "-"
|
||||
self.update_text("est_time", str(self._gtk.formatTimeString(total_duration)))
|
||||
if slicer_time is not None:
|
||||
self.update_text("slicer_time", str(self._gtk.formatTimeString(slicer_time)))
|
||||
if file_time is not None:
|
||||
self.update_text("file_time", str(self._gtk.formatTimeString(file_time)))
|
||||
if filament_time is not None:
|
||||
self.update_text("filament_time", str(self._gtk.formatTimeString(filament_time)))
|
||||
return str(self._gtk.formatTimeString((total_duration - duration)))
|
||||
|
||||
def state_check(self):
|
||||
@@ -495,7 +717,8 @@ class JobStatusPanel(ScreenPanel):
|
||||
elif ps['state'] == "error":
|
||||
logging.debug("Error!")
|
||||
self.set_state("error")
|
||||
self.labels['status'].set_text("%s - %s" % (_("Error"), ps['message']))
|
||||
self.labels['status'].set_text("%s" % (_("Error")))
|
||||
self._screen.show_popup_message(ps['message'])
|
||||
self._screen.wake_screen()
|
||||
self.remove_close_timeout()
|
||||
timeout = self._config.get_main_config().getint("job_error_timeout", 0)
|
||||
@@ -537,30 +760,45 @@ class JobStatusPanel(ScreenPanel):
|
||||
|
||||
|
||||
def show_buttons_for_state(self):
|
||||
self.labels['button_grid'].remove_row(0)
|
||||
self.labels['button_grid'].insert_row(0)
|
||||
self.buttons['button_grid'].remove_row(0)
|
||||
self.buttons['button_grid'].insert_row(0)
|
||||
if self.state == "printing":
|
||||
self.labels['button_grid'].attach(self.labels['pause'], 0, 0, 1, 1)
|
||||
self.labels['button_grid'].attach(self.labels['cancel'], 1, 0, 1, 1)
|
||||
self.labels['button_grid'].attach(self.labels['fine_tune'], 2, 0, 1, 1)
|
||||
self.labels['button_grid'].attach(self.labels['control'], 3, 0, 1, 1)
|
||||
self.buttons['button_grid'].attach(self.buttons['pause'], 0, 0, 1, 1)
|
||||
self.buttons['button_grid'].attach(self.buttons['cancel'], 1, 0, 1, 1)
|
||||
self.buttons['button_grid'].attach(self.buttons['fine_tune'], 2, 0, 1, 1)
|
||||
self.buttons['button_grid'].attach(self.buttons['control'], 3, 0, 1, 1)
|
||||
self.enable_button("pause", "cancel")
|
||||
elif self.state == "paused":
|
||||
self.labels['button_grid'].attach(self.labels['resume'], 0, 0, 1, 1)
|
||||
self.labels['button_grid'].attach(self.labels['cancel'], 1, 0, 1, 1)
|
||||
self.labels['button_grid'].attach(self.labels['fine_tune'], 2, 0, 1, 1)
|
||||
self.labels['button_grid'].attach(self.labels['control'], 3, 0, 1, 1)
|
||||
self.buttons['button_grid'].attach(self.buttons['resume'], 0, 0, 1, 1)
|
||||
self.buttons['button_grid'].attach(self.buttons['cancel'], 1, 0, 1, 1)
|
||||
self.buttons['button_grid'].attach(self.buttons['fine_tune'], 2, 0, 1, 1)
|
||||
self.buttons['button_grid'].attach(self.buttons['control'], 3, 0, 1, 1)
|
||||
self.enable_button("resume", "cancel")
|
||||
else:
|
||||
self.labels['button_grid'].attach(Gtk.Label(""), 0, 0, 1, 1)
|
||||
self.labels['button_grid'].attach(Gtk.Label(""), 1, 0, 1, 1)
|
||||
self.labels['button_grid'].attach(self.labels['restart'], 2, 0, 1, 1)
|
||||
self.labels['button_grid'].attach(self.labels['menu'], 3, 0, 1, 1)
|
||||
if self.zoffset != 0:
|
||||
endstop = (self._screen.printer.config_section_exists("stepper_z") and
|
||||
not self._screen.printer.get_config_section("stepper_z")['endstop_pin'].startswith("probe"))
|
||||
if endstop:
|
||||
self.buttons['button_grid'].attach(self.buttons["save_offset_endstop"], 0, 0, 1, 1)
|
||||
else:
|
||||
self.buttons['button_grid'].attach(Gtk.Label(""), 0, 0, 1, 1)
|
||||
if (self._printer.config_section_exists("probe") or self._printer.config_section_exists("bltouch")):
|
||||
self.buttons['button_grid'].attach(self.buttons["save_offset_probe"], 1, 0, 1, 1)
|
||||
else:
|
||||
self.buttons['button_grid'].attach(Gtk.Label(""), 1, 0, 1, 1)
|
||||
else:
|
||||
self.buttons['button_grid'].attach(Gtk.Label(""), 0, 0, 1, 1)
|
||||
self.buttons['button_grid'].attach(Gtk.Label(""), 1, 0, 1, 1)
|
||||
|
||||
if self.filename is not None:
|
||||
self.buttons['button_grid'].attach(self.buttons['restart'], 2, 0, 1, 1)
|
||||
self.buttons['button_grid'].attach(self.buttons['menu'], 3, 0, 1, 1)
|
||||
self.show_all()
|
||||
|
||||
def show_file_thumbnail(self):
|
||||
if self._files.has_thumbnail(self.filename):
|
||||
pixbuf = self.get_file_image(self.filename, 7, 3.25)
|
||||
scale = 5 * self._files.get_thumbnail_scale(self.filename)
|
||||
pixbuf = self.get_file_image(self.filename, scale, scale)
|
||||
if pixbuf is not None:
|
||||
self.labels['thumbnail'].set_from_pixbuf(pixbuf)
|
||||
|
||||
@@ -582,6 +820,19 @@ class JobStatusPanel(ScreenPanel):
|
||||
for i in tmp:
|
||||
i['data'] = ""
|
||||
self.show_file_thumbnail()
|
||||
if "object_height" in self.file_metadata:
|
||||
self.height = self.file_metadata['object_height']
|
||||
self.labels['height'].set_label(str(self.height) + " mm")
|
||||
if "layer_height" in self.file_metadata:
|
||||
self.layer_h = self.file_metadata['layer_height']
|
||||
if "first_layer_height" in self.file_metadata:
|
||||
self.f_layer_h = self.file_metadata['first_layer_height']
|
||||
else:
|
||||
self.f_layer_h = layer_h
|
||||
self.labels['total_layers'].set_label(str(int((self.height - self.f_layer_h) / self.layer_h) + 1))
|
||||
if "filament_total" in self.file_metadata:
|
||||
filament_total = float(self.file_metadata['filament_total']) / 1000
|
||||
self.labels['filament_total'].set_text("%.1f m" % filament_total)
|
||||
else:
|
||||
self.file_metadata = {}
|
||||
logging.debug("Cannot find file metadata. Listening for updated metadata")
|
||||
@@ -612,7 +863,10 @@ class JobStatusPanel(ScreenPanel):
|
||||
self.labels[label].set_text(text)
|
||||
|
||||
def update_progress(self):
|
||||
self.labels['progress_text'].set_text("%s%%" % (str(min(int(self.progress*100), 100))))
|
||||
if self.progress < 1:
|
||||
self.labels['progress_text'].set_text("%s%%" % (str((int(self.progress*100)))))
|
||||
else:
|
||||
self.labels['progress_text'].set_text("100")
|
||||
|
||||
def update_message(self):
|
||||
msg = self._printer.get_stat("display_status", "message")
|
||||
@@ -620,6 +874,7 @@ class JobStatusPanel(ScreenPanel):
|
||||
self.labels['lcdmessage'].set_text(msg)
|
||||
|
||||
def update_temp(self, x, temp, target):
|
||||
self.labels[x].set_markup(
|
||||
"%.1f<big>/</big>%.0f °C" % (temp, target)
|
||||
)
|
||||
if target > 0:
|
||||
self.labels[x].set_label("%3d/%3d°" % (temp, target))
|
||||
else:
|
||||
self.labels[x].set_label("%3d°" % (temp))
|
||||
+1
-1
@@ -81,7 +81,7 @@ class LimitsPanel(ScreenPanel):
|
||||
frame.get_style_context().add_class("frame-item")
|
||||
|
||||
name = Gtk.Label()
|
||||
name.set_markup("<big><b>%s</b></big>" % (optname))
|
||||
name.set_markup("<big><b>%s</b></big> (%s)" % (optname, units))
|
||||
name.set_hexpand(True)
|
||||
name.set_vexpand(True)
|
||||
name.set_halign(Gtk.Align.START)
|
||||
|
||||
+6
-6
@@ -91,12 +91,12 @@ class MainPanel(MenuPanel):
|
||||
class_name = "graph_label_heater_bed"
|
||||
type = "bed"
|
||||
elif device.startswith("heater_generic"):
|
||||
h = 1
|
||||
self.h = 1
|
||||
for d in self.devices:
|
||||
if "heater_generic" in d:
|
||||
h += 1
|
||||
image = "heat-up"
|
||||
class_name = "graph_label_sensor_%s" % h
|
||||
self.h += 1
|
||||
image = "heater"
|
||||
class_name = "graph_label_sensor_%s" % self.h
|
||||
type = "sensor"
|
||||
elif device.startswith("temperature_fan"):
|
||||
f = 1
|
||||
@@ -111,7 +111,7 @@ class MainPanel(MenuPanel):
|
||||
else:
|
||||
s = 1
|
||||
try:
|
||||
s += h
|
||||
s += self.h
|
||||
except Exception:
|
||||
pass
|
||||
for d in self.devices:
|
||||
@@ -130,7 +130,7 @@ class MainPanel(MenuPanel):
|
||||
|
||||
text = "<span underline='double' underline_color='#%s'>%s</span>" % (color, devname.capitalize())
|
||||
name = self._gtk.ButtonImage(image, devname.capitalize().replace("_", " "),
|
||||
None, .5, .5, Gtk.PositionType.LEFT, False)
|
||||
None, .5, Gtk.PositionType.LEFT, False)
|
||||
name.connect('clicked', self.on_popover_clicked, device)
|
||||
name.set_alignment(0, .5)
|
||||
name.get_style_context().add_class(class_name)
|
||||
|
||||
@@ -2,7 +2,6 @@ import gi
|
||||
import logging
|
||||
import netifaces
|
||||
import os
|
||||
import netifaces
|
||||
from ks_includes.wifi import WifiManager
|
||||
|
||||
gi.require_version("Gtk", "3.0")
|
||||
|
||||
+3
-3
@@ -55,7 +55,7 @@ class PrintPanel(ScreenPanel):
|
||||
sbox.add(s)
|
||||
i += 1
|
||||
|
||||
refresh = self._gtk.ButtonImage("refresh", None, None, .5, .5)
|
||||
refresh = self._gtk.ButtonImage("refresh", None, None, .5)
|
||||
refresh.connect('clicked', self._refresh_files)
|
||||
sbox.add(refresh)
|
||||
sbox.set_hexpand(True)
|
||||
@@ -125,7 +125,7 @@ class PrintPanel(ScreenPanel):
|
||||
file.set_hexpand(True)
|
||||
file.set_vexpand(False)
|
||||
|
||||
icon = self._gtk.Image("folder.svg", False, 1, 1)
|
||||
icon = self._gtk.Image("folder", 1)
|
||||
|
||||
file.add(icon)
|
||||
file.add(labels)
|
||||
@@ -216,7 +216,7 @@ class PrintPanel(ScreenPanel):
|
||||
if pixbuf is not None:
|
||||
icon.set_from_pixbuf(pixbuf)
|
||||
else:
|
||||
icon = self._gtk.Image("file.svg", False, 1.6, 1.6)
|
||||
icon = self._gtk.Image("file", 1.6)
|
||||
|
||||
file.add(icon)
|
||||
file.add(labels)
|
||||
|
||||
@@ -0,0 +1,154 @@
|
||||
import gi
|
||||
import logging
|
||||
import re
|
||||
|
||||
gi.require_version("Gtk", "3.0")
|
||||
from gi.repository import Gdk, Gtk, Pango
|
||||
|
||||
from ks_includes.screen_panel import ScreenPanel
|
||||
|
||||
def create_panel(*args):
|
||||
return FWRetractionPanel(*args)
|
||||
|
||||
|
||||
class FWRetractionPanel(ScreenPanel):
|
||||
values = {}
|
||||
list = {}
|
||||
|
||||
def initialize(self, panel_name):
|
||||
_ = self.lang.gettext
|
||||
self.grid = Gtk.Grid()
|
||||
|
||||
conf = self._printer.get_config_section("firmware_retraction")
|
||||
|
||||
self.options = [
|
||||
{"name": _("Retraction Length"),
|
||||
"units": _("mm"),
|
||||
"option": "retract_length",
|
||||
"value": float(conf['retract_length']) if 'retract_length' in conf else 0,
|
||||
"digits":2,
|
||||
"maxval":4},
|
||||
{"name": _("Retraction Speed"),
|
||||
"units": _("mm/s"),
|
||||
"option": "retract_speed",
|
||||
"value": int(float((conf['retract_speed']))) if 'retract_speed' in conf else 20,
|
||||
"digits":0,
|
||||
"maxval":100},
|
||||
{"name": _("Unretract Extra Length"),
|
||||
"units": _("mm"),
|
||||
"option": "unretract_extra_length",
|
||||
"value": float(conf['unretract_extra_length']) if 'unretract_extra_length' in conf else 0,
|
||||
"digits":2,
|
||||
"maxval":15},
|
||||
{"name": _("Unretract Speed"),
|
||||
"units": _("mm/s"),
|
||||
"option": "unretract_speed",
|
||||
"value": int(float((conf['unretract_speed']))) if 'unretract_speed' in conf else 10,
|
||||
"digits":0,
|
||||
"maxval":60}
|
||||
]
|
||||
|
||||
for opt in self.options:
|
||||
self.add_option(opt['option'], opt['name'], opt['units'], opt['value'], opt['digits'], opt["maxval"])
|
||||
|
||||
scroll = Gtk.ScrolledWindow()
|
||||
scroll.set_property("overlay-scrolling", False)
|
||||
scroll.set_vexpand(True)
|
||||
scroll.add_events(Gdk.EventMask.TOUCH_MASK)
|
||||
scroll.add_events(Gdk.EventMask.BUTTON_PRESS_MASK)
|
||||
scroll.add(self.grid)
|
||||
|
||||
self.content.add(scroll)
|
||||
self.content.show_all()
|
||||
|
||||
def activate(self):
|
||||
self._screen._ws.klippy.gcode_script("GET_RETRACTION")
|
||||
|
||||
def process_update(self, action, data):
|
||||
if action == "notify_status_update" and "firmware_retraction" in data:
|
||||
for opt in self.list:
|
||||
if opt in data["firmware_retraction"]:
|
||||
self.update_option(opt, data["firmware_retraction"][opt])
|
||||
elif action == "notify_gcode_response":
|
||||
logging.info("data")
|
||||
# // RETRACT_LENGTH=0.00000 RETRACT_SPEED=20.00000 UNRETRACT_EXTRA_LENGTH=0.00000 UNRETRACT_SPEED=10.00000
|
||||
result = re.match(
|
||||
"^// [RETRACT_LENGTH= ]+([\\-0-9\\.]+)" +
|
||||
"[RETRACT_SPEED= ]+([\\-0-9\\.]+)" +
|
||||
"[UNRETRACT_EXTRA_LENGTH= ]+([\\-0-9\\.]+)" +
|
||||
"[UNRETRACT_SPEED= ]+([\\-0-9\\.]+)",
|
||||
data
|
||||
)
|
||||
if result:
|
||||
self.update_option('retract_length', result.group(1))
|
||||
self.update_option('retract_speed', result.group(2))
|
||||
self.update_option('unretract_extra_length', result.group(3))
|
||||
self.update_option('unretract_speed', result.group(4))
|
||||
|
||||
def update_option(self, option, value):
|
||||
if option not in self.list:
|
||||
return
|
||||
|
||||
if self.list[option]['scale'].has_grab():
|
||||
return
|
||||
|
||||
self.values[option] = float(value)
|
||||
self.list[option]['scale'].disconnect_by_func(self.set_opt_value)
|
||||
self.list[option]['scale'].set_value(self.values[option])
|
||||
self.list[option]['scale'].connect("button-release-event", self.set_opt_value, option)
|
||||
|
||||
def add_option(self, option, optname, units, value, digits, maxval):
|
||||
logging.info("Adding option: %s" % option)
|
||||
frame = Gtk.Frame()
|
||||
frame.get_style_context().add_class("frame-item")
|
||||
|
||||
name = Gtk.Label()
|
||||
name.set_markup("<big><b>%s</b></big> (%s)" % (optname, units))
|
||||
name.set_hexpand(True)
|
||||
name.set_vexpand(True)
|
||||
name.set_halign(Gtk.Align.START)
|
||||
name.set_valign(Gtk.Align.CENTER)
|
||||
name.set_line_wrap(True)
|
||||
name.set_line_wrap_mode(Pango.WrapMode.WORD_CHAR)
|
||||
|
||||
adj = Gtk.Adjustment(0, 0, value, 1, 5, 0)
|
||||
self.values[option] = value
|
||||
scale = Gtk.Scale(orientation=Gtk.Orientation.HORIZONTAL, adjustment=adj)
|
||||
scale.set_range(0, maxval)
|
||||
scale.set_value(self.values[option])
|
||||
scale.set_digits(digits)
|
||||
scale.set_hexpand(True)
|
||||
scale.set_has_origin(True)
|
||||
scale.get_style_context().add_class("option_slider")
|
||||
scale.connect("button-release-event", self.set_opt_value, option)
|
||||
|
||||
labels = Gtk.Box(orientation=Gtk.Orientation.VERTICAL)
|
||||
labels.add(name)
|
||||
labels.add(scale)
|
||||
|
||||
dev = Gtk.Box(orientation=Gtk.Orientation.HORIZONTAL, spacing=5)
|
||||
dev.set_hexpand(True)
|
||||
dev.set_vexpand(False)
|
||||
dev.add(labels)
|
||||
frame.add(dev)
|
||||
|
||||
self.list[option] = {
|
||||
"row": frame,
|
||||
"scale": scale,
|
||||
}
|
||||
|
||||
pos = sorted(self.list).index(option)
|
||||
self.grid.attach(self.list[option]['row'], 0, pos, 1, 1)
|
||||
self.grid.show_all()
|
||||
|
||||
def set_opt_value(self, widget, event, opt):
|
||||
value = self.list[opt]['scale'].get_value()
|
||||
|
||||
if opt == "retract_speed":
|
||||
self._screen._ws.klippy.gcode_script("SET_RETRACTION RETRACT_SPEED=%s" % (value))
|
||||
elif opt == "retract_length":
|
||||
self._screen._ws.klippy.gcode_script("SET_RETRACTION RETRACT_LENGTH=%s" % (value))
|
||||
elif opt == "unretract_extra_length":
|
||||
self._screen._ws.klippy.gcode_script("SET_RETRACTION UNRETRACT_EXTRA_LENGTH=%s" % (value))
|
||||
elif opt == "unretract_speed":
|
||||
self._screen._ws.klippy.gcode_script("SET_RETRACTION UNRETRACT_SPEED=%s" % (value))
|
||||
@@ -22,7 +22,7 @@ class SplashScreenPanel(ScreenPanel):
|
||||
def initialize(self, panel_name):
|
||||
_ = self.lang.gettext
|
||||
|
||||
image = self._gtk.Image("klipper.svg", None, 3.2, 3.2)
|
||||
image = self._gtk.Image("klipper", 3.2)
|
||||
|
||||
self.labels['text'] = Gtk.Label(_("Initializing printer..."))
|
||||
self.labels['text'].set_line_wrap(True)
|
||||
|
||||
+41
-41
@@ -54,8 +54,8 @@ class TemperaturePanel(ScreenPanel):
|
||||
def create_right_panel(self):
|
||||
_ = self.lang.gettext
|
||||
|
||||
cooldown = self._gtk.ButtonImage('cool-down', _('Cooldown'), "color4", 1, 1, Gtk.PositionType.LEFT, False)
|
||||
adjust = self._gtk.ButtonImage('fine-tune', '', "color3", 1, 1, Gtk.PositionType.LEFT, False)
|
||||
cooldown = self._gtk.ButtonImage('cool-down', _('Cooldown'), "color4", 1, Gtk.PositionType.LEFT, False)
|
||||
adjust = self._gtk.ButtonImage('fine-tune', '', "color3", 1, Gtk.PositionType.LEFT, False)
|
||||
|
||||
right = self._gtk.HomogeneousGrid()
|
||||
right.attach(cooldown, 0, 0, 2, 1)
|
||||
@@ -83,9 +83,10 @@ class TemperaturePanel(ScreenPanel):
|
||||
def preheat(self):
|
||||
self.labels["preheat_grid"] = self._gtk.HomogeneousGrid()
|
||||
for i, option in enumerate(self.preheat_options):
|
||||
self.labels[option] = self._gtk.Button(option, "color%d" % ((i % 4)+1))
|
||||
self.labels[option].connect("clicked", self.set_temperature, option)
|
||||
self.labels['preheat_grid'].attach(self.labels[option], (i % 2), int(i/2), 1, 1)
|
||||
if option != "cooldown":
|
||||
self.labels[option] = self._gtk.Button(option, "color%d" % ((i % 4)+1))
|
||||
self.labels[option].connect("clicked", self.set_temperature, option)
|
||||
self.labels['preheat_grid'].attach(self.labels[option], (i % 2), int(i/2), 1, 1)
|
||||
scroll = Gtk.ScrolledWindow()
|
||||
scroll.set_property("overlay-scrolling", False)
|
||||
scroll.set_hexpand(True)
|
||||
@@ -226,36 +227,35 @@ class TemperaturePanel(ScreenPanel):
|
||||
self._screen._ws.klippy.set_heater_temp(" ".join(heater.split(" ")[1:]), 0)
|
||||
logging.info("Setting %s to %d" % (heater, 0))
|
||||
self._printer.set_dev_stat(heater, "target", 0)
|
||||
return
|
||||
|
||||
for heater in self.active_heaters:
|
||||
MAX_TEMP = int(float(self._printer.get_config_section(heater)['max_temp']))
|
||||
if heater.startswith('extruder'):
|
||||
target = self.preheat_options[setting]["extruder"]
|
||||
if target > 0 and target <= MAX_TEMP:
|
||||
self._screen._ws.klippy.set_tool_temp(self._printer.get_tool_number(heater), target)
|
||||
elif heater.startswith('heater_bed'):
|
||||
target = self.preheat_options[setting]["bed"]
|
||||
if target > 0 and target <= MAX_TEMP:
|
||||
self._screen._ws.klippy.set_bed_temp(target)
|
||||
elif heater.startswith('heater_generic '):
|
||||
target = self.preheat_options[setting]["heater_generic"]
|
||||
if target > 0 and target <= MAX_TEMP:
|
||||
self._screen._ws.klippy.set_heater_temp(" ".join(heater.split(" ")[1:]), target)
|
||||
elif heater.startswith('temperature_fan '):
|
||||
target = self.preheat_options[setting]["temperature_fan"]
|
||||
if target > 0 and target <= MAX_TEMP:
|
||||
self._screen._ws.klippy.set_temp_fan_temp(" ".join(heater.split(" ")[1:]), target)
|
||||
else:
|
||||
logging.info("Unknown heater: %s" % heater)
|
||||
self._screen.show_popup_message(_("Unknown Heater") + " " + heater)
|
||||
if target <= MAX_TEMP:
|
||||
if target > 0:
|
||||
self._printer.set_dev_stat(heater, "target", int(target))
|
||||
logging.info("Setting %s to %d" % (heater, target))
|
||||
else:
|
||||
self._screen.show_popup_message(_("Can't set above the maximum:") + (" %s" % MAX_TEMP))
|
||||
if self.preheat_options[setting]['gcode']:
|
||||
else:
|
||||
for heater in self.active_heaters:
|
||||
MAX_TEMP = int(float(self._printer.get_config_section(heater)['max_temp']))
|
||||
if heater.startswith('extruder'):
|
||||
target = self.preheat_options[setting]["extruder"]
|
||||
if target > 0 and target <= MAX_TEMP:
|
||||
self._screen._ws.klippy.set_tool_temp(self._printer.get_tool_number(heater), target)
|
||||
elif heater.startswith('heater_bed'):
|
||||
target = self.preheat_options[setting]["bed"]
|
||||
if target > 0 and target <= MAX_TEMP:
|
||||
self._screen._ws.klippy.set_bed_temp(target)
|
||||
elif heater.startswith('heater_generic '):
|
||||
target = self.preheat_options[setting]["heater_generic"]
|
||||
if target > 0 and target <= MAX_TEMP:
|
||||
self._screen._ws.klippy.set_heater_temp(" ".join(heater.split(" ")[1:]), target)
|
||||
elif heater.startswith('temperature_fan '):
|
||||
target = self.preheat_options[setting]["temperature_fan"]
|
||||
if target > 0 and target <= MAX_TEMP:
|
||||
self._screen._ws.klippy.set_temp_fan_temp(" ".join(heater.split(" ")[1:]), target)
|
||||
else:
|
||||
logging.info("Unknown heater: %s" % heater)
|
||||
self._screen.show_popup_message(_("Unknown Heater") + " " + heater)
|
||||
if target <= MAX_TEMP:
|
||||
if target > 0:
|
||||
self._printer.set_dev_stat(heater, "target", int(target))
|
||||
logging.info("Setting %s to %d" % (heater, target))
|
||||
else:
|
||||
self._screen.show_popup_message(_("Can't set above the maximum:") + (" %s" % MAX_TEMP))
|
||||
if setting in self.preheat_options and self.preheat_options[setting]['gcode']:
|
||||
# This small delay is needed to properly update the target if the user configured something above
|
||||
# and then changed the target again using the preheat gcode
|
||||
GLib.timeout_add(250, self.preheat_gcode, setting)
|
||||
@@ -297,12 +297,12 @@ class TemperaturePanel(ScreenPanel):
|
||||
class_name = "graph_label_heater_bed"
|
||||
type = "bed"
|
||||
elif device.startswith("heater_generic"):
|
||||
h = 1
|
||||
self.h = 1
|
||||
for d in self.devices:
|
||||
if "heater_generic" in d:
|
||||
h += 1
|
||||
image = "heat-up"
|
||||
class_name = "graph_label_sensor_%s" % h
|
||||
self.h += 1
|
||||
image = "heater"
|
||||
class_name = "graph_label_sensor_%s" % self.h
|
||||
type = "sensor"
|
||||
elif device.startswith("temperature_fan"):
|
||||
f = 1
|
||||
@@ -317,7 +317,7 @@ class TemperaturePanel(ScreenPanel):
|
||||
else:
|
||||
s = 1
|
||||
try:
|
||||
s += h
|
||||
s += self.h
|
||||
except Exception:
|
||||
pass
|
||||
for d in self.devices:
|
||||
@@ -336,7 +336,7 @@ class TemperaturePanel(ScreenPanel):
|
||||
|
||||
text = "<span underline='double' underline_color='#%s'>%s</span>" % (color, devname.capitalize())
|
||||
name = self._gtk.ButtonImage(image, devname.capitalize().replace("_", " "),
|
||||
None, .5, .5, Gtk.PositionType.LEFT, False)
|
||||
None, .5, Gtk.PositionType.LEFT, False)
|
||||
name.connect('clicked', self.on_popover_clicked, device)
|
||||
name.set_alignment(0, .5)
|
||||
name.get_style_context().add_class(class_name)
|
||||
|
||||
+18
-5
@@ -42,9 +42,11 @@ class ZCalibratePanel(ScreenPanel):
|
||||
self.widgets['cancel'] = self._gtk.ButtonImage('cancel', _('Abort'), 'color2')
|
||||
self.widgets['cancel'].connect("clicked", self.abort)
|
||||
|
||||
functions = ["endstop", "probe", "mesh", "delta"]
|
||||
functions = ["endstop", "probe", "mesh", "delta", "delta_manual"]
|
||||
pobox = Gtk.VBox()
|
||||
if not self._screen.printer.get_config_section("stepper_z")['endstop_pin'].startswith("probe"):
|
||||
endstop = (self._printer.config_section_exists("stepper_z") and
|
||||
not self._screen.printer.get_config_section("stepper_z")['endstop_pin'].startswith("probe"))
|
||||
if endstop:
|
||||
endstop = self._gtk.Button(label="Endstop")
|
||||
endstop.connect("clicked", self.start_calibration, "endstop")
|
||||
pobox.pack_start(endstop, True, True, 5)
|
||||
@@ -67,11 +69,19 @@ class ZCalibratePanel(ScreenPanel):
|
||||
functions.remove("mesh")
|
||||
|
||||
if "delta" in self._screen.printer.get_config_section("printer")['kinematics']:
|
||||
delta = self._gtk.Button(label="Delta")
|
||||
delta.connect("clicked", self.start_calibration, "delta")
|
||||
pobox.pack_start(delta, True, True, 5)
|
||||
if (self._printer.config_section_exists("probe") or self._printer.config_section_exists("bltouch")):
|
||||
delta = self._gtk.Button(label="Delta Automatic")
|
||||
delta.connect("clicked", self.start_calibration, "delta")
|
||||
pobox.pack_start(delta, True, True, 5)
|
||||
else:
|
||||
functions.remove("delta")
|
||||
delta_manual = self._gtk.Button(label="Delta Manual")
|
||||
delta_manual.connect("clicked", self.start_calibration, "delta_manual")
|
||||
pobox.pack_start(delta_manual, True, True, 5)
|
||||
else:
|
||||
functions.remove("delta")
|
||||
functions.remove("delta_manual")
|
||||
|
||||
logging.info("Available functions: %s" % functions)
|
||||
|
||||
self.labels['popover'] = Gtk.Popover()
|
||||
@@ -135,6 +145,7 @@ class ZCalibratePanel(ScreenPanel):
|
||||
self.labels['popover'].show_all()
|
||||
|
||||
def start_calibration(self, widget, method):
|
||||
x_position = y_position = 0
|
||||
self.labels['popover'].popdown()
|
||||
if self._screen.printer.get_stat("toolhead", "homed_axes") != "xyz":
|
||||
self._screen._ws.klippy.gcode_script(KlippyGcodes.HOME)
|
||||
@@ -190,6 +201,8 @@ class ZCalibratePanel(ScreenPanel):
|
||||
self._screen._ws.klippy.gcode_script("BED_MESH_CALIBRATE")
|
||||
elif method == "delta":
|
||||
self._screen._ws.klippy.gcode_script("DELTA_CALIBRATE")
|
||||
elif method == "delta_manual":
|
||||
self._screen._ws.klippy.gcode_script("DELTA_CALIBRATE METHOD=manual")
|
||||
elif method == "endstop":
|
||||
self._screen._ws.klippy.gcode_script(KlippyGcodes.Z_ENDSTOP_CALIBRATE)
|
||||
|
||||
|
||||
@@ -45,7 +45,8 @@ PRINTER_BASE_STATUS_OBJECTS = [
|
||||
'print_stats',
|
||||
'toolhead',
|
||||
'virtual_sdcard',
|
||||
'webhooks'
|
||||
'webhooks',
|
||||
'motion_report'
|
||||
]
|
||||
|
||||
klipperscreendir = pathlib.Path(__file__).parent.resolve()
|
||||
@@ -250,14 +251,16 @@ class KlipperScreen(Gtk.Window):
|
||||
"configfile": ["config"],
|
||||
"display_status": ["progress", "message"],
|
||||
"fan": ["speed"],
|
||||
"gcode_move": ["extrude_factor", "gcode_position", "homing_origin", "speed_factor"],
|
||||
"gcode_move": ["extrude_factor", "gcode_position", "homing_origin", "speed_factor", "speed"],
|
||||
"idle_timeout": ["state"],
|
||||
"pause_resume": ["is_paused"],
|
||||
"print_stats": ["print_duration", "total_duration", "filament_used", "filename", "state", "message"],
|
||||
"toolhead": ["homed_axes", "estimated_print_time", "print_time", "position", "extruder",
|
||||
"max_accel", "max_accel_to_decel", "max_velocity", "square_corner_velocity"],
|
||||
"virtual_sdcard": ["file_position", "is_active", "progress"],
|
||||
"webhooks": ["state", "state_message"]
|
||||
"webhooks": ["state", "state_message"],
|
||||
"firmware_retraction": ["retract_length", "retract_speed", "unretract_extra_length", "unretract_speed"],
|
||||
"motion_report": ["live_position", "live_velocity", "live_extruder_velocity"]
|
||||
}
|
||||
}
|
||||
for extruder in self.printer.get_tools():
|
||||
@@ -437,17 +440,21 @@ class KlipperScreen(Gtk.Window):
|
||||
def init_style(self):
|
||||
style_provider = Gtk.CssProvider()
|
||||
css = open(os.path.join(klipperscreendir, "styles", "base.css"))
|
||||
css_base_data = css.read()
|
||||
css_data = css.read()
|
||||
css.close()
|
||||
css = open(os.path.join(klipperscreendir, "styles", self.theme, "style.css"))
|
||||
css_data = css_base_data + css.read()
|
||||
css.close()
|
||||
|
||||
f = open(os.path.join(klipperscreendir, "styles", "base.conf"))
|
||||
style_options = json.load(f)
|
||||
f.close()
|
||||
|
||||
theme_style_conf = os.path.join(klipperscreendir, "styles", self.theme, "style.conf")
|
||||
# Load custom theme
|
||||
theme = os.path.join(klipperscreendir, "styles", self.theme)
|
||||
theme_style = os.path.join(theme, "style.css")
|
||||
theme_style_conf = os.path.join(theme, "style.conf")
|
||||
|
||||
if os.path.exists(theme_style):
|
||||
css = open(theme_style)
|
||||
css_data += css.read()
|
||||
css.close()
|
||||
if os.path.exists(theme_style_conf):
|
||||
try:
|
||||
f = open(theme_style_conf)
|
||||
@@ -768,7 +775,7 @@ class KlipperScreen(Gtk.Window):
|
||||
if prev_state not in ['paused', 'printing']:
|
||||
self.init_printer()
|
||||
self.base_panel._printer = self.printer
|
||||
self.base_panel.show_heaters()
|
||||
self.base_panel.show_heaters(True)
|
||||
|
||||
self.printer_ready()
|
||||
|
||||
@@ -880,10 +887,10 @@ class KlipperScreen(Gtk.Window):
|
||||
self._ws.send_method(method, params)
|
||||
|
||||
def printer_initializing(self, text=None, disconnect=False):
|
||||
self.shutdown = True
|
||||
self.close_popup_message()
|
||||
self.show_panel('splash_screen', "splash_screen", "Splash Screen", 2)
|
||||
if disconnect is True and self.printer is not None:
|
||||
self.shutdown = True
|
||||
self.printer.state = "disconnected"
|
||||
if text is not None:
|
||||
self.panels['splash_screen'].update_text(text)
|
||||
@@ -1007,6 +1014,7 @@ class KlipperScreen(Gtk.Window):
|
||||
def printer_printing(self):
|
||||
self.close_popup_message()
|
||||
self.show_panel('job_status', "job_status", "Print Status", 2)
|
||||
self.base_panel.show_heaters(True)
|
||||
|
||||
def show_keyboard(self, widget=None):
|
||||
if self.keyboard is not None:
|
||||
|
||||
@@ -4,10 +4,13 @@ SCRIPTPATH="$( cd "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )"
|
||||
KSPATH=$(sed 's/\/scripts//g' <<< $SCRIPTPATH)
|
||||
KSENV="${HOME}/.KlipperScreen-env"
|
||||
|
||||
PKGLIST="xserver-xorg-video-fbturbo xdotool xinit xinput x11-xserver-utils libopenjp2-7 python3-distutils"
|
||||
PKGLIST="${PKGLIST} python3-virtualenv virtualenv matchbox-keyboard wireless-tools"
|
||||
PKGLIST="${PKGLIST} libatlas-base-dev fonts-freefont-ttf"
|
||||
PKGLIST="${PKGLIST} libgirepository1.0-dev gcc libcairo2-dev pkg-config python3-dev gir1.2-gtk-3.0"
|
||||
XSERVER="xinit xinput x11-xserver-utils xdotool"
|
||||
FBTURBO="xserver-xorg-video-fbturbo"
|
||||
FBDEV="xserver-xorg-video-fbdev"
|
||||
PYTHON="python3-virtualenv virtualenv python3-distutils"
|
||||
PYGOBJECT="libgirepository1.0-dev gcc libcairo2-dev pkg-config python3-dev gir1.2-gtk-3.0"
|
||||
MISC="libopenjp2-7 libatlas-base-dev fonts-freefont-ttf matchbox-keyboard wireless-tools"
|
||||
OPTIONAL="xserver-xorg-legacy"
|
||||
|
||||
Red='\033[0;31m'
|
||||
Green='\033[0;32m'
|
||||
@@ -49,7 +52,49 @@ install_packages()
|
||||
fi
|
||||
|
||||
echo_text "Installing KlipperScreen dependencies"
|
||||
sudo apt-get install -y $PKGLIST
|
||||
sudo apt-get install -y $XSERVER
|
||||
if [ $? -eq 0 ]; then
|
||||
echo_ok "Installed X"
|
||||
else
|
||||
echo_error "Installation of X-server dependencies failed ($XSERVER)"
|
||||
exit 1
|
||||
fi
|
||||
sudo apt-get install -y $OPTIONAL
|
||||
sudo apt-get install -y $FBTURBO
|
||||
if [ $? -eq 0 ]; then
|
||||
echo_ok "Installed FBturbo driver"
|
||||
else
|
||||
echo $_
|
||||
echo_error "Installation of $FBTURBO failed, trying $FBDEV"
|
||||
sudo apt-get install -y $FBDEV
|
||||
if [ $? -eq 0 ]; then
|
||||
echo_ok "Installed FBdev"
|
||||
else
|
||||
echo_error "Installation of FBdev failed ($FBDEV)"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
sudo apt-get install -y $PYTHON
|
||||
if [ $? -eq 0 ]; then
|
||||
echo_ok "Installed Python dependincies"
|
||||
else
|
||||
echo_error "Installation of Python dependincies failed ($PYTHON)"
|
||||
exit 1
|
||||
fi
|
||||
sudo apt-get install -y $PYGOBJECT
|
||||
if [ $? -eq 0 ]; then
|
||||
echo_ok "Installed PyGobject dependincies"
|
||||
else
|
||||
echo_error "Installation of PyGobject dependincies failed ($PYGOBJECT)"
|
||||
exit 1
|
||||
fi
|
||||
sudo apt-get install -y $MISC
|
||||
if [ $? -eq 0 ]; then
|
||||
echo_ok "Installed Misc packages"
|
||||
else
|
||||
echo_error "Installation of Misc packages failed ($MISC)"
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
create_virtualenv()
|
||||
@@ -65,12 +110,12 @@ create_virtualenv()
|
||||
|
||||
source ${KSENV}/bin/activate
|
||||
while read requirements; do
|
||||
pip install $requirements
|
||||
pip --disable-pip-version-check install $requirements
|
||||
if [ $? -gt 0 ]; then
|
||||
echo "Error: pip install exited with status code $?"
|
||||
echo "Unable to install dependencies, aborting install."
|
||||
deactivate
|
||||
exit
|
||||
exit 1
|
||||
fi
|
||||
done < ${KSPATH}/scripts/KlipperScreen-requirements.txt
|
||||
deactivate
|
||||
@@ -125,7 +170,7 @@ start_KlipperScreen()
|
||||
}
|
||||
if [ "$EUID" == 0 ]
|
||||
then echo_error "Plaease do not run this script as root"
|
||||
exit
|
||||
exit 1
|
||||
fi
|
||||
install_packages
|
||||
create_virtualenv
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
numpy==1.21.5
|
||||
numpy==1.21.4
|
||||
jinja2==3.1.1
|
||||
matplotlib==3.5.0
|
||||
netifaces==0.11.0
|
||||
|
||||
+12
-9
@@ -54,6 +54,10 @@ button.color4 {
|
||||
min-height: 3em;
|
||||
}
|
||||
|
||||
button.status {
|
||||
background-color: #13181C;
|
||||
}
|
||||
|
||||
button.active {
|
||||
background-color: #20303D;
|
||||
}
|
||||
@@ -354,16 +358,15 @@ trough {
|
||||
}
|
||||
|
||||
.printing-info {
|
||||
font-size: 1.2em;
|
||||
margin-left: .25em;
|
||||
margin-right: .25em;
|
||||
}
|
||||
.printing-info button {
|
||||
background-color: rgba(0, 0, 0, 0.1);
|
||||
border-radius: .5em;
|
||||
}
|
||||
|
||||
.printing-info-box {
|
||||
padding-left: .25em;
|
||||
}
|
||||
|
||||
.printing-info-box box {
|
||||
margin-bottom: .25em;
|
||||
.printing-info-secondary label {
|
||||
margin-left: .75em;
|
||||
}
|
||||
|
||||
.printing-status {
|
||||
@@ -377,7 +380,7 @@ trough {
|
||||
}
|
||||
|
||||
.printing-progress-text {
|
||||
font-size: 1.5em;
|
||||
font-size: 1.25em;
|
||||
font-weight: bold;
|
||||
color: white;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,160 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
version="1.1"
|
||||
width="24"
|
||||
height="24"
|
||||
viewBox="0 0 24 24"
|
||||
id="svg4"
|
||||
sodipodi:docname="heater.svg"
|
||||
inkscape:version="1.1.2 (0a00cf5339, 2022-02-04, custom)"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:svg="http://www.w3.org/2000/svg">
|
||||
<defs
|
||||
id="defs8">
|
||||
<linearGradient
|
||||
id="linearGradient11869">
|
||||
<stop
|
||||
style="stop-color:#dc322f;stop-opacity:1"
|
||||
offset="0"
|
||||
id="stop11861" />
|
||||
<stop
|
||||
style="stop-color:#cc4a17;stop-opacity:1"
|
||||
offset="0.5"
|
||||
id="stop11863" />
|
||||
<stop
|
||||
style="stop-color:#c65a11;stop-opacity:1"
|
||||
offset="0.75"
|
||||
id="stop11865" />
|
||||
<stop
|
||||
style="stop-color:#cc4f1a;stop-opacity:1"
|
||||
offset="1"
|
||||
id="stop11867" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
id="linearGradient10815">
|
||||
<stop
|
||||
style="stop-color:#dc322f;stop-opacity:1"
|
||||
offset="0"
|
||||
id="stop10976" />
|
||||
<stop
|
||||
style="stop-color:#cb4b16;stop-opacity:0.49803922"
|
||||
offset="0.5"
|
||||
id="stop10978" />
|
||||
<stop
|
||||
style="stop-color:#b58900;stop-opacity:0.24705882"
|
||||
offset="0.75"
|
||||
id="stop10980" />
|
||||
<stop
|
||||
style="stop-color:#ffffff;stop-opacity:0;"
|
||||
offset="1"
|
||||
id="stop10982" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
id="linearGradient10815-0">
|
||||
<stop
|
||||
style="stop-color:#dc322f;stop-opacity:1"
|
||||
offset="0"
|
||||
id="stop10807" />
|
||||
<stop
|
||||
style="stop-color:#cb4b16;stop-opacity:0.49803922"
|
||||
offset="0.5"
|
||||
id="stop10809" />
|
||||
<stop
|
||||
style="stop-color:#b58900;stop-opacity:0.24705882"
|
||||
offset="0.75"
|
||||
id="stop10811" />
|
||||
<stop
|
||||
style="stop-color:#ffffff;stop-opacity:0;"
|
||||
offset="1"
|
||||
id="stop10813" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
xlink:href="#linearGradient955"
|
||||
id="linearGradient858"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
x1="51"
|
||||
y1="40"
|
||||
x2="50.862003"
|
||||
y2="5.8426123"
|
||||
gradientTransform="translate(-17.440011,-17.717467)" />
|
||||
<linearGradient
|
||||
id="linearGradient955">
|
||||
<stop
|
||||
style="stop-color:#dc322f;stop-opacity:1"
|
||||
offset="0"
|
||||
id="stop959" />
|
||||
<stop
|
||||
style="stop-color:#cb4b16;stop-opacity:0.49803922"
|
||||
offset="0.5"
|
||||
id="stop964" />
|
||||
<stop
|
||||
style="stop-color:#b58900;stop-opacity:0.24705882"
|
||||
offset="0.75"
|
||||
id="stop966" />
|
||||
<stop
|
||||
style="stop-color:#ffffff;stop-opacity:0;"
|
||||
offset="1"
|
||||
id="stop961" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient11869"
|
||||
id="linearGradient23766"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
x1="22.234701"
|
||||
y1="-2.0497832"
|
||||
x2="22.32369"
|
||||
y2="-24.29283" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient11869"
|
||||
id="linearGradient52625"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
x1="22.234701"
|
||||
y1="-2.0497832"
|
||||
x2="22.32369"
|
||||
y2="-24.29283"
|
||||
gradientTransform="translate(-29.396505,4.4638806)" />
|
||||
</defs>
|
||||
<sodipodi:namedview
|
||||
id="namedview6"
|
||||
pagecolor="#505050"
|
||||
bordercolor="#eeeeee"
|
||||
borderopacity="1"
|
||||
inkscape:pageshadow="0"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pagecheckerboard="0"
|
||||
showgrid="false"
|
||||
inkscape:zoom="9.2807765"
|
||||
inkscape:cx="20.095301"
|
||||
inkscape:cy="18.101934"
|
||||
inkscape:window-width="1600"
|
||||
inkscape:window-height="826"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="0"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="g9896-8-2" />
|
||||
<g
|
||||
id="g9896-8-2"
|
||||
transform="translate(-9.9548858,25.191409)"
|
||||
style="fill:url(#linearGradient23766);fill-opacity:1">
|
||||
<path
|
||||
style="fill:#b58900;fill-opacity:1;stroke:none;stroke-width:1.13193px;stroke-linecap:square;stroke-linejoin:miter;stroke-opacity:1"
|
||||
d="m 15.69011,-17.263086 c -4.487409,11.9654156 -0.139808,15.1120916 7.544051,15.1730386 7.035044,-0.13069 7.514856,-6.2599622 6.248739,-8.1545626 -1.266117,-1.8946 -4.44543,-5.619714 -3.604206,-10.643828 -0.01115,-0.0836 -1.640743,1.661933 -2.319128,5.289429 -1.880183,-1.235083 -2.330164,-4.351196 -1.235747,-8.693878 -2.833889,2.722088 -5.343487,6.296638 -3.767371,13.238197 -1.870903,-1.776468 -2.466748,-3.103138 -2.866338,-6.208396 z"
|
||||
id="path52470-7-3"
|
||||
sodipodi:nodetypes="cczccccc" />
|
||||
<path
|
||||
id="path52470"
|
||||
style="fill:#cb4b16;fill-opacity:1;stroke:none;stroke-width:1.13193px;stroke-linecap:square;stroke-linejoin:miter;stroke-opacity:1"
|
||||
d="M 12.369141 0.8984375 C 9.5352516 3.6205255 7.0254465 7.1951598 8.6015625 14.136719 C 6.7306595 12.360251 6.133965 11.032992 5.734375 7.9277344 C 2.1108644 17.589615 4.2511435 21.499524 9.2539062 22.679688 C 8.3996528 21.663235 6.8337462 19.278951 8.7070312 16.720703 C 8.8633072 17.793829 8.2338216 19.287219 10.416016 19.5 C 11.635509 19.274169 10.428073 16.860088 12.517578 12.847656 C 11.516847 15.884583 13.244872 16.381157 13.417969 20.189453 C 14.465654 20.282155 15.661704 17.944526 15.449219 16.148438 C 17.318957 19.101322 15.690304 21.066932 14.587891 22.998047 C 20.368873 22.177487 20.709817 16.716702 19.527344 14.947266 C 18.261227 13.052666 15.082604 9.3268484 15.923828 4.3027344 C 15.912678 4.2191344 14.283854 5.9643009 13.605469 9.5917969 C 11.725286 8.3567139 11.274724 5.2411195 12.369141 0.8984375 z "
|
||||
transform="translate(9.9548858,-25.191409)" />
|
||||
<path
|
||||
style="fill:url(#linearGradient52625);fill-opacity:1;stroke:none;stroke-width:1.13193px;stroke-linecap:square;stroke-linejoin:miter;stroke-opacity:1"
|
||||
d="m -13.706523,-12.799147 c -4.487409,11.96541524 -0.139808,15.1120912 7.5440508,15.1730382 7.03504397,-0.13069 7.514856,-6.2599622 6.24873897,-8.1545626 -1.26611697,-1.8946 -4.44542997,-5.6197136 -3.60420597,-10.6438276 -0.01115,-0.0836 -1.640743,1.661933 -2.319128,5.289429 -1.880183,-1.235083 -2.330164,-4.351196 -1.235747,-8.693878 -2.833889,2.722088 -5.3434868,6.296638 -3.7673708,13.2381966 -1.870903,-1.776468 -2.466748,-3.103138 -2.866338,-6.2083956 z"
|
||||
id="path52470-7"
|
||||
sodipodi:nodetypes="cczccccc" />
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 6.4 KiB |
@@ -0,0 +1,38 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
version="1.1"
|
||||
width="24"
|
||||
height="24"
|
||||
viewBox="0 0 24 24"
|
||||
id="svg4"
|
||||
sodipodi:docname="heater.svg"
|
||||
inkscape:version="1.1.2 (0a00cf5339, 2022-02-04, custom)"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:svg="http://www.w3.org/2000/svg">
|
||||
<defs
|
||||
id="defs8" />
|
||||
<sodipodi:namedview
|
||||
id="namedview6"
|
||||
pagecolor="#505050"
|
||||
bordercolor="#eeeeee"
|
||||
borderopacity="1"
|
||||
inkscape:pageshadow="0"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pagecheckerboard="0"
|
||||
showgrid="false"
|
||||
inkscape:zoom="26.25"
|
||||
inkscape:cx="12.019048"
|
||||
inkscape:cy="12"
|
||||
inkscape:window-width="1600"
|
||||
inkscape:window-height="826"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="0"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="svg4" />
|
||||
<path
|
||||
d="M17.66 11.2C17.43 10.9 17.15 10.64 16.89 10.38C16.22 9.78 15.46 9.35 14.82 8.72C13.33 7.26 13 4.85 13.95 3C13 3.23 12.17 3.75 11.46 4.32C8.87 6.4 7.85 10.07 9.07 13.22C9.11 13.32 9.15 13.42 9.15 13.55C9.15 13.77 9 13.97 8.8 14.05C8.57 14.15 8.33 14.09 8.14 13.93C8.08 13.88 8.04 13.83 8 13.76C6.87 12.33 6.69 10.28 7.45 8.64C5.78 10 4.87 12.3 5 14.47C5.06 14.97 5.12 15.47 5.29 15.97C5.43 16.57 5.7 17.17 6 17.7C7.08 19.43 8.95 20.67 10.96 20.92C13.1 21.19 15.39 20.8 17.03 19.32C18.86 17.66 19.5 15 18.56 12.72L18.43 12.46C18.22 12 17.66 11.2 17.66 11.2M14.5 17.5C14.22 17.74 13.76 18 13.4 18.1C12.28 18.5 11.16 17.94 10.5 17.28C11.69 17 12.4 16.12 12.61 15.23C12.78 14.43 12.46 13.77 12.33 13C12.21 12.26 12.23 11.63 12.5 10.94C12.69 11.32 12.89 11.7 13.13 12C13.9 13 15.11 13.44 15.37 14.8C15.41 14.94 15.43 15.08 15.43 15.23C15.46 16.05 15.1 16.95 14.5 17.5H14.5Z"
|
||||
id="path2"
|
||||
style="fill:#e2e2e2;fill-opacity:1" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.9 KiB |
@@ -0,0 +1,38 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
version="1.1"
|
||||
width="24"
|
||||
height="24"
|
||||
viewBox="0 0 24 24"
|
||||
id="svg4"
|
||||
sodipodi:docname="heater.svg"
|
||||
inkscape:version="1.1.2 (0a00cf5339, 2022-02-04, custom)"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:svg="http://www.w3.org/2000/svg">
|
||||
<defs
|
||||
id="defs8" />
|
||||
<sodipodi:namedview
|
||||
id="namedview6"
|
||||
pagecolor="#505050"
|
||||
bordercolor="#eeeeee"
|
||||
borderopacity="1"
|
||||
inkscape:pageshadow="0"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pagecheckerboard="0"
|
||||
showgrid="false"
|
||||
inkscape:zoom="26.25"
|
||||
inkscape:cx="12.019048"
|
||||
inkscape:cy="12"
|
||||
inkscape:window-width="1600"
|
||||
inkscape:window-height="826"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="0"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="svg4" />
|
||||
<path
|
||||
d="M17.66 11.2C17.43 10.9 17.15 10.64 16.89 10.38C16.22 9.78 15.46 9.35 14.82 8.72C13.33 7.26 13 4.85 13.95 3C13 3.23 12.17 3.75 11.46 4.32C8.87 6.4 7.85 10.07 9.07 13.22C9.11 13.32 9.15 13.42 9.15 13.55C9.15 13.77 9 13.97 8.8 14.05C8.57 14.15 8.33 14.09 8.14 13.93C8.08 13.88 8.04 13.83 8 13.76C6.87 12.33 6.69 10.28 7.45 8.64C5.78 10 4.87 12.3 5 14.47C5.06 14.97 5.12 15.47 5.29 15.97C5.43 16.57 5.7 17.17 6 17.7C7.08 19.43 8.95 20.67 10.96 20.92C13.1 21.19 15.39 20.8 17.03 19.32C18.86 17.66 19.5 15 18.56 12.72L18.43 12.46C18.22 12 17.66 11.2 17.66 11.2M14.5 17.5C14.22 17.74 13.76 18 13.4 18.1C12.28 18.5 11.16 17.94 10.5 17.28C11.69 17 12.4 16.12 12.61 15.23C12.78 14.43 12.46 13.77 12.33 13C12.21 12.26 12.23 11.63 12.5 10.94C12.69 11.32 12.89 11.7 13.13 12C13.9 13 15.11 13.44 15.37 14.8C15.41 14.94 15.43 15.08 15.43 15.23C15.46 16.05 15.1 16.95 14.5 17.5H14.5Z"
|
||||
id="path2"
|
||||
style="fill:#e2e2e2;fill-opacity:1" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.9 KiB |
@@ -0,0 +1 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="24" height="24" viewBox="0 0 24 24"><path d="M17.66 11.2C17.43 10.9 17.15 10.64 16.89 10.38C16.22 9.78 15.46 9.35 14.82 8.72C13.33 7.26 13 4.85 13.95 3C13 3.23 12.17 3.75 11.46 4.32C8.87 6.4 7.85 10.07 9.07 13.22C9.11 13.32 9.15 13.42 9.15 13.55C9.15 13.77 9 13.97 8.8 14.05C8.57 14.15 8.33 14.09 8.14 13.93C8.08 13.88 8.04 13.83 8 13.76C6.87 12.33 6.69 10.28 7.45 8.64C5.78 10 4.87 12.3 5 14.47C5.06 14.97 5.12 15.47 5.29 15.97C5.43 16.57 5.7 17.17 6 17.7C7.08 19.43 8.95 20.67 10.96 20.92C13.1 21.19 15.39 20.8 17.03 19.32C18.86 17.66 19.5 15 18.56 12.72L18.43 12.46C18.22 12 17.66 11.2 17.66 11.2M14.5 17.5C14.22 17.74 13.76 18 13.4 18.1C12.28 18.5 11.16 17.94 10.5 17.28C11.69 17 12.4 16.12 12.61 15.23C12.78 14.43 12.46 13.77 12.33 13C12.21 12.26 12.23 11.63 12.5 10.94C12.69 11.32 12.89 11.7 13.13 12C13.9 13 15.11 13.44 15.37 14.8C15.41 14.94 15.43 15.08 15.43 15.23C15.46 16.05 15.1 16.95 14.5 17.5H14.5Z" /></svg>
|
||||
|
After Width: | Height: | Size: 1.1 KiB |
@@ -0,0 +1,84 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
width="64"
|
||||
height="64"
|
||||
viewBox="0 0 64 64"
|
||||
version="1.1"
|
||||
id="svg10"
|
||||
sodipodi:docname="heater.svg"
|
||||
inkscape:version="1.1.2 (0a00cf5339, 2022-02-04, custom)"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/">
|
||||
<metadata
|
||||
id="metadata16">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title>folder</dc:title>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<defs
|
||||
id="defs14">
|
||||
<linearGradient
|
||||
id="linearGradient11869">
|
||||
<stop
|
||||
style="stop-color:#dc322f;stop-opacity:1"
|
||||
offset="0"
|
||||
id="stop11861" />
|
||||
<stop
|
||||
style="stop-color:#cc4a17;stop-opacity:1"
|
||||
offset="0.5"
|
||||
id="stop11863" />
|
||||
<stop
|
||||
style="stop-color:#c65a11;stop-opacity:1"
|
||||
offset="0.75"
|
||||
id="stop11865" />
|
||||
<stop
|
||||
style="stop-color:#cc4f1a;stop-opacity:1"
|
||||
offset="1"
|
||||
id="stop11867" />
|
||||
</linearGradient>
|
||||
</defs>
|
||||
<sodipodi:namedview
|
||||
pagecolor="#bfbfbf"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1"
|
||||
objecttolerance="10"
|
||||
gridtolerance="10"
|
||||
guidetolerance="10"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:window-width="1600"
|
||||
inkscape:window-height="826"
|
||||
id="namedview12"
|
||||
showgrid="false"
|
||||
inkscape:pagecheckerboard="false"
|
||||
inkscape:zoom="5.413793"
|
||||
inkscape:cx="36.296179"
|
||||
inkscape:cy="43.777071"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="0"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="svg10"
|
||||
inkscape:snap-bbox="true"
|
||||
inkscape:snap-bbox-edge-midpoints="true"
|
||||
inkscape:document-rotation="0" />
|
||||
<!-- Generator: Sketch 52.5 (67469) - http://www.bohemiancoding.com/sketch -->
|
||||
<title
|
||||
id="title2">folder</title>
|
||||
<desc
|
||||
id="desc4">Created with Sketch.</desc>
|
||||
<path
|
||||
id="path52470"
|
||||
style="font-variation-settings:normal;opacity:1;vector-effect:none;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:3;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;-inkscape-stroke:none;stop-color:#000000;stop-opacity:1"
|
||||
d="M 32.951247,2.9998603 C 25.51376,10.143927 18.926825,19.525488 23.063308,37.743476 18.153162,33.08117 16.587148,29.597804 15.538431,21.448114 6.0285967,46.805535 11.645718,57.067011 24.775373,60.164331 22.533402,57.496671 18.423709,51.239164 23.34011,44.525092 c 0.410143,2.816398 -1.241928,6.735772 4.485198,7.294211 3.200536,-0.592689 0.03165,-6.928398 5.515509,-17.458948 -2.626399,7.970356 1.908769,9.273605 2.363059,19.268404 2.749629,0.24329 5.888639,-5.891767 5.330976,-10.605566 4.907091,7.749787 0.632723,12.908488 -2.260539,17.976668 15.172074,-2.15354 16.066874,-16.48527 12.963494,-21.12912 -3.322894,-4.972342 -11.665129,-14.750679 -9.457353,-27.936369 -0.02926,-0.219407 -4.30408,4.36075 -6.084488,13.881044 C 31.261462,22.573964 30.07897,14.397145 32.951247,2.9998603 Z" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 3.4 KiB |
Reference in new issue
Block a user