From 1df3cf0defe50818b7c06b0293044e86858c17a7 Mon Sep 17 00:00:00 2001 From: arcan1s Date: Mon, 31 Mar 2014 20:41:00 +0400 Subject: [PATCH] added support of several device in hddtemp --- sources/ptm/contents/code/dataengine.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/sources/ptm/contents/code/dataengine.py b/sources/ptm/contents/code/dataengine.py index 059af0f..a9276a7 100644 --- a/sources/ptm/contents/code/dataengine.py +++ b/sources/ptm/contents/code/dataengine.py @@ -260,10 +260,13 @@ class DataEngine: text = self.parent.formatLine.split('$LINE')[0] + line + self.parent.formatLine.split('$LINE')[1] self.parent.label_gputemp.setText(text) elif (sourceName == "hddtemp"): - value = str(data[QString(self.parent.hddtempFormat.split('@@')[1])]) - hddtempText = "%4s" % (value) + hddtempText = [] + for device in self.parent.hddtempFormat.split('@@')[1].split(';'): + if (len(device) > 0): + value = str(data[QString(device)]) + hddtempText.append("%4s" % (value)) if (self.parent.hddtempFormat.split('@@')[0] != self.parent.hddtempFormat): - line = self.parent.hddtempFormat.split('@@')[0] + hddtempText + self.parent.hddtempFormat.split('@@')[2] + line = self.parent.hddtempFormat.split('@@')[0] + ' '.join(hddtempText) + self.parent.hddtempFormat.split('@@')[2] else: line = self.parent.hddtempFormat text = self.parent.formatLine.split('$LINE')[0] + line + self.parent.formatLine.split('$LINE')[1]