Skip to content

Commit 6c92130

Browse files
committed
✨ Detect Creality firmware with broken temp reports
1 parent f4cd214 commit 6c92130

2 files changed

Lines changed: 38 additions & 5 deletions

File tree

README.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,17 @@ and `firmware-broken` for firmware known to have a broken implementation of the
4141
### Unsafe firmware
4242

4343
Please refer to the [entry on the "unsafe firmware" warning in OctoPrint's FAQ](https://faq.octoprint.org/warning-firmware-unsafe)
44-
for a list of currently identified printers.
44+
for a list of currently known to be affected printers.
4545

4646
### Broken firmware
4747

4848
#### "CBD" firmware
4949

5050
Please refer to the [entry on the "broken CBD firmware" warning in OctoPrint's FAQ](https://faq.octoprint.org/warning-firmware-broken-cbd)
51-
for a list of currently identified printers.
51+
for a list of currently known to be affected printers.
52+
53+
#### Creality firmware with broken temperature reporting
54+
55+
Please refer to the [entry on the this warning in OctoPrint's FAQ](https://faq.octoprint.org/warning-firmware-broken-creality-temp)
56+
for variants of this and a list of currently known to be affected printers.
57+

octoprint_firmware_check/checks/firmware_broken.py

Lines changed: 30 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@
1010
class FirmwareBrokenChecks(object):
1111
@classmethod
1212
def as_dict(cls):
13-
return dict(checks=(CbdCheck(), ZwlfCheck()),
13+
return dict(checks=(CbdCheck(), ZwlfCheck(), CrealityDoubleTempCheck(), CrealityEqualsTempCheck()),
1414
message=gettext("Your printer's firmware is known to have a broken implementation of the "
15-
"communication protocol. This will cause print failures. You'll need to "
16-
"take additional steps for OctoPrint to work with it."),
15+
"communication protocol. This may cause print failures or other annoyances. "
16+
"You'll need to take additional steps for OctoPrint to fully work with it."),
1717
severity=Severity.INFO)
1818

1919

@@ -29,3 +29,30 @@ def _is_match(self, line):
2929
class ZwlfCheck(CbdCheck):
3030
name = "zwlf"
3131
FRAGMENT = "ZWLF make it".lower()
32+
33+
34+
class CrealityDoubleTempCheck(LineCheck):
35+
name = "creality_double_temp"
36+
url = "https://faq.octoprint.org/warning-firmware-broken-creality-double-temp"
37+
38+
def m115(self, name, data):
39+
# we cannot stop scanning after an M115 report as we might not yet have seen a temperature report then
40+
pass
41+
42+
def _is_match(self, line):
43+
# broken report: TT::27.9327.93 //0.000.00 BB::39.6739.67 //0.000.00 @@::00 BB@@::00
44+
return "TT::" in line
45+
46+
def _is_ruled_out(self, line):
47+
# first thing that looks like a proper report stops scanning
48+
return ' T:' in line or line.startswith('T:') or ' T0:' in line or line.startswith('T0:') \
49+
or ((' B:' in line or line.startswith('B:')) and not 'A:' in line)
50+
51+
52+
class CrealityEqualsTempCheck(CrealityDoubleTempCheck):
53+
name = "creality_equals_temp"
54+
url = "https://faq.octoprint.org/warning-firmware-broken-creality-equals-temp"
55+
56+
def _is_match(self, line):
57+
# broken report: ==T:145.66 /210.00 ==B:60.15 /60.00 @:127 B@:0
58+
return "==T:" in line

0 commit comments

Comments
 (0)