Changeset 13483
- Timestamp:
- 04/30/12 22:57:32 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/src/smartfact.cc
r13479 r13483 48 48 pair<Time, int> fStatusDriveControl; 49 49 pair<Time, int> fStatusMagicWeather; 50 pair<Time, int> fStatusFeedback; 50 51 pair<Time, int> fStatusBiasControl; 51 52 pair<Time, int> fStatusFadControl; … … 60 61 DimStampedInfo fDimMagicWeather; 61 62 DimStampedInfo fDimMagicWeatherData; 63 64 DimStampedInfo fDimFeedbackCalibration; 62 65 63 66 DimStampedInfo fDimBiasControl; … … 226 229 } 227 230 231 void HandleFeedbackCalibration(const DimData &d) 232 { 233 if (!CheckDataSize(d, "BiasControl:Voltage", 1664)) 234 return; 235 236 vector<float> v(d.ptr<float>(), d.ptr<float>()+320); 237 sort(v.begin(), v.end()); 238 239 fBiasControlVoltageMed = (v[159]+v[160])/2; 240 241 const char *ptr = d.ptr<char>(); 242 243 ofstream fout("www/biascontrol-voltage.bin"); 244 fout.write(ptr, 320*sizeof(float)); 245 } 246 228 247 void HandleBiasControlVoltage(const DimData &d) 229 248 { … … 309 328 return; 310 329 311 if (HandleService(curr, fDimMagicWeatherData, &StateMachineSmartFACT::HandleMagicWeatherData)) 312 return; 313 if (HandleService(curr, fDimBiasControlVoltage, &StateMachineSmartFACT::HandleBiasControlVoltage)) 314 return; 315 if (HandleService(curr, fDimBiasControlCurrent, &StateMachineSmartFACT::HandleBiasControlCurrent)) 330 if (HandleService(curr, fDimMagicWeatherData, &StateMachineSmartFACT::HandleMagicWeatherData)) 331 return; 332 if (HandleService(curr, fDimFeedbackCalibration, &StateMachineSmartFACT::HandleFeedbackCalibration)) 333 return; 334 if (HandleService(curr, fDimBiasControlVoltage, &StateMachineSmartFACT::HandleBiasControlVoltage)) 335 return; 336 if (HandleService(curr, fDimBiasControlCurrent, &StateMachineSmartFACT::HandleBiasControlCurrent)) 316 337 return; 317 338 if (HandleService(curr, *fDimFadControlEventData, &StateMachineSmartFACT::HandleFadControlEventData)) … … 319 340 320 341 if (UpdateState(curr, fDimMagicWeather, fStatusMagicWeather)) 342 return; 343 if (UpdateState(curr, fDimFeedback, fStatusFeedback)) 321 344 return; 322 345 if (UpdateState(curr, fDimBiasControl, fStatusBiasControl)) … … 370 393 PrintState(fStatusMagicWeather, "MAGIC_WEATHER"); 371 394 PrintState(fStatusDriveControl, "DRIVE_CONTROL"); 395 PrintState(fStatusFeedback, "FEEDBACK"); 372 396 PrintState(fStatusBiasControl, "BIAS_CONTROL"); 373 397 PrintState(fStatusFadControl, "FAD_CONTROL"); … … 473 497 fStatusDriveControl(make_pair(Time(), -2)), 474 498 fStatusMagicWeather(make_pair(Time(), -2)), 499 fStatusFeedback (make_pair(Time(), -2)), 475 500 fStatusBiasControl (make_pair(Time(), -2)), 476 501 fStatusFadControl (make_pair(Time(), -2)), … … 485 510 fDimMagicWeather ("MAGIC_WEATHER/STATE", (void*)NULL, 0, this), 486 511 fDimMagicWeatherData ("MAGIC_WEATHER/DATA", (void*)NULL, 0, this), 512 //--- 513 fDimFeedback ("FEEDBACK/STATE", (void*)NULL, 0, this), 514 fDimFeedbackCalibration ("FEEDBACK/CALIBRATION", (void*)NULL, 0, this), 487 515 //--- 488 516 fDimBiasControl ("BIAS_CONTROL/STATE", (void*)NULL, 0, this),
Note:
See TracChangeset
for help on using the changeset viewer.