Changeset 443 in flair-src for trunk/tools/FlairGCS/src/DataPlot1D.cpp
- Timestamp:
- 09/09/21 17:06:34 (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/FlairGCS/src/DataPlot1D.cpp
r437 r443 76 76 } 77 77 78 void DataPlot1D::BufEvent(char **buf, int *buf_size, uint16_t period, 78 void DataPlot1D::BufEvent(char **buf, int *buf_size, uint16_t period,uint16_t nb_buffering, 79 79 bool big_endian) { 80 80 setEnabled(IsEnabled()); 81 if (IsEnabled() == false || RefreshRate_ms() != period) 82 return; 81 if (IsEnabled() == false || RefreshRate_ms() != period) return; 83 82 double *datas = (double *)malloc(datas_type.count() * sizeof(double)); 84 83 … … 89 88 memcpy((void *)&data_raw, *buf, sizeof(uint32_t)); 90 89 *buf += sizeof(uint32_t); 91 if (big_endian == true) 92 data_raw = qFromBigEndian(data_raw); 90 if (big_endian == true) data_raw = qFromBigEndian(data_raw); 93 91 datas[i] = *data; 94 92 } else if (datas_type.at(i) == "int8_t") { … … 101 99 memcpy((void *)&data, *buf, sizeof(data)); 102 100 *buf += sizeof(data); 103 if (big_endian == true) 104 data = qFromBigEndian(data); 101 if (big_endian == true) data = qFromBigEndian(data); 105 102 datas[i] = data; 106 103 } else { 107 fprintf(stderr,"DataPlot1D::BufEvent unknown type %s\n", 108 datas_type.at(i).toLocal8Bit().constData()); 104 fprintf(stderr,"DataPlot1D::BufEvent unknown type %s\n",datas_type.at(i).toLocal8Bit().constData()); 109 105 } 110 106 }
Note:
See TracChangeset
for help on using the changeset viewer.