#NEWLINE# def __init__( self , driver ) : #NEWLINE# #INDENT# self . driver = driver #NEWLINE# loader = QtUiTools . QUiLoader ( ) #NEWLINE# uifile = QtCore . QFile ( ':/ui/ddAtlasDriverPanel.ui' ) #NEWLINE# assert uifile . open ( uifile . ReadOnly ) #NEWLINE# self . widget = loader . load ( uifile ) #NEWLINE# self . widget . setWindowTitle ( 'Atlas Driver Panel' ) #NEWLINE# self . ui = WidgetDict ( self . widget . children ( ) ) #NEWLINE# self . ui . calibrateEncodersButton . connect ( 'clicked()' , self . onCalibrateEncoders ) #NEWLINE# self . ui . prepButton . connect ( 'clicked()' , self . onPrep ) #NEWLINE# self . ui . combinedStandButton . connect ( 'clicked()' , self . onCombinedStand ) #NEWLINE# self . ui . stopButton . connect ( 'clicked()' , self . onStop ) #NEWLINE# self . ui . freezeButton . connect ( 'clicked()' , self . onFreeze ) #NEWLINE# self . ui . calibrateNullBiasButton . connect ( 'clicked()' , self . onCalibrateNullBias ) #NEWLINE# self . ui . calibrateElectricArmsButton . connect ( 'clicked()' , self . onCalibrateElectricArms ) #NEWLINE# self . ui . initNavButton . connect ( 'clicked()' , self . onInitNav ) #NEWLINE# self . ui . standButton . connect ( 'clicked()' , self . onStand ) #NEWLINE# self . ui . mitStandButton . connect ( 'clicked()' , self . onMITStand ) #NEWLINE# self . ui . userButton . connect ( 'clicked()' , self . onUser ) #NEWLINE# self . ui . manipButton . connect ( 'clicked()' , self . onManip ) #NEWLINE# self . ui . recoveryOnButton . connect ( 'clicked()' , self . driver . sendRecoveryEnable ) #NEWLINE# self . ui . recoveryOffButton . connect ( 'clicked()' , self . driver . sendRecoveryDisable ) #NEWLINE# self . ui . bracingOnButton . connect ( 'clicked()' , self . driver . sendBracingEnable ) #NEWLINE# self . ui . bracingOffButton . connect ( 'clicked()' , self . driver . sendBracingDisable ) #NEWLINE# for psi in [ 1000 , 1500 , 2000 , 2400 , 2650 ] : #NEWLINE# #INDENT# self . ui . __dict__ [ ( ( 'setPressure' + str ( psi ) ) + 'Button' ) ] . connect ( 'clicked()' , partial ( self . driver . sendDesiredPumpPsi , psi ) ) #NEWLINE# #UNINDENT# self . ui . sendCustomPressureButton . connect ( 'clicked()' , self . sendCustomPressure ) #NEWLINE# self . setupElectricArmCheckBoxes ( ) #NEWLINE# PythonQt . dd . ddGroupBoxHider ( self . ui . calibrationGroupBox ) #NEWLINE# PythonQt . dd . ddGroupBoxHider ( self . ui . pumpStatusGroupBox ) #NEWLINE# PythonQt . dd . ddGroupBoxHider ( self . ui . electricArmStatusGroupBox ) #NEWLINE# self . updateTimer = TimerCallback ( targetFps = 5 ) #NEWLINE# self . updateTimer . callback = self . updatePanel #NEWLINE# self . updateTimer . start ( ) #NEWLINE# self . updatePanel ( )