mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-26 00:00:02 +02:00
ctb server: sync is min clock and must go higher when the others do
This commit is contained in:
parent
c38bebd615
commit
fc0306564c
@ -1783,21 +1783,25 @@ void configureSyncFrequency(enum CLKINDEX ind) {
|
||||
|
||||
int configure = 0;
|
||||
|
||||
// sync is greater than current
|
||||
// find the smallest frequency
|
||||
int min = (aFreq < bFreq) ? aFreq : bFreq;
|
||||
min = (retval < min) ? retval : min;
|
||||
|
||||
// sync is greater than min
|
||||
if (syncFreq > retval) {
|
||||
FILE_LOG(logINFO, ("\t--Configuring Sync Clock\n"));
|
||||
configure = 1;
|
||||
}
|
||||
|
||||
// the others are both greater than current
|
||||
else if ((aFreq > retval && bFreq > retval)) {
|
||||
// sync is smaller than min
|
||||
else if (syncFreq < min) {
|
||||
FILE_LOG(logINFO, ("\t++Configuring Sync Clock\n"));
|
||||
configure = 1;
|
||||
}
|
||||
|
||||
// configure sync to current
|
||||
if (configure)
|
||||
configureFrequency(SYNC_CLK, retval);
|
||||
configureFrequency(SYNC_CLK, min);
|
||||
}
|
||||
|
||||
void setAdcOffsetRegister(int adc, int val) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user