Rev 644 | Rev 646 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 644 | Rev 645 | ||
---|---|---|---|
Line 500... | Line 500... | ||
500 | # ----------- |
500 | # ----------- |
Line 501... | Line 501... | ||
501 | 501 | ||
502 | 502 | ||
- | 503 | def onNewTest(self, test): |
|
- | 504 | index = self.TestListCtrl.InsertStringItem(sys.maxint, test.descr) |
|
- | 505 | self._fillRowInTestList(index, test) |
|
- | 506 | self.TestListCtrl.Select(index) |
|
- | 507 | ||
503 | def onNewTest(self, test): |
508 | def _fillRowInTestList(self, index, test): |
504 | index = self.TestListCtrl.InsertStringItem(sys.maxint, test.descr) |
509 | self.TestListCtrl.SetStringItem(index, 0, test.descr) |
505 | self.TestListCtrl.SetStringItem(index, 1, "%.1f V" %test.voltage) |
510 | self.TestListCtrl.SetStringItem(index, 1, "%.1f V" %test.voltage) |
Line 506... | Line 511... | ||
506 | self.TestListCtrl.SetStringItem(index, 2, str(test.speed)) |
511 | self.TestListCtrl.SetStringItem(index, 2, str(test.speed)) |
507 | self.TestListCtrl.SetStringItem(index, 3, test.channel) |
512 | self.TestListCtrl.SetStringItem(index, 3, test.channel) |
508 | 513 | ||
509 | vv = int(test.getVibValue(self.app.settings["hpf"].value, self.app.settings["lpf"].value)) |
- | |
510 | vvs = "|%s| (%d)" % ("----------------------------------------------------------------------------------------------------"[0:min(vv/2,100)], vv) |
- | |
Line -... | Line 514... | ||
- | 514 | vv = int(test.getVibValue(self.app.settings["hpf"].value, self.app.settings["lpf"].value)) |
|
- | 515 | vvs = "|%s| (%d)" % ("----------------------------------------------------------------------------------------------------"[0:min(vv/2,100)], vv) |
|
- | 516 | self.TestListCtrl.SetStringItem(index, 4, vvs) |
|
- | 517 | ||
- | 518 | def refreshData(self): |
|
511 | self.TestListCtrl.SetStringItem(index, 4, vvs) |
519 | for idx in range(len(self.app.VibTests)): |
512 | self.TestListCtrl.Select(index) |
520 | self._fillRowInTestList(idx, self.app.getTest(idx)) |
513 | 521 | self.drawGraph() |
|
514 | 522 | ||
515 | def OnTestSelected(self, event): |
523 | def OnTestSelected(self, event): |
Line 1024... | Line 1032... | ||
1024 | file.close() |
1032 | file.close() |
Line 1025... | Line 1033... | ||
1025 | 1033 | ||
1026 | 1034 | ||
- | 1035 | def onSettingsChanged(self): |
|
Line 1027... | Line 1036... | ||
1027 | def onSettingsChanged(self): |
1036 | self.storeSettings() |
1028 | self.storeSettings() |
1037 | self.frame_1.refreshData() |
1029 | 1038 |