Changeset 16054
- Timestamp:
- 05/22/13 22:39:04 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/src/pwrctrl.cc
r15633 r16054 263 263 int GetState() const 264 264 { 265 using namespace Power::State;266 267 265 // Timeout 268 266 if (!fLastReport.IsValid() || Time()>fLastReport+boost::posix_time::seconds(fInterval*3)) 269 return kDisconnected;267 return Power::State::kDisconnected; 270 268 271 269 // No data received yet 272 270 if (!fIsValid) 273 return kConnected;271 return Power::State::kConnected; 274 272 275 273 /* … … 285 283 286 284 if (!fStatus.fWaterLevelOk || (fStatus.fPwrPumpOn && !fStatus.fWaterFlowOk)) 287 return kCoolingFailure;285 return Power::State::kCoolingFailure; 288 286 289 287 const int rc = 290 (fStatus.fPwrBiasOn ? kBiasOn : 0) |291 (fStatus.fPwrPumpOn ? kCameraOn : 0) |292 (fStatus.fDriveFeedbackOn ? kDriveOn : 0);293 294 return rc==0 ? kSystemOff : rc;288 (fStatus.fPwrBiasOn ? Power::State::kBiasOn : 0) | 289 (fStatus.fPwrPumpOn ? Power::State::kCameraOn : 0) | 290 (fStatus.fDriveFeedbackOn ? Power::State::kDriveOn : 0); 291 292 return rc==0 ? Power::State::kSystemOff : rc; 295 293 } 296 294 }; … … 404 402 const int rc = fPower.GetState(); 405 403 406 if (rc==Power::State::kCoolingFailure && GetCurrentState()!=Power::State::kCoolingFailure)407 Error("Power control unit reported cooling failure.");404 if (rc==Power::State::kCoolingFailure && T::GetCurrentState()!=Power::State::kCoolingFailure) 405 T::Error("Power control unit reported cooling failure."); 408 406 409 407 return fPower.GetState();
Note:
See TracChangeset
for help on using the changeset viewer.