Changeset 11958 for trunk


Ignore:
Timestamp:
09/02/11 15:59:52 (13 years ago)
Author:
tbretz
Message:
Make a trick to work around the -0 problem when signalling the over current status.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/FACT++/src/biasctrl.cc

    r11953 r11958  
    256256            }
    257257
    258             fCurrent[id]    = status ? -ddd : ddd;
     258            // There is no -0 therefore we make a trick and replace it by -1.
     259            // This is not harmfull, because typical zero currents are in the
     260            // order of one to three bits anyway and they are never stable.
     261            fCurrent[id]    = status ? -(ddd==0?1:ddd) : ddd;
    259262            fPresent[board] = true;
    260263        }
Note: See TracChangeset for help on using the changeset viewer.