Changeset 16696 for trunk


Ignore:
Timestamp:
06/04/13 19:43:24 (11 years ago)
Author:
tbretz
Message:
Ignore non finite values. This can happen if a board is diabled and there is a devision by zero; fixed the size.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/FACT++/gui/FactGui.h

    r16692 r16696  
    811811        }
    812812
    813         if (!CheckSize(d, sizeof(uint16_t)+40*sizeof(float)))
     813        if (!CheckSize(d, sizeof(uint16_t)+160*sizeof(float)))
    814814            return;
    815815
     
    826826        for (int i=0; i<160; i++)
    827827        {
     828            if (!finite(ptr[i])
     829                continue;
     830
    828831            if (ptr[i]<min)
    829832                min = ptr[i];
     
    854857        }
    855858
    856         if (!CheckSize(d, sizeof(uint16_t)+160*sizeof(float)))
     859        if (!CheckSize(d, sizeof(uint16_t)+40*sizeof(float)))
    857860            return;
    858861
     
    866869        for (int i=0; i<40; i++)
    867870        {
     871            if (!finite(ptr[i])
     872                continue;
     873
    868874            if (ptr[i]<min)
    869875                min = ptr[i];
Note: See TracChangeset for help on using the changeset viewer.