Changeset 13455
- Timestamp:
- 04/26/12 10:54:49 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/src/biasctrl.cc
r13340 r13455 69 69 vector<int16_t> fCurrent; // Current in ADC units (12bit = 5mA) 70 70 71 virtual void UpdateA ()72 { 73 } 74 75 virtual void UpdateV( )71 virtual void UpdateAV() 72 { 73 } 74 75 virtual void UpdateV(const Time = Time()) 76 76 { 77 77 } … … 373 373 // Check if new values have been received 374 374 if (cmd==kCmdRead || cmd==kCmdChannelSet || cmd==kExpertChannelSet) 375 { 376 UpdateV(); 377 UpdateA(); 378 } 375 UpdateAV(); 379 376 380 377 // ----- Take action depending on what is going on ----- … … 1492 1489 DimDescribedService fDimGapd; 1493 1490 1494 void UpdateA() 1495 { 1491 void UpdateAV() 1492 { 1493 const Time now; 1494 fDimCurrent.setTime(now); 1496 1495 fDimCurrent.Update(fCurrent); 1497 } 1498 1499 void UpdateV() 1500 { 1496 1497 UpdateV(now); 1498 } 1499 1500 void UpdateV(const Time now=Time()) 1501 { 1502 const bool rc = !memcmp(fDacActual.data(), fDacTarget.data(), kNumChannels*2); 1503 1501 1504 vector<uint16_t> val(2*kNumChannels); 1502 1505 memcpy(val.data(), fDacActual.data(), kNumChannels*2); 1503 1506 memcpy(val.data()+kNumChannels, fDacTarget.data(), kNumChannels*2); 1507 fDimDac.setTime(now); 1508 fDimDac.setQuality(rc); 1504 1509 fDimDac.Update(val); 1505 1510 … … 1507 1512 for (float ch=0; ch<kNumChannels; ch++) 1508 1513 volt[ch] = fDacActual[ch]*90./4096 - fChannelCalibration[ch]; 1514 fDimVolt.setTime(now); 1515 fDimVolt.setQuality(rc); 1509 1516 fDimVolt.Update(volt); 1510 1517 }
Note:
See TracChangeset
for help on using the changeset viewer.