From 0a345ac976b9a424be7c8a51fef0d925585aa179 Mon Sep 17 00:00:00 2001 From: Jared Males Date: Sun, 27 Oct 2024 00:16:20 -0700 Subject: [PATCH] updated pupilGuideGUI connect/disconnect; added alignment start/stop buttons --- gui/resources/icons/arrow_up_dark_128.png | Bin 0 -> 6139 bytes .../icons/keyboard_double_arrow_down.png | Bin 0 -> 5753 bytes .../icons/keyboard_double_arrow_left.png | Bin 0 -> 5165 bytes .../icons/keyboard_double_arrow_right.png | Bin 0 -> 5151 bytes .../icons/keyboard_double_arrow_up.png | Bin 0 -> 5666 bytes gui/resources/magaox.qrc | 5 + gui/widgets/pupilGuide/pupilGuide.hpp | 346 +++++++++++++----- gui/widgets/pupilGuide/pupilGuide.ui | 274 +++++++++----- 8 files changed, 456 insertions(+), 169 deletions(-) create mode 100644 gui/resources/icons/arrow_up_dark_128.png create mode 100644 gui/resources/icons/keyboard_double_arrow_down.png create mode 100644 gui/resources/icons/keyboard_double_arrow_left.png create mode 100644 gui/resources/icons/keyboard_double_arrow_right.png create mode 100644 gui/resources/icons/keyboard_double_arrow_up.png diff --git a/gui/resources/icons/arrow_up_dark_128.png b/gui/resources/icons/arrow_up_dark_128.png new file mode 100644 index 0000000000000000000000000000000000000000..05fa59fd6d89e0d6b56f3376a858dc618e37af56 GIT binary patch literal 6139 zcmeHKX;c&0whog>L}XA=0x?POUO2 z4xmC~H-n7|0<8kl7eO0AKt&W#FVM6i;DDkcuM*V8_3nCax!%3+m&vNsseShT&feeN z`=m~)x7XU)XcIIFg_`Z|=FCFw$;g#7a|ZIe{B4sqa(lMfFHp*YWSAJSD1sjiW26Z& zFb0WMuPQ`-*dWo{NmGi4j1((_=O_hFoBu%YzgAU&iyM$%8 z12 zOH919d$j1;zz0)}P2KF|^-K1VuAWb|N#RiiJ6^1gRb+58-W-+Jot|ZAFAf`hvscmz zZ|Aw*@Z5Zy=4d^CRp4N_Kaui?|ETb%!E^%G&Yv!dy}g2RyJ~q7WLa8jEjiY2c`&fv za7l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;+4F0D{@NPbAd-7)n&+aCV>2Yut4vRP3!iJA}m zbp-aB3bj7*mOta<*_AK)HTL`KOma0-urIphVY|N%3V5>P`p}s>XKbUR)J&86P(|l9 zlu|7&*x%K*sK;ofG`ACmuC<<8+??(w&~%G0=*_ytLhBa~9G>h8sA3k!V(iU5nqEt@ z4et7*w8OV<^lMk2JvcaYHK?@0^Lv?=Y5Y*472N-5>AKvN8_gM~T@vnQ8enuSPu#q7 zH{nTnx%zq8eeU0SVINk(m5i((C+2{@$GqA*j=m0bOg6x%C$8SuJKQkKn$fmMx31|% zG{@ zc6?`7j!#>QeqcqcZ+*kfZ2GL$w|<^SwNC%Y>-FlLOp+%4rhWYf60iB)^(@@ahK?_N zle4mCq_ww~jGW5vt#{jZK{0dob&Gj~ljl~fiffuHzj=JCkwM8wkfXxCG!W{%w1C^y z*W0Si(=kXJ+4bn;c)fW=hxuUK`*&v98v1AlOH>|8q5kh0pqk38$E+9s&zN(Qy-|*8 zo{v7%IJDn0F*PLzqrT_c%$?Cb)ZDyxM_$W)(5Ar8k;S@YWl;~Ka}69*)KOZk>1pbb t^R;MIB%LKw05i2P%E5DT=FTM4PG3;E$@#uD@)w12ckyyAaSZ?NzW@xUIM4t9 literal 0 HcmV?d00001 diff --git a/gui/resources/icons/keyboard_double_arrow_down.png b/gui/resources/icons/keyboard_double_arrow_down.png new file mode 100644 index 0000000000000000000000000000000000000000..4a2e590cec42e5d463ceab7499c0c9ad3685a370 GIT binary patch literal 5753 zcmeHKdsGuw8lOOf2(3cJQeQ9xmAY-7OrD!a5CQ}nL1aNHE=-aMM99M=n1GrDw_UY7 ztPQKSB2ZhZM_r}TmMyGJ)B;tvLR(pU0+m*6sm2tmXc2lRAY!+tJ)GU1{m0>OXXd-# z_xrx@cYpVu%;w}J@lX2A^n)PiNl8L%3Iq|rBLO1$fLo@1uM*sxMXAe;DX0n7>9tB# zJ_Z{Lbr_79RbbM5UY&e2@HqU$kCEc|I?Bc!s}t;91%D~enifNQuVc<((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Cm!wpjLY@wV~HxO7dAy8+xz;Lim=zYuy845%l652kDk} zklYh#TiF_QRx#MnR?S&BE%#PcDSL*ajaUh-nPEM0z1s9tu5z&VaO1fztGJW71SHB5 zQ9M*;{dz84$JzzWoa3;IhFh$zs>-)3wjDe$mcSYAYz#hMx7odRHpr)SNv^MUPR=eE z?0;uCB%;_-+AR@5md~$D-72u&z1(qub13Tdfufz3YHPan{@wU%PnwCjpLMonEi9UC z9@yph)ZI&Lzqi2ID{5%9xQ4u7uNLhfK5p?3^J<|%n`~}>h@3s>Wg|V~fZC?HY&59|x%v~#8eU9Pu znC`1?Altr};j%=pc5mL*-lpL5yQ`|Jl4u8~gn9ia80!C~xdRxwUglk0_ub#V4XoMf z-g0VH;c#ClHK#2lu{-lkO-oj1NqyEudvxMA8=spCm6c}^?{O@F0k*VOn%DhV4iZVU zzc&~NEsGe^y3y9>QK)!n5D?-C-j>WGEjLc&+TGn<_S&gFyPyyLKT7?~>h*cJsN^Hd z(D$G9I*+>s)#afPwtpuPLVO#Ax7XeY#+SXR;w7;M7iDkw3GyyiEdT%j literal 0 HcmV?d00001 diff --git a/gui/resources/icons/keyboard_double_arrow_left.png b/gui/resources/icons/keyboard_double_arrow_left.png new file mode 100644 index 0000000000000000000000000000000000000000..95a70adad6f704f66a61554f09c18c25a8cae322 GIT binary patch literal 5165 zcmeHKeNYo;8s9*`5VeOMinT(wv7R68W;fX-Bry??V2Bt*#G;N>H=A8p$(PAO!pC8% zwXNuY*6V4lGwNtPJWs89h>nK@tA}T=I#v8+PVj7ww1{I7mU<=l#ltB+hi>CgIA2Rj<*A?^3e z0((}NQfh6xcD(-zHve#mWmNTwsKPr@oBq;tef7R4z^pYofF%3 zXHl}|4a1CUugyAJ#pmo?=aNuEmy`{jy}#_y@oTP?Czod~DQHgmZ`=9Fs%6HFpRL_` zFufvj2OhEOT^IMa@@QlHh&bcK$h*$W@vTFfF3gLVwr=$$P}lo>YHF4#HT7vJpn%Q4 zU8hg~GI`VoEjy=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ard_double_arrow_right.png new file mode 100644 index 0000000000000000000000000000000000000000..69219e444270574b5561ae692e90c3be288e2789 GIT binary patch literal 5151 zcmeHKdsr0L6`utJ1=A`~A%vFcT0b9jc4u}Mc6Z$6xdY}v~n)s*1QCH-5i&LqTz=*7n!u&8IC~MFMY&MB z!)D^lEXo(zS(J5i!0B$aWd1Vr2s*y|^h{0CvghoPc`J`U?Ji07&-g_p_2+4O4Su&e zOB(k)t52*m|8Zye53nT%{(_G`w|QLW)o~Gj-Fh^&HucVoO?wr~PC1vDH@;DG%gFdP zT{y2hv(~(PPGn+n%F?K#-tkkfq`ilG&rI2Eyx)4{lKr`3&u8T2x5T%#yzVmhL{ZkH zHUALL4Bq(e~j#Po~zRy8I;579v{zRF~(iUk7xRhJCuYr(l(*bYCukqM_4&Pqj9E-Xwo@|KXzT zsuQzn=ayt>sQ1Ub7fuPt;UJ+)=EY_W^$*?Cy_i zw$`cg_mTN+n-Aex=PD}?WH={rKU*;|R5!z0{ZfRvi94@xp1dGDvcw6p9|So8gG|D^hank%ZdX3tqtwB~f<%a`uh6sw!2 zf40FhWwu}7{?+R~_w2qYs+`^U-sYdYS{prv3*HslQ97qB8ws?n?s(&T-92?iR9R%_ zET?~Dq+dIGV%e8PuH~+_o;{rJcF^8u9fwL(4Naiu+#KkwMTU7KZL>%y#%5$CZi^i> z9fD}$-FAx3XL;1f=5SW6_;&pvG0HJo@xmAbZm=h_xm;SYgPmWTkxdup(`rT>9~Z1~ zlYqd&@)YW}n5|CItrZKrB)ErWsTdU?e7;t^$dHL9+Z-&akSHWLmg43LW#YJCRO4Vw zWR`AD9|d^QigS71PD-UNmrLT3OKgrDDWO)YrMOHglVJdXIg6}3<;JYesgRfF{E&7 z!f83ds?``xGe%6IR1lcTL@`)Qj7%+;t7CAQiWx$sw>o*sO0$p(kV`ngLlbgJA&-s0 z)GSM33KgruC_=$tCX-PiQ=2HY(x@In@pA_Ux{@*v%?eU6fJ(-wjWRh+Uan=I&pd*{Ju=9Bes!1s2I8Mm%Sh-5BR4U|ypl4Wz6LccvByfp5R`9@OAwe-f zSPJ$jAQ0@J7BbnvQoPNPZL^uRVwe&NBM00Du$>r+r*st00#aP2APJn5DYJ2$BnT3h zW4MyUhv01tXDa$OG~7I>rgzEHI479DNHF#8sQK*5-lyJ2Gbd~%6csiFNzuI}IH^LG z5%L6Fy)HVJvgWYh^yq8XemnPwR!}kw6Jw-I7_N>1tq>!pFiOS}n3|%EtRj|Wm{@u^ zyVGXkU6g}O%mF$Atw4JUTA?$9g_=1W?aF20DgePS0>{27n6$58DLga!E7nNAp@~KS z3^`;#T(1orUf?X04jhJkn!#h|d;IjR#rHS^pdOuMMEZ`(H7eJL6c`bBw7W*-8j%7c z0*`jrcP3Zx;Oi7?1^zjdPoIP!^6G1|rgg+7T z%GPjT4C3{Ml%VUuPX~qgm$$Ix2;%>Dy)H4^-FoZd+j->);d9QMd0|RGdg6u3ZI-&_ z?{sWCyX(RIYo;g1KIIR>ALrBc(f%msM-`uiezD-4bIsjfb$&{QZMI8AV?8b2i|NQG zbZnk4w5+RYLu*3-8fU65l#13?9E^j;?y4I2h+n%7k?YkYFe0?a1CWhX)k9pG9)Jkh zj_4X20ulngeQflm0OW|qgaC;DpT~>o5dWQx(NQ81p63frO+ePSHXNBa0jVy0%Pve2 z9r=H_Qcxjk;@H#`ogeQwIUQ*`RpRqaMULNGwy#+VFIOJ#ax^~ha1~fI+ys_veM>_C zLW7lT{4XX=DfD)9Z2-W=b|s9dXoFZyX+;|}`MO{Ow6wcGH<$!dmA15EIW+mY#sJ!r z?O|{R!PKBB1t{O$UdLSM4uOUwn8*YO1MTy5(?uFH%WFEw?^|V%9TzA>K ly{9_d=l3|<3&dW!8nP$+s|U9OR4+p&eM*Mz&7>7;{sW&#UpxQ+ literal 0 HcmV?d00001 diff --git a/gui/resources/icons/keyboard_double_arrow_up.png b/gui/resources/icons/keyboard_double_arrow_up.png new file mode 100644 index 0000000000000000000000000000000000000000..94d39d7eaa8f4207a56ebfda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ZwyP1zM_= zV3=wO3|DoOV8)9GHI*m8>ey1{;d%`Lrbnk-yVkXTAO#^J6vT*80Si~DaTbb*xGXVW z6vGk|LV-XiMg#=jQB^m(*^q0o;wB&oTrIKM&F?exK9z zoUUFm&@1ET>UvIBuNdf+@pE zzh@%=ZZ9ts#xg8oDR~9@N z`nZ8Zr%&*D6DL57NC$%feeVvV(cn@a6NVPA`U{MagPx$%?Rb9mnXAiJkwI5Ds`ky! z*VVRcTLzL8wZ9CqeB+sA=?(%_-`d}wy})z%Ld(vd=4AY;S>h8K=}vEXX^0Ko%!v~X zVAwrNRsb%X-a0ao93LQQ!DCmH%hFK(L95$PT~jr?7`Yyh;}b^ue_Flo{k3)|y!<*z zYK4@dvObbxn~FxFk<9i)qtTEu8L*BFJ`!{yF!mn})3(R*+gmTKsG5;wHQksbqE!@s zE8cb{EZ^FGY_0Rat=g&!413U}trMNz-C;C$n0-1k$9HzQ-7~M>-D{}-$6&qSZ2bVsgxTz78v<}+cDWIqfqPtU43ccG|OG8D9g(f2wj&u7*^ltj*F z2W8UTj+$C|Q`3Q4jW0elxB~1RzxS29c`@0g#*o2~J7_p)(+&y6_Ceb3di?$=IrlF{ zI{Y^_+C%N0%cVX|dJVQX|Jo}sR3C|vUH)gf0|;OmgqKq@pi8c+$Pm%=2PbQx=n~(( zPx)^D7cG0{G!>3szi)AQdP}@ek=XF|zDFkW1_{$^Tm6npnH$L(VbiOSkCAj z_@PqeYa8BE;RBsxy5ySkcSgAX9#B3Vnbale>FM)}h_aO&ddtpr>EG6V*Z@TMwYT;1 w#pS<*jc&QocCLNi;YKg{U)icons/arrow_right_128.png icons/arrow_up_right_128.png icons/arrow_up_128.png + icons/arrow_up_dark_128.png icons/arrow_up_left_128.png icons/arrow_left_128.png icons/arrow_down_left_128.png @@ -25,6 +26,10 @@ icons/dump-truck.png icons/crop.png icons/flare.png + icons/keyboard_double_arrow_down.png + icons/keyboard_double_arrow_up.png + icons/keyboard_double_arrow_left.png + icons/keyboard_double_arrow_down.png diff --git a/gui/widgets/pupilGuide/pupilGuide.hpp b/gui/widgets/pupilGuide/pupilGuide.hpp index d4e853a79..ce0c7e4c9 100644 --- a/gui/widgets/pupilGuide/pupilGuide.hpp +++ b/gui/widgets/pupilGuide/pupilGuide.hpp @@ -66,17 +66,21 @@ class pupilGuide : public xWidget int m_tipmovewhat{ MOVE_TTM }; + // --- TCS + + std::string m_tcsiState; + // --- woofer + std::string m_dmWooferState; + std::string m_wooferModesState; + double m_tilt{ 0 }; ///< current value of tilt mode from wooferModes double m_tip{ 0 }; ///< current value of tip mode from wooferModes double m_focus{ 0 }; ///< current value of focus mode from wooferModes float m_focusStepSize{ 0.1 }; - // --- camwfs-align - bool m_camwfsAlignLoopState{ false }; - bool m_camwfsAlignLoopWaiting{ false }; // --- camwfs-fit std::string m_camwfsfitState; @@ -157,6 +161,17 @@ class pupilGuide : public xWidget float m_camlensStepSize{ 0.01 }; + // ****** Alignment ******** // + + // --- camwfs-align + bool m_camwfsAlignLoopState{ false }; + + // --- twAlign-camwfs-ctrl + bool m_twAlignLoopState {false}; + + // --- twAlign-camwfs-wfs + bool m_twAlignSensorState {false}; + public: pupilGuide( QWidget *Parent = 0, Qt::WindowFlags f = Qt::WindowFlags() ); @@ -182,6 +197,14 @@ class pupilGuide : public xWidget int whichcl = CAMLENS_BOTH ///< Which axis, or both. CAMLENS_X, CAMLENS_Y, CAMLENS_BOTH ); + void camwfs_align_setEnabled( bool enabled ); + + void twAlign_camwfs_ctrl_setEnabled( bool enabled ); + + void twAlign_camwfs_wfs_setEnabled( bool enabled ); + + void alignment_buttons_setEnabled( bool enabled ); + public slots: void updateGUI(); @@ -245,6 +268,11 @@ class pupilGuide : public xWidget void on_button_camlens_r_pressed(); void on_button_camlens_scale_pressed(); + // ******** alignment *********// + + void on_button_startAlignment_pressed(); + void on_button_stopAlignment_pressed(); + private: Ui::pupilGuide ui; }; @@ -255,12 +283,6 @@ pupilGuide::pupilGuide( QWidget *Parent, Qt::WindowFlags f ) : xWidget( Parent, ui.setupUi( this ); - - - //ui.modState->setProperty( "isStatus", true ); - - - ui.button_focus_scale->setProperty( "isScaleButton", true ); ui.button_pup_scale->setProperty( "isScaleButton", true ); ui.button_ttmPeri_scale->setProperty( "isScaleButton", true ); @@ -284,26 +306,26 @@ pupilGuide::pupilGuide( QWidget *Parent, Qt::WindowFlags f ) : xWidget( Parent, ui.modFreq_current->setup( "modwfs", "modFrequency", statusEntry::FLOAT, "", "" ); ui.modFreq_current->setStretch( 0, 0, 6 ); // removes spacer and maximizes text field ui.modFreq_current->format( "%0.1f" ); - ui.modFreq_current->onDisconnect(); + //ui.modFreq_current->onDisconnect(); ui.modRad_current->setup( "modwfs", "modRadius", statusEntry::FLOAT, "", "" ); ui.modRad_current->setStretch( 0, 0, 6 ); // removes spacer and maximizes text field ui.modRad_current->format( "%0.1f" ); - ui.modRad_current->onDisconnect(); + //ui.modRad_current->onDisconnect(); ui.modCh1->setup( "fxngenmodwfs", "C1ofst", statusEntry::FLOAT, "Ch1", "V" ); ui.modCh1->currEl( "value" ); ui.modCh1->targEl( "value" ); ui.modCh1->setStretch( 0, 1, 6 ); // removes spacer and maximizes text field ui.modCh1->format( "%0.2f" ); - ui.modCh1->onDisconnect(); + //ui.modCh1->onDisconnect(); ui.modCh2->setup( "fxngenmodwfs", "C2ofst", statusEntry::FLOAT, "Ch2", "V" ); ui.modCh2->currEl( "value" ); ui.modCh2->targEl( "value" ); ui.modCh2->setStretch( 0, 1, 6 ); // removes spacer and maximizes text field ui.modCh2->format( "%0.2f" ); - ui.modCh2->onDisconnect(); + //ui.modCh2->onDisconnect(); setXwFont( ui.label_tipAlignment ); @@ -339,11 +361,11 @@ pupilGuide::pupilGuide( QWidget *Parent, Qt::WindowFlags f ) : xWidget( Parent, // tweeter controls - setXwFont( ui.labelTweeter ); + setXwFont( ui.label_tweeter ); setXwFont( ui.buttonTweeterTest_set ); // ncpc controls - setXwFont( ui.labelNCPC ); + setXwFont( ui.label_ncpc ); setXwFont( ui.buttonNCPCTest_set ); //-----------ttmpupil controls ------------ @@ -358,11 +380,10 @@ pupilGuide::pupilGuide( QWidget *Parent, Qt::WindowFlags f ) : xWidget( Parent, ui.pupCh1->setup( "ttmpupil", "pos_1", statusEntry::FLOAT, "Ch 1", "V" ); ui.pupCh1->setStretch( 1, 2, 4 ); ui.pupCh1->highlightChanges( false ); - ui.pupCh1->onDisconnect(); + ui.pupCh2->setup( "ttmpupil", "pos_2", statusEntry::FLOAT, "Ch 2", "V" ); ui.pupCh2->setStretch( 1, 2, 4 ); ui.pupCh2->highlightChanges( false ); - ui.pupCh2->onDisconnect(); //-----------ttmperi controls ------------ setXwFont( ui.labelTTMPeri ); @@ -375,11 +396,10 @@ pupilGuide::pupilGuide( QWidget *Parent, Qt::WindowFlags f ) : xWidget( Parent, ui.ttmPeriCh1->setup( "ttmperi", "axis1_voltage", statusEntry::FLOAT, "Ch 1", "V" ); ui.ttmPeriCh1->setStretch( 1, 2, 4 ); ui.ttmPeriCh1->highlightChanges( false ); - ui.ttmPeriCh1->onDisconnect(); + ui.ttmPeriCh2->setup( "ttmperi", "axis2_voltage", statusEntry::FLOAT, "Ch 2", "V" ); ui.ttmPeriCh2->highlightChanges( false ); ui.ttmPeriCh2->setStretch( 1, 2, 4 ); - ui.ttmPeriCh2->onDisconnect(); /* pupil tracking loop */ setXwFont( ui.label_pupTrackLoop ); @@ -390,7 +410,6 @@ pupilGuide::pupilGuide( QWidget *Parent, Qt::WindowFlags f ) : xWidget( Parent, ui.pupTrackLoop_deltaX->readOnly( true ); ui.pupTrackLoop_deltaX->setStretch( 0, 0, 6 ); // removes spacer and maximizes text field ui.pupTrackLoop_deltaX->format( "%0.03f" ); - ui.pupTrackLoop_deltaX->onDisconnect(); ui.pupTrackLoop_deltaY->setup( "camwfs-align", "deltas", statusEntry::FLOAT, "", "" ); ui.pupTrackLoop_deltaY->currEl( "delta1" ); @@ -398,7 +417,6 @@ pupilGuide::pupilGuide( QWidget *Parent, Qt::WindowFlags f ) : xWidget( Parent, ui.pupTrackLoop_deltaY->readOnly( true ); ui.pupTrackLoop_deltaY->setStretch( 0, 0, 6 ); // removes spacer and maximizes text field ui.pupTrackLoop_deltaY->format( "%0.03f" ); - ui.pupTrackLoop_deltaY->onDisconnect(); ui.pupTrackLoop_slider->setup( "camwfs-align", "loop_state", "toggle", "" ); ui.pupTrackLoop_slider->setStretch( 0, 0, 10, true, true ); @@ -406,7 +424,6 @@ pupilGuide::pupilGuide( QWidget *Parent, Qt::WindowFlags f ) : xWidget( Parent, ui.pupTrackLoop_gain->setup( "camwfs-align", "loop_gain", statusEntry::FLOAT, "loop gain", "" ); ui.pupTrackLoop_gain->setStretch( 0, 1, 6 ); // removes spacer and maximizes text field ui.pupTrackLoop_gain->format( "%0.2f" ); - ui.pupTrackLoop_gain->onDisconnect(); /* actuator alignment loop */ setXwFont( ui.label_actAlignLoop ); @@ -417,7 +434,6 @@ pupilGuide::pupilGuide( QWidget *Parent, Qt::WindowFlags f ) : xWidget( Parent, ui.actAlignLoop_deltaX->readOnly( true ); ui.actAlignLoop_deltaX->setStretch( 0, 0, 6 ); // removes spacer and maximizes text field ui.actAlignLoop_deltaX->format( "%0.03f" ); - ui.actAlignLoop_deltaX->onDisconnect(); ui.actAlignLoop_deltaY->setup( "twAlign-camwfs-ctrl", "deltas", statusEntry::FLOAT, "", "" ); ui.actAlignLoop_deltaY->currEl( "delta1" ); @@ -425,7 +441,6 @@ pupilGuide::pupilGuide( QWidget *Parent, Qt::WindowFlags f ) : xWidget( Parent, ui.actAlignLoop_deltaY->readOnly( true ); ui.actAlignLoop_deltaY->setStretch( 0, 0, 6 ); // removes spacer and maximizes text field ui.actAlignLoop_deltaY->format( "%0.03f" ); - ui.actAlignLoop_deltaY->onDisconnect(); ui.actAlignLoop_slider->setup( "twAlign-camwfs-ctrl", "loop_state", "toggle", "" ); ui.actAlignLoop_slider->setStretch( 0, 0, 10, true, true ); @@ -433,7 +448,6 @@ pupilGuide::pupilGuide( QWidget *Parent, Qt::WindowFlags f ) : xWidget( Parent, ui.actAlignLoop_gain->setup( "twAlign-camwfs-ctrl", "loop_gain", statusEntry::FLOAT, "loop gain", "" ); ui.actAlignLoop_gain->setStretch( 0, 1, 6 ); // removes spacer and maximizes text field ui.actAlignLoop_gain->format( "%0.2f" ); - ui.actAlignLoop_gain->onDisconnect(); /* actuator alignment sensor */ setXwFont( ui.label_actAlignSensor ); @@ -444,17 +458,19 @@ pupilGuide::pupilGuide( QWidget *Parent, Qt::WindowFlags f ) : xWidget( Parent, ui.actAlignSensor_nAverage->setup( "twAlign-camwfs-wfs", "nPokeAverage", statusEntry::INT, "no. average", "" ); ui.actAlignSensor_nAverage->setStretch( 1, 3, 6 ); ui.actAlignSensor_nAverage->format( "%d" ); - ui.actAlignSensor_nAverage->onDisconnect(); ui.actAlignSensor_nImages->setup( "twAlign-camwfs-wfs", "nPokeImages", statusEntry::INT, "no. images", "" ); ui.actAlignSensor_nImages->setStretch( 1, 3, 6 ); ui.actAlignSensor_nImages->format( "%d" ); - ui.actAlignSensor_nImages->onDisconnect(); ui.actAlignSensor_pokeAmp->setup( "twAlign-camwfs-wfs", "poke_amp", statusEntry::FLOAT, "poke amp.", "um" ); ui.actAlignSensor_pokeAmp->setStretch( 1, 3, 6 ); ui.actAlignSensor_pokeAmp->format( "%0.2f" ); - ui.actAlignSensor_pokeAmp->onDisconnect(); + + /* alignment start/stop */ + setXwFont( ui.label_alignment ); + setXwFont( ui.button_startAlignment ); + setXwFont( ui.button_stopAlignment ); setXwFont( ui.labelPupilFitting ); //,1.2); @@ -487,12 +503,10 @@ pupilGuide::pupilGuide( QWidget *Parent, Qt::WindowFlags f ) : xWidget( Parent, ui.fitThreshold->setup( "camwfs-fit", "threshold", statusEntry::FLOAT, "Thresh", "" ); ui.fitThreshold->setStretch( 0, 1, 6 ); // removes spacer and maximizes text field ui.fitThreshold->format( "%0.3f" ); - ui.fitThreshold->onDisconnect(); ui.fitAvgTime->setup( "camwfs-avg", "avgTime", statusEntry::FLOAT, "Avg. T.", "s" ); ui.fitAvgTime->setStretch( 0, 1, 6 ); // removes spacer and maximizes text field ui.fitAvgTime->format( "%0.3f" ); - ui.fitAvgTime->onDisconnect(); /* Camera Lens */ setXwFont( ui.label_camlens ); @@ -504,12 +518,10 @@ pupilGuide::pupilGuide( QWidget *Parent, Qt::WindowFlags f ) : xWidget( Parent, ui.camlensX_pos->setup( "stagecamlensx", "position", statusEntry::FLOAT, "X", "mm" ); ui.camlensX_pos->setStretch( 0, 1, 6 ); // removes spacer and maximizes text field ui.camlensX_pos->format( "%0.4f" ); - ui.camlensX_pos->onDisconnect(); ui.camlensY_pos->setup( "stagecamlensy", "position", statusEntry::FLOAT, "Y", "mm" ); ui.camlensY_pos->setStretch( 0, 1, 6 ); // removes spacer and maximizes text field ui.camlensY_pos->format( "%0.4f" ); - ui.camlensY_pos->onDisconnect(); ui.button_camlens_scale->setProperty( "isScaleButton", true ); @@ -543,6 +555,10 @@ void pupilGuide::subscribe() m_parent->addSubscriberProperty( this, "camwfs", "fps" ); + m_parent->addSubscriberProperty( this, "tcsi", "fsm" ); + + m_parent->addSubscriberProperty( this, "dmwoofer", "fsm" ); + m_parent->addSubscriberProperty( this, "wooferModes", "fsm" ); m_parent->addSubscriberProperty( this, "wooferModes", "current_amps" ); m_parent->addSubscriberProperty( this, "camwfs-fit", "fsm" ); @@ -626,15 +642,40 @@ void pupilGuide::onConnect() ui.modCh1->onConnect(); ui.modCh2->onConnect(); + ui.label_tipAlignment->setEnabled(true); + ui.button_ttmtel->setEnabled(true); + + ui.button_camera->setEnabled(true); + + ui.label_tweeter->setEnabled(true); + + ui.labelPupilSteering->setEnabled( true ); ui.pupState->onConnect(); ui.pupCh1->onConnect(); ui.pupCh2->onConnect(); + ui.label_ncpc->setEnabled(false); + + ui.labelTTMPeri->setEnabled( true ); ui.ttmPeriState->onConnect(); ui.ttmPeriCh1->onConnect(); ui.ttmPeriCh2->onConnect(); - ui.labelPupilSteering->setEnabled( true ); + ui.label_pupilPositions->setEnabled(true); + + /* Camera Lens */ + ui.label_camlens->setEnabled( true ); + ui.label_camlensX_fsm->setEnabled( true ); + ui.label_camlensY_fsm->setEnabled( true ); + + ui.camlensX_fsm->onConnect(); + ui.camlensY_fsm->onConnect(); + ui.camlensX_pos->onConnect(); + ui.camlensY_pos->onConnect(); + + ui.fitThreshold->onConnect(); + ui.fitAvgTime->onConnect(); + ui.pupTrackLoop_deltaX->onConnect(); ui.pupTrackLoop_deltaY->onConnect(); @@ -653,14 +694,11 @@ void pupilGuide::onConnect() ui.actAlignSensor_nImages->onConnect(); ui.actAlignSensor_pokeAmp->onConnect(); - /* Camera Lens */ - ui.camlensX_fsm->onConnect(); - ui.camlensY_fsm->onConnect(); - ui.camlensX_pos->onConnect(); - ui.camlensY_pos->onConnect(); - ui.fitThreshold->onConnect(); - ui.fitAvgTime->onConnect(); + camwfs_align_setEnabled(true); + twAlign_camwfs_ctrl_setEnabled(true); + twAlign_camwfs_wfs_setEnabled(true); + alignment_buttons_setEnabled(true); setWindowTitle( "Alignment" ); } @@ -668,18 +706,31 @@ void pupilGuide::onConnect() void pupilGuide::onDisconnect() { m_modFsmState = ""; - m_pupFsmState = ""; + ui.label_modulation->setEnabled( false ); ui.modwfs_fsm->onDisconnect(); ui.modFreq_current->onDisconnect(); ui.modRad_current->onDisconnect(); ui.modCh1->onDisconnect(); ui.modCh2->onDisconnect(); + ui.label_tipAlignment->setEnabled(false); + ui.button_ttmtel->setEnabled(false); + + + ui.button_camera->setEnabled(false); + + ui.label_tweeter->setEnabled(false); + + m_pupFsmState = ""; + ui.labelPupilSteering->setEnabled( false ); ui.pupState->onDisconnect(); ui.pupCh1->onDisconnect(); ui.pupCh2->onDisconnect(); + ui.label_ncpc->setEnabled(false); + + ui.labelTTMPeri->setEnabled( false ); ui.ttmPeriState->onDisconnect(); ui.ttmPeriCh1->onDisconnect(); ui.ttmPeriCh2->onDisconnect(); @@ -689,9 +740,25 @@ void pupilGuide::onDisconnect() m_camwfsavgState = ""; m_camwfsfitState = ""; - ui.label_modulation->setEnabled( false ); + ui.labelPupilFitting->setEnabled( false ); - ui.labelPupilSteering->setEnabled( false ); + + + ui.label_pupilPositions->setEnabled(false); + + /* Camera Lens */ + ui.label_camlens->setEnabled( false ); + ui.label_camlensX_fsm->setEnabled( false ); + ui.label_camlensY_fsm->setEnabled( false ); + + ui.camlensX_fsm->onDisconnect(); + ui.camlensY_fsm->onDisconnect(); + ui.camlensX_pos->onDisconnect(); + ui.camlensY_pos->onDisconnect(); + camlensSetEnabled(false); + + ui.fitThreshold->onDisconnect(); + ui.fitAvgTime->onDisconnect(); ui.pupTrackLoop_deltaX->onDisconnect(); ui.pupTrackLoop_deltaY->onDisconnect(); @@ -710,31 +777,17 @@ void pupilGuide::onDisconnect() ui.actAlignSensor_nImages->onDisconnect(); ui.actAlignSensor_pokeAmp->onDisconnect(); - /* Camera Lens */ - ui.camlensX_fsm->onDisconnect(); - ui.camlensY_fsm->onDisconnect(); - ui.camlensX_pos->onDisconnect(); - ui.camlensY_pos->onDisconnect(); - camlensSetEnabled(false); - - ui.fitThreshold->onDisconnect(); - ui.fitAvgTime->onDisconnect(); + camwfs_align_setEnabled(false); + twAlign_camwfs_ctrl_setEnabled(false); + twAlign_camwfs_wfs_setEnabled(false); + alignment_buttons_setEnabled(false); setWindowTitle( "Alignment (disconnected)" ); } void pupilGuide::handleDefProperty( const pcf::IndiProperty &ipRecv ) { - std::string dev = ipRecv.getDevice(); - if( dev == "modwfs" || dev == "camwfs" || dev == "wooferModes" || dev == "camwfs-avg" || dev == "camwfs-fit" || - /*dev == "fxngenmodwfs" || */ - dev == "ttmpupil" || dev == "camwfs-align" || dev == "stagecamlensx" || dev == "stagecamlensy" || - dev == "dmtweeter" || dev == "dmncpc" || dev == "ttmperi" ) - { - return handleSetProperty( ipRecv ); - } - - return; + return handleSetProperty( ipRecv ); } void pupilGuide::handleSetProperty( const pcf::IndiProperty &ipRecv ) @@ -768,9 +821,36 @@ void pupilGuide::handleSetProperty( const pcf::IndiProperty &ipRecv ) } } } + else if( dev == "tcsi" ) + { + if( ipRecv.getName() == "fsm" ) + { + if( ipRecv.find( "state" ) ) + { + m_tcsiState = ipRecv["state"].get(); + } + } + } + else if( dev == "dmwoofer" ) + { + if( ipRecv.getName() == "fsm" ) + { + if( ipRecv.find( "state" ) ) + { + m_dmWooferState = ipRecv["state"].get(); + } + } + } else if( dev == "wooferModes" ) { - if( ipRecv.getName() == "current_amps" ) + if( ipRecv.getName() == "fsm" ) + { + if( ipRecv.find( "state" ) ) + { + m_wooferModesState = ipRecv["state"].get(); + } + } + else if( ipRecv.getName() == "current_amps" ) { if( ipRecv.find( "0000" ) ) { @@ -1025,14 +1105,10 @@ void pupilGuide::handleSetProperty( const pcf::IndiProperty &ipRecv ) { if( ipRecv["toggle"].getSwitchState() == pcf::IndiElement::On ) { - if( m_camwfsAlignLoopState == false ) - m_camwfsAlignLoopWaiting = false; m_camwfsAlignLoopState = true; } else { - if( m_camwfsAlignLoopState == true ) - m_camwfsAlignLoopWaiting = false; m_camwfsAlignLoopState = false; } } @@ -1209,7 +1285,7 @@ void pupilGuide::modGUISetEnable( bool enableModGUI, bool enableModArrows ) ui.modCh1->setEnabled( false ); ui.modCh2->setEnabled( false ); - if( m_tipmovewhat == MOVE_TTM ) + if(!enableModArrows) { ui.button_tip_ul->setEnabled( false ); ui.button_tip_u->setEnabled( false ); @@ -1237,9 +1313,12 @@ void pupilGuide::modGUISetEnable( bool enableModGUI, bool enableModArrows ) ui.button_tip_d->setEnabled( true ); ui.button_tip_dr->setEnabled( true ); - ui.button_focus_p->setEnabled( true ); - ui.button_focus_scale->setEnabled( true ); - ui.button_focus_m->setEnabled( true ); + if( m_tipmovewhat != MOVE_TTM ) + { + ui.button_focus_p->setEnabled( true ); + ui.button_focus_scale->setEnabled( true ); + ui.button_focus_m->setEnabled( true ); + } } } } @@ -1294,18 +1373,15 @@ void pupilGuide::camlensSetEnabled( bool enabled, { if( whichcl == CAMLENS_BOTH ) { - ui.label_camlens->setEnabled( enabled ); ui.button_camlens_scale->setEnabled( enabled ); } else { - ui.label_camlens->setEnabled( true ); ui.button_camlens_scale->setEnabled( true ); } if( whichcl == CAMLENS_X || whichcl == CAMLENS_BOTH ) { - ui.label_camlensX_fsm->setEnabled( enabled ); ui.camlensX_fsm->setEnabled( enabled ); ui.camlensX_pos->setEnabled( enabled ); ui.button_camlens_l->setEnabled( enabled ); @@ -1314,7 +1390,6 @@ void pupilGuide::camlensSetEnabled( bool enabled, if( whichcl == CAMLENS_Y || whichcl == CAMLENS_BOTH ) { - ui.label_camlensY_fsm->setEnabled( enabled ); ui.camlensY_fsm->setEnabled( enabled ); ui.camlensY_pos->setEnabled( enabled ); ui.button_camlens_u->setEnabled( enabled ); @@ -1322,6 +1397,41 @@ void pupilGuide::camlensSetEnabled( bool enabled, } } +void pupilGuide::camwfs_align_setEnabled( bool enabled ) +{ + ui.label_pupTrackLoop->setEnabled(enabled); + ui.pupTrackLoop_deltaX->setEnabled(enabled); + ui.pupTrackLoop_deltaY->setEnabled(enabled); + ui.pupTrackLoop_slider->setEnabled(enabled); + ui.pupTrackLoop_gain->setEnabled(enabled); +} + +void pupilGuide::twAlign_camwfs_ctrl_setEnabled( bool enabled ) +{ + ui.label_actAlignLoop->setEnabled(enabled); + ui.actAlignLoop_deltaX->setEnabled(enabled); + ui.actAlignLoop_deltaY->setEnabled(enabled); + ui.actAlignLoop_slider->setEnabled(enabled); + ui.actAlignLoop_gain->setEnabled(enabled); +} + +void pupilGuide::twAlign_camwfs_wfs_setEnabled( bool enabled ) +{ + ui.label_actAlignSensor->setEnabled(enabled); + ui.actAlignSensor_slider->setEnabled(enabled); + ui.actAlignSensor_nAverage->setEnabled(enabled); + ui.actAlignSensor_nImages->setEnabled(enabled); + ui.actAlignSensor_pokeAmp->setEnabled(enabled); +} + +void pupilGuide::alignment_buttons_setEnabled( bool enabled ) +{ + ui.label_alignment->setEnabled(enabled); + ui.button_startAlignment->setEnabled(enabled); + ui.button_stopAlignment->setEnabled(enabled); + +} + void pupilGuide::updateGUI() { @@ -1341,6 +1451,22 @@ void pupilGuide::updateGUI() else if( (m_modFsmState != "READY") && (m_modFsmState != "OPERATING") ) { enableModGUI = false; + if( m_tipmovewhat == MOVE_TTM ) + { + enableModArrows = false; + } + } + + //If moving woofer and either woofer or wooferModes aren't ready we disable the arrows + if( m_tipmovewhat == MOVE_WOOF && (m_dmWooferState != "OPERATING" || m_wooferModesState != "READY")) + { + enableModArrows = false; + } + + //If moving telescope and tcsi isn't connected we disable the arrows + if( m_tipmovewhat == MOVE_TEL && (m_tcsiState != "CONNECTED")) + { + enableModArrows = false; } modGUISetEnable( enableModGUI, enableModArrows ); @@ -1528,6 +1654,7 @@ void pupilGuide::updateGUI() if( m_dmncpcState == "READY" || m_dmncpcState == "OPERATING" ) { ui.buttonNCPCTest_set->setEnabled( true ); + if( m_dmncpcTestSet ) { ui.buttonNCPCTest_set->setText( "zero test" ); @@ -1695,7 +1822,6 @@ void pupilGuide::updateGUI() if( ( m_camlensxFsmState == "READY" || m_camlensxFsmState == "OPERATING" ) && ( m_camlensyFsmState == "READY" || m_camlensyFsmState == "OPERATING" ) ) { - camlensSetEnabled( true ); } else if( ( m_camlensxFsmState == "READY" || m_camlensxFsmState == "OPERATING" ) && @@ -1703,16 +1829,21 @@ void pupilGuide::updateGUI() { camlensSetEnabled( true, CAMLENS_X ); camlensSetEnabled( false, CAMLENS_Y ); + ui.camlensY_pos->onDisconnect(); } else if( !( m_camlensxFsmState == "READY" || m_camlensxFsmState == "OPERATING" ) && ( m_camlensyFsmState == "READY" || m_camlensyFsmState == "OPERATING" ) ) { camlensSetEnabled( false, CAMLENS_X ); + ui.camlensX_pos->onDisconnect(); + camlensSetEnabled( true, CAMLENS_Y ); } else { camlensSetEnabled( false ); + ui.camlensX_pos->onDisconnect(); + ui.camlensY_pos->onDisconnect(); } if(m_camlensxFsmState == "SHUTDOWN") @@ -2679,11 +2810,11 @@ void pupilGuide::toggleExpFit( bool st ) if( st ) { - ui.buttonExpFit->setText( "--" ); + ui.buttonExpFit->setIcon( QIcon(":/icons/keyboard_double_arrow_up.png") ); } else { - ui.buttonExpFit->setText( "|" ); + ui.buttonExpFit->setIcon( QIcon(":/icons/keyboard_double_arrow_down.png") ); } } @@ -2726,7 +2857,9 @@ void pupilGuide::on_button_camlens_l_pressed() void pupilGuide::on_button_camlens_d_pressed() { if( m_camlensyFsmState != "READY" ) + { return; + } pcf::IndiProperty ip( pcf::IndiProperty::Number ); @@ -2741,7 +2874,9 @@ void pupilGuide::on_button_camlens_d_pressed() void pupilGuide::on_button_camlens_r_pressed() { if( m_camlensxFsmState != "READY" ) + { return; + } pcf::IndiProperty ip( pcf::IndiProperty::Number ); @@ -2770,16 +2905,63 @@ void pupilGuide::on_button_camlens_scale_pressed() { m_camlensStepSize = 0.005; } - /* else if(((int) (1000*m_camlensStepSize+0.5)) == 5) - { - m_camlensStepSize = 0.001; - }*/ char ss[5]; snprintf( ss, 5, "%0.2f", m_camlensStepSize * 10 ); ui.button_camlens_scale->setText( ss ); } +void pupilGuide::on_button_startAlignment_pressed() +{ + pcf::IndiProperty ip( pcf::IndiProperty::Switch ); + + ip.setDevice( "twAlign-camwfs-wfs" ); + ip.setName( "continuous" ); + ip.add( pcf::IndiElement( "toggle" ) ); + ip["toggle"] = pcf::IndiElement::On; + + sendNewProperty( ip ); + + ip.setDevice( "twAlign-camwfs-ctrl" ); + ip.setName( "loop_state" ); + ip["toggle"] = pcf::IndiElement::On; + + sendNewProperty( ip ); + + + ip.setDevice( "camwfs-align" ); + ip.setName( "loop_state" ); + ip["toggle"] = pcf::IndiElement::On; + + sendNewProperty( ip ); + +} + +void pupilGuide::on_button_stopAlignment_pressed() +{ + pcf::IndiProperty ip( pcf::IndiProperty::Switch ); + + ip.setDevice( "twAlign-camwfs-wfs" ); + ip.setName( "continuous" ); + ip.add( pcf::IndiElement( "toggle" ) ); + ip["toggle"] = pcf::IndiElement::Off; + + sendNewProperty( ip ); + + ip.setDevice( "twAlign-camwfs-ctrl" ); + ip.setName( "loop_state" ); + ip["toggle"] = pcf::IndiElement::Off; + + sendNewProperty( ip ); + + + ip.setDevice( "camwfs-align" ); + ip.setName( "loop_state" ); + ip["toggle"] = pcf::IndiElement::Off; + + sendNewProperty( ip ); +} + } // namespace xqt #include "moc_pupilGuide.cpp" diff --git a/gui/widgets/pupilGuide/pupilGuide.ui b/gui/widgets/pupilGuide/pupilGuide.ui index eab28671a..f3b7a8f9a 100644 --- a/gui/widgets/pupilGuide/pupilGuide.ui +++ b/gui/widgets/pupilGuide/pupilGuide.ui @@ -6,8 +6,8 @@ 0 0 - 2222 - 872 + 2090 + 926 @@ -428,7 +428,8 @@ - :/icons/arrow_up_128.png:/icons/arrow_up_128.png + :/icons/arrow_up_128.png + :/icons/arrow_up_dark_128.png:/icons/arrow_up_128.png @@ -830,7 +831,7 @@ - + 0 @@ -1240,7 +1241,7 @@ - + 0 @@ -1500,7 +1501,8 @@ - :/icons/arrow_up_128.png:/icons/arrow_up_128.png + :/icons/arrow_up_128.png + :/icons/arrow_up_dark_128.png:/icons/arrow_up_128.png @@ -1815,25 +1817,53 @@ - - - - - - 30 - 30 - - + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + + 16777215 + 64 + + + + + 12 + + + + Pupil Positions + + + Qt::AlignCenter + + + + + + + Qt::NoFocus - - | + + Qt::AlignCenter - - + + Qt::NoFocus @@ -1842,8 +1872,8 @@ - - + + Qt::NoFocus @@ -1852,15 +1882,8 @@ - - - - Avg: - - - - - + + Qt::NoFocus @@ -1869,8 +1892,8 @@ - - + + Qt::NoFocus @@ -1879,25 +1902,18 @@ - - - - y + + + + Qt::NoFocus Qt::AlignCenter - - - - UR - - - - - + + Qt::NoFocus @@ -1906,25 +1922,22 @@ - + LR - - + + - x - - - Qt::AlignCenter + LL - - + + Qt::NoFocus @@ -1933,18 +1946,25 @@ - - - - Qt::NoFocus + + + + y Qt::AlignCenter - - + + + + UR + + + + + Qt::NoFocus @@ -1953,7 +1973,14 @@ - + + + + UL + + + + Qt::NoFocus @@ -1963,8 +1990,8 @@ - - + + Qt::NoFocus @@ -1973,10 +2000,10 @@ - - - - Qt::NoFocus + + + + D Qt::AlignCenter @@ -1984,7 +2011,7 @@ - + Qt::NoFocus @@ -1993,7 +2020,14 @@ - + + + + Avg: + + + + Qt::NoFocus @@ -2003,32 +2037,38 @@ - - - - UL + + + + + 30 + 30 + + + + Qt::NoFocus - - - - - LL + + + + + :/icons/keyboard_double_arrow_down.png:/icons/keyboard_double_arrow_down.png - - + + - D + x Qt::AlignCenter - - + + Qt::NoFocus @@ -2037,8 +2077,8 @@ - - + + Qt::NoFocus @@ -2384,7 +2424,8 @@ - :/icons/arrow_up_128.png:/icons/arrow_up_128.png + :/icons/arrow_up_128.png + :/icons/arrow_up_dark_128.png:/icons/arrow_up_128.png @@ -2485,7 +2526,7 @@ - + @@ -2845,6 +2886,65 @@ + + + + + 12 + + + + Alignment + + + Qt::AlignCenter + + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + start + + + + + + + stop + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + +