Changeset 455 in flair-src for trunk/tools/FlairGCS/src/Layout.cpp


Ignore:
Timestamp:
10/04/21 10:03:51 (16 months ago)
Author:
Sanahuja Guillaume
Message:

gcs: add compatibility with programs without nb_buffering

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/FlairGCS/src/Layout.cpp

    r437 r455  
    160160    uint16_t period = dom->attribute("period").toUShort();
    161161    uint16_t nb_buffering = dom->attribute("nb_buf").toUShort();
     162    if(period==0) period=100;
    162163    if (enabled == 1) {
    163164      widget = new DataPlot1D(this, row, col, name, ymin, ymax, true, period,nb_buffering);
    164165    } else {
    165       widget = new DataPlot1D(this, row, col, name, ymin, ymax, false, 100,nb_buffering);
     166      widget = new DataPlot1D(this, row, col, name, ymin, ymax, false, period,nb_buffering);
    166167    }
    167168  }
     
    176177    uint16_t period = dom->attribute("period").toUShort();
    177178    uint16_t nb_buffering = dom->attribute("nb_buf").toUShort();
     179    if(period==0) period=100;
    178180    if (enabled == 1) {
    179181      widget = new DataPlot2D(this, row, col, name, x_name, y_name, xmin, xmax,
     
    181183    } else {
    182184      widget = new DataPlot2D(this, row, col, name, x_name, y_name, xmin, xmax,
    183                               ymin, ymax, false, 100,nb_buffering);
     185                              ymin, ymax, false, period,nb_buffering);
    184186    }
    185187  }
     
    192194    QString type = dom->attribute("type");
    193195    int samples = dom->attribute("samples").toInt();
     196    if(period==0) period=100;
    194197    if (enabled == 1) {
    195198      widget = new UsSensorPlot(this, row, col, name, y_name,
     
    197200    } else {
    198201      widget = new UsSensorPlot(this, row, col, name,  y_name,
    199                               ymin, ymax, samples,type,false, 100);
     202                              ymin, ymax, samples,type,false, period);
    200203    }
    201204  }
     
    220223      invert_axis_bool = true;
    221224    }
     225    if(period==0) period=100;
    222226    if (enabled == 1) {
    223227      widget =
     
    229233          new RangeFinderPlot(this, row, col, name, x_name, y_name, xmin, xmax,
    230234                              ymin, ymax, start_angle, end_angle, nb_samples,
    231                               data_type, invert_axis, false, 100);
     235                              data_type, invert_axis, false, period);
    232236    }
    233237  }
     
    237241    int enabled = dom->attribute("enabled").toInt();
    238242    uint16_t period = dom->attribute("period").toUShort();
     243    if(period==0) period=100;
    239244    if (enabled == 1) {
    240245      widget = new Picture(this, row, col, name, width, height, true, period);
     
    257262      i++;
    258263    }
    259 
     264    if(period==0) period=100;
    260265    if (enabled == 1) {
    261266      widget = new Map(this, row, col, name, coordinates, true, period);
Note: See TracChangeset for help on using the changeset viewer.