1
1
# coding=utf-8
2
+ # All code, with the only exception being formalities and formatting, is made by community member b-morgan,
3
+ # because of the issue discussed in this thread;
4
+ # https://community.octoprint.org/t/temperature-reporting-now-working-with-new-ender-3-v2/21053
5
+ # Distributed with his accept, due to testing limitations
2
6
7
+ from __future__ import absolute_import , unicode_literals
3
8
import octoprint .plugin
4
9
import re
5
10
@@ -20,7 +25,7 @@ def check_for_temp_report(self, comm_instance, line, *args, **kwargs):
20
25
self ._logger .debug ("Original: %s" % line )
21
26
m = self .parse_Ender3V2Temp .search (line )
22
27
new_line = (" T:%s.%s /%s.%s B:%s.%s /%s.%s" % (
23
- m .group (1 ), m .group (2 ), m .group (3 ), m .group (4 ), m .group (5 ), m .group (6 ), m .group (7 ), m .group (8 )))
28
+ m .group (1 ), m .group (2 ), m .group (3 ), m .group (4 ), m .group (5 ), m .group (6 ), m .group (7 ), m .group (8 )))
24
29
self ._logger .debug ("Modified: %s" % new_line )
25
30
return new_line
26
31
@@ -29,6 +34,21 @@ def TempReport(self, comm_instance, parsed_temperatures, *args, **kwargs):
29
34
# self._logger.debug("After: %s" % parsed_temperatures)
30
35
return parsed_temperatures
31
36
37
+ def get_update_information (self , * args , ** kwargs ):
38
+ return dict (
39
+ updateplugindemo = dict (
40
+ displayName = self ._plugin_name ,
41
+ displayVersion = self ._plugin_version ,
42
+
43
+ type = "github_release" ,
44
+ current = self ._plugin_version ,
45
+ user = "SimplyPrint" ,
46
+ repo = "OctoPrint-Ender3V2TempFix" ,
47
+
48
+ pip = "https://github.com/SimplyPrint/OctoPrint-Ender3V2TempFix/archive/master.zip"
49
+ )
50
+ )
51
+
32
52
33
53
__plugin_pythoncompat__ = ">=2.7,<4"
34
54
@@ -40,5 +60,6 @@ def __plugin_load__():
40
60
global __plugin_hooks__
41
61
__plugin_hooks__ = {
42
62
"octoprint.comm.protocol.temperatures.received" : __plugin_implementation__ .TempReport ,
43
- "octoprint.comm.protocol.gcode.received" : __plugin_implementation__ .check_for_temp_report
63
+ "octoprint.comm.protocol.gcode.received" : __plugin_implementation__ .check_for_temp_report ,
64
+ "octoprint.plugin.softwareupdate.check_config" : __plugin_implementation__ .get_update_information
44
65
}
0 commit comments