Changeset 13923 for trunk/FACT++/gui
- Timestamp:
- 05/26/12 15:32:27 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/gui/FactGui.h
r13840 r13923 19 19 #include "src/Converter.h" 20 20 #include "src/Configuration.h" 21 #include "src/HeadersFTM.h"22 #include "src/HeadersFAD.h"23 #include "src/HeadersBIAS.h"24 21 #include "src/DimNetwork.h" 25 22 #include "src/tools.h" 26 #include "src/FAD.h"27 23 #include "src/PixelMap.h" 28 24 #include "src/DimData.h" … … 41 37 42 38 #include "QCameraWidget.h" 39 40 #include "src/FAD.h" 41 #include "src/HeadersFTM.h" 42 #include "src/HeadersFAD.h" 43 #include "src/HeadersBIAS.h" 44 #include "src/HeadersDrive.h" 43 45 44 46 using namespace std; … … 2596 2598 bool enable = false; 2597 2599 const bool configuring = 2598 s.index==FTM::State Machine::kConfiguring1 ||2599 s.index==FTM::State Machine::kConfiguring2 ||2600 s.index==FTM::State Machine::kConfigured;2601 2602 if (s.index<FTM::State Machine::kDisconnected) // No Dim connection2600 s.index==FTM::State::kConfiguring1 || 2601 s.index==FTM::State::kConfiguring2 || 2602 s.index==FTM::State::kConfigured; 2603 2604 if (s.index<FTM::State::kDisconnected) // No Dim connection 2603 2605 SetLedColor(fStatusFTMLed, kLedGray, time); 2604 if (s.index==FTM::State Machine::kDisconnected) // Dim connection / FTM disconnected2606 if (s.index==FTM::State::kDisconnected) // Dim connection / FTM disconnected 2605 2607 SetLedColor(fStatusFTMLed, kLedYellow, time); 2606 if (s.index==FTM::State Machine::kConnected ||2607 s.index==FTM::State Machine::kIdle ||2608 if (s.index==FTM::State::kConnected || 2609 s.index==FTM::State::kIdle || 2608 2610 configuring) // Dim connection / FTM connected 2609 2611 SetLedColor(fStatusFTMLed, kLedGreen, time); 2610 if (s.index==FTM::State Machine::kTriggerOn) // Dim connection / FTM connected2612 if (s.index==FTM::State::kTriggerOn) // Dim connection / FTM connected 2611 2613 SetLedColor(fStatusFTMLed, kLedGreenCheck, time); 2612 if (s.index==FTM::State Machine::kConnected ||2613 s.index==FTM::State Machine::kIdle) // Dim connection / FTM connected2614 if (s.index==FTM::State::kConnected || 2615 s.index==FTM::State::kIdle) // Dim connection / FTM connected 2614 2616 enable = true; 2615 2617 2616 2618 fFtmStartRun->setEnabled(!configuring && enable); 2617 fFtmStopRun->setEnabled(!configuring && (enable || s.index==FTM::State Machine::kTriggerOn));2619 fFtmStopRun->setEnabled(!configuring && (enable || s.index==FTM::State::kTriggerOn)); 2618 2620 2619 2621 fTriggerWidget->setEnabled(enable); 2620 2622 fFtuGroupEnable->setEnabled(enable); 2621 2623 fRatesControls->setEnabled(enable); 2622 fFtuWidget->setEnabled(s.index>FTM::State Machine::kDisconnected);2623 2624 if (s.index>=FTM::State Machine::kConnected)2624 fFtuWidget->setEnabled(s.index>FTM::State::kDisconnected); 2625 2626 if (s.index>=FTM::State::kConnected) 2625 2627 SetFtuStatusLed(time); 2626 2628 else … … 2639 2641 bool enable = false; 2640 2642 2641 if (s.index<FAD:: kOffline) // No Dim connection2643 if (s.index<FAD::State::kOffline) // No Dim connection 2642 2644 { 2643 2645 SetLedColor(fStatusFADLed, kLedGray, time); … … 2655 2657 */ 2656 2658 } 2657 if (s.index==FAD:: kOffline) // Dim connection / FTM disconnected2659 if (s.index==FAD::State::kOffline) // Dim connection / FTM disconnected 2658 2660 SetLedColor(fStatusFADLed, kLedRed, time); 2659 if (s.index==FAD:: kDisconnected) // Dim connection / FTM disconnected2661 if (s.index==FAD::State::kDisconnected) // Dim connection / FTM disconnected 2660 2662 SetLedColor(fStatusFADLed, kLedOrange, time); 2661 if (s.index==FAD:: kConnecting) // Dim connection / FTM disconnected2663 if (s.index==FAD::State::kConnecting) // Dim connection / FTM disconnected 2662 2664 { 2663 2665 SetLedColor(fStatusFADLed, kLedYellow, time); … … 2665 2667 enable = true; 2666 2668 } 2667 if (s.index>=FAD:: kConnected) // Dim connection / FTM connected2669 if (s.index>=FAD::State::kConnected) // Dim connection / FTM connected 2668 2670 { 2669 2671 SetLedColor(fStatusFADLed, kLedGreen, time); … … 2673 2675 fFadWidget->setEnabled(enable); 2674 2676 2675 fFadStart->setEnabled (s.index==FAD::kOffline);2676 fFadStop->setEnabled (s.index>FAD::kOffline);2677 fFadAbort->setEnabled (s.index>FAD::kOffline);2678 fFadSoftReset->setEnabled(s.index >FAD::kOffline);2679 fFadHardReset->setEnabled(s.index >FAD::kOffline);2677 fFadStart->setEnabled (s.index==FAD::State::kOffline); 2678 fFadStop->setEnabled (s.index >FAD::State::kOffline); 2679 fFadAbort->setEnabled (s.index >FAD::State::kOffline); 2680 fFadSoftReset->setEnabled(s.index >FAD::State::kOffline); 2681 fFadHardReset->setEnabled(s.index >FAD::State::kOffline); 2680 2682 } 2681 2683 … … 2711 2713 if (s.index==2 || s.index==3) // Not Ready 2712 2714 SetLedColor(fStatusDriveLed, kLedGreenBar, time); 2713 if (s.index== 4 || s.index==5) // Connected / Armed2715 if (s.index==Drive::State::kConnected || s.index==Drive::State::kArmed) // Connected / Armed 2714 2716 SetLedColor(fStatusDriveLed, kLedGreen, time); 2715 if (s.index== 6) // Moving2717 if (s.index==Drive::State::kMoving) // Moving 2716 2718 SetLedColor(fStatusDriveLed, kLedInProgress, time); 2717 if (s.index== 7) // Tracking2719 if (s.index==Drive::State::kTracking) // Tracking 2718 2720 SetLedColor(fStatusDriveLed, kLedGreenCheck, time); 2719 2721 if (s.index==99) // Error … … 2728 2730 if (s.index<1) // No Dim connection 2729 2731 SetLedColor(fStatusBiasLed, kLedGray, time); 2730 if (s.index==BIAS:: kDisconnected) // Dim connection / FTM disconnected2732 if (s.index==BIAS::State::kDisconnected) // Dim connection / FTM disconnected 2731 2733 SetLedColor(fStatusBiasLed, kLedRed, time); 2732 if (s.index==BIAS:: kConnecting || s.index==BIAS::kInitializing) // Connecting / Initializing2734 if (s.index==BIAS::State::kConnecting || s.index==BIAS::State::kInitializing) // Connecting / Initializing 2733 2735 SetLedColor(fStatusBiasLed, kLedOrange, time); 2734 if (s.index==BIAS:: kVoltageOff) // At reference2736 if (s.index==BIAS::State::kVoltageOff) // At reference 2735 2737 SetLedColor(fStatusBiasLed, kLedGreenBar, time); 2736 if (s.index==BIAS:: kNotReferenced) // At reference2738 if (s.index==BIAS::State::kNotReferenced) // At reference 2737 2739 SetLedColor(fStatusBiasLed, kLedGreenWarn, time); 2738 if (s.index==BIAS:: kRamping) // Ramping2740 if (s.index==BIAS::State::kRamping) // Ramping 2739 2741 SetLedColor(fStatusBiasLed, kLedInProgress, time); 2740 if (s.index==BIAS:: kVoltageOn) // At reference2742 if (s.index==BIAS::State::kVoltageOn) // At reference 2741 2743 SetLedColor(fStatusBiasLed, kLedGreenCheck, time); 2742 if (s.index==BIAS:: kOverCurrent) // Over current2744 if (s.index==BIAS::State::kOverCurrent) // Over current 2743 2745 SetLedColor(fStatusBiasLed, kLedWarnBorder, time); 2744 if (s.index==BIAS:: kExpertMode) // ExpertMode2746 if (s.index==BIAS::State::kExpertMode) // ExpertMode 2745 2747 SetLedColor(fStatusBiasLed, kLedWarnTriangleBorder, time); 2746 2748
Note:
See TracChangeset
for help on using the changeset viewer.