added support of several device in hddtemp

This commit is contained in:
arcan1s 2014-03-31 20:41:00 +04:00
parent 59ffe456de
commit 1df3cf0def

View File

@ -260,10 +260,13 @@ class DataEngine:
text = self.parent.formatLine.split('$LINE')[0] + line + self.parent.formatLine.split('$LINE')[1] text = self.parent.formatLine.split('$LINE')[0] + line + self.parent.formatLine.split('$LINE')[1]
self.parent.label_gputemp.setText(text) self.parent.label_gputemp.setText(text)
elif (sourceName == "hddtemp"): elif (sourceName == "hddtemp"):
value = str(data[QString(self.parent.hddtempFormat.split('@@')[1])]) hddtempText = []
hddtempText = "%4s" % (value) 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): 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: else:
line = self.parent.hddtempFormat line = self.parent.hddtempFormat
text = self.parent.formatLine.split('$LINE')[0] + line + self.parent.formatLine.split('$LINE')[1] text = self.parent.formatLine.split('$LINE')[0] + line + self.parent.formatLine.split('$LINE')[1]