Changeset 17640
- Timestamp:
- 03/31/14 16:16:52 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/src/biasctrl.cc
r17515 r17640 1605 1605 1606 1606 bool fExpertMode; 1607 bool fEmergencyShutdown;1608 1607 1609 1608 Time fSunRise; … … 1867 1866 { 1868 1867 fBias.RampAllDacs(0); 1869 fEmergencyShutdown = true; 1870 T::Info("Emergency Sutdown initiated."); 1871 return T::GetCurrentState(); 1868 T::Info("Emergency shutdown initiated."); 1869 return State::kLocked; 1872 1870 } 1873 1871 1874 1872 int Unlock() 1875 1873 { 1876 fEmergencyShutdown = false; 1877 return T::GetCurrentState(); 1874 return fBias.GetStatus(); 1878 1875 } 1879 1876 … … 1885 1882 if (now>fSunRise) 1886 1883 { 1887 if (state==State::kRamping || 1888 state==State::kVoltageOn || 1889 state==State::kNotReferenced) 1890 return Shutdown(); 1891 1892 if (state==State::kLocked) 1884 if ((state==State::kRamping || 1885 state==State::kVoltageOn || 1886 state==State::kNotReferenced || 1887 state==State::kOverCurrent)) 1893 1888 { 1894 fSunRise = now.GetNextSunRise(-6); 1895 1896 ostringstream msg; 1897 msg << "Next sun-rise will be at " << fSunRise; 1898 T::Info(msg); 1899 1900 return T::GetCurrentState(); 1889 T::Error("Voltage on at end of nautical twilight!"); 1890 Shutdown(); 1901 1891 } 1902 } 1903 1904 if (T::GetCurrentState()==State::kVoltageOff && T::GetCurrentState()==State::kLocked) 1892 1893 fSunRise = now.GetNextSunRise(-6); 1894 1895 ostringstream msg; 1896 msg << "During next sun-rise nautical twilight will end at " << fSunRise; 1897 T::Info(msg); 1898 1905 1899 return State::kLocked; 1906 1900 } 1901 1907 1902 if (fExpertMode && state>=State::kConnected) 1908 1903 return State::kExpertMode;
Note:
See TracChangeset
for help on using the changeset viewer.