Repository navigation
Expand file tree
/
Copy pathCollectorControl.py
More file actions
612 lines (491 loc) · 23.2 KB
/
Copy pathCollectorControl.py
File metadata and controls
612 lines (491 loc) · 23.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
##########################################################################################
# tCollectorControlWindow - class for the window that contains the 15 individual collectors
#
#################################################
#
# Modules used
#
from collections import namedtuple
from PySide6.QtGui import QTextCursor
from PySide6.QtWidgets import QApplication, QWidget, QGridLayout, QScrollArea, QVBoxLayout, QMessageBox
from PySide6.QtCore import Qt
# Import configuration of the system
from CollectorPane_ui import Ui_Form
from ConfigInfo import *
from Collector import tCollector
from Utilities import SignalThenWaitFor
from CollectorConsole import tCollectorConsole
LIMIT_SWITCH_NORMAL_STYLE = "background: none;"
LIMIT_SWITCH_HARD_STYLE = (
"QRadioButton { background: none; } "
"QRadioButton::indicator:checked { "
"background-color: red; "
"border: 1px solid red; "
"border-radius: 6px; "
"height: 13px; "
"width: 13px; "
"}"
)
##########################################################################################
##########################################################################################
##########################################################################################
# tCollectorPane - Class that implements the collector pane and all collector activities
#
#
#
class tCollectorPane(QWidget):
###############################################
# Constructor and destructor
#
# INPUTS:
#
def __init__(self, collectorName, portName, boardSerial, baud, parent=None):
super().__init__(parent) # QWidget constructor
self.bInit = False
self.bResponded = False
self.name = 'Foo' #collectorName
self.port = None
self.bConnected = False
self._consoleWindow = None
self.ReleaseNum = ""
# Load CollectorPane UI dynamically
#loader = QUiLoader()
#ui_file = QFile("CollectorPane.ui")
#ui_file.open(QFile.ReadOnly)
#self.ui = loader.load(ui_file, self) # Have to assign to self so that ui and all its children persist after the constructor exits
#ui_file.close()
# Auto-bind widgets as attributes of self. Not needed if we compile the UI with pyside6-uic,
# but QUiLoader does not do this automatically.
#for widget in self.ui.findChildren(QWidget):
# setattr(self, widget.objectName(), widget)
# self.setFixedSize(self.ui.size())
self.ui = Ui_Form()
self.ui.setupUi(self)
self.setFixedSize(self.size())
collectorTitle = 'Collector ' + collectorName
self.ui.CollectorGroup.setTitle(collectorTitle)
self.ui.CpuTempStringLabel.setText('CPU Temp: --C')
# Create the Collector object that interfaces to the hardware
self.Collector = tCollector(collectorName, portName, boardSerial, baud, self)
self.Collector.PortOpenStateChange.connect(self.ConnectionEvent)
self.Collector.ReleaseStringReceived.connect(self.UpdateReleaseString)
self.Collector.TextLineReceived.connect(self.AddToLog) # a non-telemetry line, should just be sent to the console
self.Collector.TelemetryUpdate.connect(self.UpdateTelemetry)
self.Collector.ConnectionStateUpdate.connect(self.OnConnectionStateUpdate) # host-side serial state, incl. HUNG
# Set the initial state of the display to match whether the port is open
self.ConnectionEvent(False)
# The threshold fields are things the user can enter. We will update if we have new values,
# but not every time. This allow the user to type new values.
# Threshold fields, initial values
# And connect to signals that tell us the user has entered new values
self.ui.WideIllumPercentLineEdit .editingFinished.connect(self.NewUserWideIllumPercent)
self.ui.NarrowSkyBackgroundLineEdit.editingFinished.connect(self.NewUserNarrowSkyBackground)
self.ui.NarrowIllumPercentLineEdit .editingFinished.connect(self.NewUserNarrowIllumPercent)
# Command buttons connect directly to signals of the tCollector class
self.ui.OffPushButton. clicked.connect(self.Collector.DoOff )
self.ui.HomePushButton. clicked.connect(self.Collector.DoHome )
self.ui.TrackPushButton. clicked.connect(self.Collector.DoTrack )
self.ui.StowPushButton. clicked.connect(self.Collector.DoStow )
self.ui.FlatPushButton. clicked.connect(self.Collector.DoFlat )
self.ui.SetTimePushButton. clicked.connect(self.Collector.DoSetTime )
self.ui.MotorStatusPushButton.clicked.connect(self.Collector.DoMotStatus)
self.ui.RebootPushButton. clicked.connect(lambda: self.Collector.Reboot(bForced=True))
self.ui.TimeButton. clicked.connect(self.Collector.DoReconnect)
self.ui.ConsolePushButton. clicked.connect(self.OpenConsole )
###############################################
# OpenConsole - Open (or raise) the interactive console window for this collector
#
def OpenConsole(self):
if self._consoleWindow is None or not self._consoleWindow.isVisible():
self._consoleWindow = tCollectorConsole(
self.Collector.CollectorName, self.Collector,
initialText=self.ui.CollectorLog.toPlainText(),
parent=None
)
self._consoleWindow.show()
else:
self._consoleWindow.raise_()
self._consoleWindow.activateWindow()
###############################################
# closeEvent - Shut down collector thread
#
def closeEvent(self, event):
print("CollectorPane is closing",flush=True)
# Tell the periodic logger thread to shut down, and wait for confirmation
# SignalThenWaitFor(SignalToWaitFor = self.Collector.TheThread.finished, SignalToEmit = self.Collector.RequestExit)
# Now that the thread has exited, schedule it for deletion
#self.Collector.deleteLater()
print("Collector cleaned up",flush=True)
###############################################
# Destructor - Clean up
#
def __del__(self):
pass
###############################################
# ConnectionEvent
#
# INPUTS:
# bPortOpenState - True or False depending on whether the port is connected
#
def ConnectionEvent(self, bConnected):
# print('Collector connection event: ', bConnected)
# Show all the titles and buttons in an enabled or disabled state
self.ui.OffPushButton. setEnabled(bConnected)
self.ui.HomePushButton. setEnabled(bConnected)
self.ui.TrackPushButton. setEnabled(bConnected)
self.ui.StowPushButton. setEnabled(bConnected)
self.ui.FlatPushButton. setEnabled(bConnected)
self.ui.SetTimePushButton. setEnabled(bConnected)
self.ui.MotorStatusPushButton.setEnabled(bConnected)
self.ui.RebootPushButton. setEnabled(bConnected)
# Set the box labels and state label to gray if not connected
GroupBoxStyleString = "" if bConnected else "QGroupBox { color: gray; }"
self.ui.CollectorGroup.setStyleSheet(GroupBoxStyleString)
self.ui.AzGroup. setStyleSheet(GroupBoxStyleString)
self.ui.ElGroup. setStyleSheet(GroupBoxStyleString)
self.ui.WideGroup. setStyleSheet(GroupBoxStyleString)
self.ui.NarrowGroup. setStyleSheet(GroupBoxStyleString)
self.ui.ThresholdGroup.setStyleSheet(GroupBoxStyleString)
LabelStyleString = "" if bConnected else "QLabel { color: gray; }"
self.ui.State. setStyleSheet(LabelStyleString)
self.bConnected = bConnected
###############################################
# OnConnectionStateUpdate - Annunciate how the serial connection is failing, not just that it is
#
# 'hung' means the worker-thread serial open timed out on a wedged/half-powered board, so the
# GUI deliberately refuses to touch the native handle.
#
# 'mute' means the opposite failure and is easy to mistake for a healthy link: the port opens
# perfectly and the board then never answers. Reopening cannot fix it - the USB device has to
# be re-enumerated - so it gets its own annunciator rather than looking like ordinary Offline.
#
# Both recover from a USB power-cycle. Other states clear the colour (the normal state text is
# set by telemetry / ConnectionEvent).
#
def OnConnectionStateUpdate(self, name, state):
if state == 'hung':
self.ui.State.setText('State: HUNG (serial wedged)')
self.ui.State.setStyleSheet("QLabel { color: red; font-weight: bold; }")
elif state == 'mute':
self.ui.State.setText('State: MUTE (opens, no data)')
self.ui.State.setStyleSheet("QLabel { color: red; font-weight: bold; }")
elif state == 'connected':
self.ui.State.setText('State: Connected')
self.ui.State.setStyleSheet("")
elif state == 'offline':
self.ui.State.setText('State: Offline')
self.ui.State.setStyleSheet("QLabel { color: gray; }")
###############################################
###############################################
# User entries into the threshold fields
#
# If the user enters garbage, just set the value to 0, which will led to it being overwritten
# by the collector at the next update.
#
###############################################
# NewUserWideIllumPercent
def NewUserWideIllumPercent(self):
try:
new_value = int(self.ui.WideIllumPercentLineEdit.text())
except ValueError:
new_value = 0
# Invalidate out-of-range inputs
if new_value < 1 or new_value > 100:
new_value = 0
# If it's a valid new value, send it to the target
if new_value != 0:
self.Collector.SetWideIllumPercentThreshold(new_value)
###############################################
# NewUserNarrowSkyBackground
def NewUserNarrowSkyBackground(self):
try:
new_value = int(self.ui.NarrowSkyBackgroundLineEdit.text())
except ValueError:
new_value = 0
# Invalidate out-of-range inputs
if new_value < 1 or new_value > 100:
new_value = 0
# If it's a valid new value, send it to the target
if new_value != 0:
self.Collector.SetNarrowSkyBackgroundPercentThreshold(new_value)
###############################################
# NewUserNarrowIllumPercent
def NewUserNarrowIllumPercent(self):
try:
new_value = int(self.ui.NarrowIllumPercentLineEdit.text())
except ValueError:
new_value = 0
# Invalidate out-of-range inputs
if new_value < 1 or new_value > 100:
new_value = 0
# If it's a valid new value, send it to the target
if new_value != 0:
self.Collector.SetNarrowIllumPercentThreshold(new_value)
###############################################
# UpdateReleaseString - TUpate the s/w version info in the upper right corner
#
# INPUTS:
# ReleaseString - the string from the collector
#
def UpdateReleaseString(self, ReleaseString: str):
self.ReleaseNum = ReleaseString
self.ui.ReleaseStringLabel.setText(ReleaseString)
def SetReleaseOutdated(self, bOutdated: bool):
if bOutdated:
self.ui.ReleaseStringLabel.setStyleSheet("QLabel { color: red; font-weight: bold; }")
else:
self.ui.ReleaseStringLabel.setStyleSheet("")
###############################################
# AddToLog - Text messages from the collector that aren't telemetry strings
#
# INPUTS:
# Line - the text line from the collector
#
def AddToLog(self, Line: str):
# Append the new line
Line = Line.rstrip('\r\n') # Eliminate newlines, since append adds them
self.ui.CollectorLog.append(Line)
# Limit the log to the last N lines (example)
while self.ui.CollectorLog.document().blockCount() > COLLECTOR_LOG_MAXLINES:
cursor = self.ui.CollectorLog.textCursor()
cursor.movePosition(QTextCursor.MoveOperation.Start) # Move to the start
cursor.select(QTextCursor.SelectionType.BlockUnderCursor) # Select the first block (line)
cursor.removeSelectedText() # Remove the selected text
cursor.deleteChar() # Remove any leftover line break
###############################################
# _SetLimitIndicator - Update one limit switch indicator
#
# INPUTS:
# Indicator - the radio button used as a limit indicator
# LimitState - 0 none, 1 soft, 2 hard, 3 soft+hard
#
def _SetLimitIndicator(self, Indicator, LimitState):
Indicator.setChecked(LimitState != 0)
if LimitState & 0x2:
Indicator.setStyleSheet(LIMIT_SWITCH_HARD_STYLE)
else:
Indicator.setStyleSheet(LIMIT_SWITCH_NORMAL_STYLE)
###############################################
# UpdateTelemetry - Update GUI with new info from collector
#
# INPUTS:
# Telem - A dictionary with all the new info from the collector
#
def UpdateTelemetry(self, telemetry: dict):
try:
# Current time
if "TimeString" in telemetry:
self.ui.TimeButton.setText(telemetry["TimeString"])
# Motor positions
if "P" in telemetry:
azPos = f'P:{telemetry["P"][0]:>11,}'
elPos = f'P:{telemetry["P"][1]:>11,}'
self.ui.AzPosLabel.setText(azPos)
self.ui.ElPosLabel.setText(elPos)
# Motor velocities
if "V" in telemetry:
azVel = f'V:{telemetry["V"][0]:11d}'
elVel = f'V:{telemetry["V"][1]:11d}'
self.ui.AzVelLabel.setText(azVel)
self.ui.ElVelLabel.setText(elVel)
# Narrow-angle readings
if "N" in telemetry:
# Update narrow-angle readings
# R, L, U, D
right = telemetry["N"][0]
left = telemetry["N"][1]
up = telemetry["N"][2]
down = telemetry["N"][3]
self.ui.NarrowRight.setText(f'{right:5d}')
self.ui.NarrowLeft .setText(f'{left:5d}')
self.ui.NarrowUp .setText(f'{up:5d}')
self.ui.NarrowDown .setText(f'{down:5d}')
total = right + left + up + down
percent = int(100*total/65532)
self.ui.NarrowIntensity.setText(f'{percent:3d}% {total:5d}')
# Wide-angle readings
if "W" in telemetry:
# Update wide-angle readings
if QUAD_CELL_HANDEDNESS > 0:
# UL, UR, LL, LR
self.ui.WideUL.setText(f'{telemetry["W"][0]:5d}' if telemetry["W"][0] >= 0 else ' ****')
self.ui.WideUR.setText(f'{telemetry["W"][1]:5d}' if telemetry["W"][1] >= 0 else ' ****')
self.ui.WideLL.setText(f'{telemetry["W"][2]:5d}' if telemetry["W"][2] >= 0 else ' ****')
self.ui.WideLR.setText(f'{telemetry["W"][3]:5d}' if telemetry["W"][3] >= 0 else ' ****')
else:
# UL, UR, LL, LR
self.ui.WideUR.setText(f'{telemetry["W"][0]:5d}' if telemetry["W"][0] >= 0 else ' ****')
self.ui.WideUL.setText(f'{telemetry["W"][1]:5d}' if telemetry["W"][1] >= 0 else ' ****')
self.ui.WideLR.setText(f'{telemetry["W"][2]:5d}' if telemetry["W"][2] >= 0 else ' ****')
self.ui.WideLL.setText(f'{telemetry["W"][3]:5d}' if telemetry["W"][3] >= 0 else ' ****')
# Tuple of thresholds - wide illum, narrow sky BG %, narrow illum %
# When receiving, poke the new values into the collecor
if "R" in telemetry:
if telemetry["R"][0] != self.Collector.WideAngleIllumPercent:
self.Collector.WideAngleIllumPercent = telemetry["R"][0]
self.ui.WideIllumPercentLineEdit.setText(str(self.Collector.WideAngleIllumPercent))
if telemetry["R"][1] != self.Collector.NarrowSkyBackgroundPercent:
self.Collector.NarrowSkyBackgroundPercent = telemetry["R"][1]
self.ui.NarrowSkyBackgroundLineEdit.setText(str(self.Collector.NarrowSkyBackgroundPercent))
if telemetry["R"][2] != self.Collector.NarrowIlluminationPercent:
self.Collector.NarrowIlluminationPercent = telemetry["R"][2]
self.ui.NarrowIllumPercentLineEdit.setText(str(self.Collector.NarrowIlluminationPercent))
# Servo error
if "E" in telemetry:
# Update servo error
pass
# Narrow sky background
if "G" in telemetry:
# Update narrow sky background in counts
self.ui.ImpliedSkyBGLabel.setText(f'Implied Sky BG: {telemetry["G"]:5d}')
# Total intensity on wide-angle detector
if "I" in telemetry:
self.ui.WideIntensity.setText(f'{telemetry["I"][1]:3d}% {telemetry["I"][0]:5d}')
# Processor temperature
if "J" in telemetry:
self.ui.CpuTempStringLabel.setText(f'CPU Temp: {telemetry["J"]}C')
# Narrow mode status
if "IsNarrowMode" in telemetry:
GroupBoxStyleStringGray = "QGroupBox { color: gray; }"
GroupBoxStyleStringBold = ""
if telemetry["IsNarrowMode"]:
self.ui.NarrowGroup.setStyleSheet(GroupBoxStyleStringBold)
self.ui.WideGroup. setStyleSheet(GroupBoxStyleStringGray)
else:
self.ui.NarrowGroup.setStyleSheet(GroupBoxStyleStringGray)
self.ui.WideGroup. setStyleSheet(GroupBoxStyleStringBold)
# Narrow angle threshold
if "NarrowAngleThreshold" in telemetry:
msg = f'NarrowThresh: {telemetry["NarrowAngleThreshold"]:5d}'
self.ui.NarrowThresholdLabel.setText(msg)
# Limit states
if "LimitStates" in telemetry:
self._SetLimitIndicator(self.ui.AzLimLowButton, telemetry["LimitStates"][0])
self._SetLimitIndicator(self.ui.AzLimHighButton, telemetry["LimitStates"][1])
self._SetLimitIndicator(self.ui.ElLimLowButton, telemetry["LimitStates"][2])
self._SetLimitIndicator(self.ui.ElLimHighButton, telemetry["LimitStates"][3])
# Home is element 4, not shown on GUI
# Servo mode
if "PositionMode" in telemetry:
if telemetry["PositionMode"][0] == "V":
self.ui.AzGroup.setTitle('Az - VelMode')
else:
self.ui.AzGroup.setTitle('Az - PosMode')
if telemetry["PositionMode"][1] == "V":
self.ui.ElGroup.setTitle('El - VelMode')
else:
self.ui.ElGroup.setTitle('El - PosMode')
# Spot coordinates
if "C" in telemetry:
self.ui.XPos.setText(f'{telemetry["C"][0]:+.2f}')
self.ui.YPos.setText(f'{telemetry["C"][1]:+.2f}')
# Collector mode number
if "ModeNum" in telemetry:
# This one we don't display. It gets passed to the marquee as a signal by tCollector
#if self.CollectorState != telemetry["ModeNum"]:
# self.CollectorState = telemetry["ModeNum"]:
pass
# Collector mode string
if "ModeString" in telemetry:
self.ui.State.setText('State: ' + telemetry["ModeString"])
except Exception as e:
# Handle unexpected errors
print(f"Collectorpane::UpdateTelemetry: Error processing telemetry dict: {e}:")
# P Tuple of az/el motor positions
# V Tuple of az/el motor velocities
# N Tuple of the four narrow-angle readings
# W Tuple of the four wide-angle readings
# R Tuple of thresholds - wide illum, narrow sky BG %, narrow illum %
# E Servo error, either velocity or position error depending on servo mode
# G Narrow sky background in counts
# I Tuple of Total intensity on detector in counts, and as a percentage
# IsNarrowMode True if in narrow-angle mode, else wide
# NarrowAngleThreshold Threshold for switching to narrow angle
# LimitStates integer[5] - az low, az high, el low, el high, home
# 0 none, 1 soft, 2 hard, 3 soft+hard
# PositionMode boolean - true if in positoin mode, false if velocity mode
# C Spot coordinate x-y (float)
# ModeNum Current mode of the collector (integer)
# ModeString Current mode of the collecor (string)
# Timestring Current time as a string HH:MM:SS
##########################################################################################
##########################################################################################
##########################################################################################
#
# tCollectorControlWindow - class for the main "master control" window of the app
#
# Also includes all top-level sequencing and logic
#
class tCollectorControlWindow(QWidget):
def __init__(self, parent=None):
super().__init__(parent)
self.setWindowTitle("Collector Control")
# Create a central widget and grid layout for the configured collector panes
central_widget = QWidget()
layout = QGridLayout(central_widget)
# Create the collector array. We have to do it here, rather than at a higher level,
# because the tCollector widget needs to be told its parent. The collector panes will
# create and own the collecor objects
self.CollectorPanes = [
tCollectorPane(port_info.Name, port_info.Port, port_info.BoardSerial, COLLECTOR_BAUD_RATE, self)
for port_info in PROJECT_CONFIG.CollectorPorts
]
Collector_iterator = (CollectorPane for CollectorPane in self.CollectorPanes) # Compact generator for use in loop below
for index, CollectorPane in enumerate(self.CollectorPanes):
row = index // PROJECT_CONFIG.CollectorGridCols
col = index % PROJECT_CONFIG.CollectorGridCols
layout.addWidget(CollectorPane, row, col)
CollectorPane.Collector.ReleaseStringReceived.connect(lambda _: self._UpdateReleaseComparison())
PaneGeometry = self.CollectorPanes[0].geometry()
CurrentGeometry = self.geometry()
self.resize(50 + PROJECT_CONFIG.CollectorGridCols * PaneGeometry.width(),
PROJECT_CONFIG.CollectorGridRows * PaneGeometry.height() + 50)
# Wrap the central widget with a QScrollArea
scroll_area = QScrollArea()
scroll_area.setWidgetResizable(True)
scroll_area.setWidget(central_widget)
# Only enable vertical scroll bar
scroll_area.setHorizontalScrollBarPolicy(Qt.ScrollBarAlwaysOff)
scroll_area.setVerticalScrollBarPolicy(Qt.ScrollBarAsNeeded)
# Set the scroll area as the main layout
main_layout = QVBoxLayout(self)
main_layout.addWidget(scroll_area)
self.setLayout(main_layout)
# Disable the close button in this window
self.setWindowFlags(self.windowFlags() & ~Qt.WindowCloseButtonHint)
self.bAllowClose = False
###############################################
# ForceClose - used by MainWin to shut us down at exit
#
def ForceClose(self):
for pane in self.CollectorPanes:
if pane._consoleWindow is not None:
pane._consoleWindow.close()
self.bAllowClose = True
self.close()
###############################################
# closeEvent - rejects any attempt to close the window directly - it must follow MainWin
#
def closeEvent(self, event):
# print("CollectorWindow close event")
if not self.bAllowClose:
# Ignore any close events
QMessageBox.warning(self, "Warning", "You cannot close this window directly.")
event.ignore()
###############################################
# _UpdateReleaseComparison - Marks any pane with an older release number bold red
#
def _UpdateReleaseComparison(self):
known = [pane.ReleaseNum for pane in self.CollectorPanes if pane.ReleaseNum]
if not known:
return
newest = max(known)
for pane in self.CollectorPanes:
if pane.ReleaseNum:
pane.SetReleaseOutdated(pane.ReleaseNum < newest)
###############################################
# CollectorList - Returns a list of all 15 collectors
#
def CollectorList(self):
CollectorList = [ CollectorPane.Collector for CollectorPane in self.CollectorPanes ]
return CollectorList