/daq/adas

To get this branch, use:
bzr branch http://suren.me/webbzr/daq/adas

« back to all changes in this revision

Viewing changes to adas/namt/namtreader.c

  • Committer: Suren A. Chilingaryan
  • Date: 2006-11-20 23:50:44 UTC
  • Revision ID: Arch-1:ds@dside.dyndns.org--darksoft-2004%adas--main--3.1--patch-8
SNT microcode fixes
    - Do not drop synchronization at PREPARE_SYNC request
    

Show diffs side-by-side

added added

removed removed

Lines of Context:
166
166
 
167
167
 
168
168
    dsWait(dev->high_read_pause);
169
 
    res = SendSimple(con, COMMAND_REQUEST_PREPARE_SYNC);
170
 
    if (res != COMMAND_RESPONSE_PREPARE_SYNC) {
171
 
        dsTimeDestroy(nexttime);
172
 
        dsTimeDestroy(ttmp);
173
 
        return namtError(dev, con, COMMAND_REQUEST_PREPARE_SYNC, res);
 
169
    
 
170
    if (dev->prepare_sync) {
 
171
        res = SendSimple(con, COMMAND_REQUEST_PREPARE_SYNC);
 
172
        if (res != COMMAND_RESPONSE_PREPARE_SYNC) {
 
173
            dsTimeDestroy(nexttime);
 
174
            dsTimeDestroy(ttmp);
 
175
            return namtError(dev, con, COMMAND_REQUEST_PREPARE_SYNC, res);
 
176
        }
174
177
    }
175
178
 
176
179
    dsTimeCurrentTime(ttmp);
840
843
                dev->coincidences = 0;
841
844
                dev->spectrums = 0;
842
845
            }
 
846
            
 
847
            
 
848
            if (device_type == NAMTDEVICE_TYPE_NAMT) {
 
849
                if (device_version > 4) dev->prepare_sync = 1;
 
850
                else dev->prepare_sync = 0;
 
851
            } else {
 
852
                if (device_version > 3) dev->prepare_sync = 1;
 
853
                else dev->prepare_sync = 0;
 
854
            }
 
855
            
843
856
 
844
857
            cfgnode = dsConfigGetConfigByReference(dev->device.cfg, dev->device.cfgref);
845
858
            if (cfgnode) {