MCPcopy Create free account
hub / github.com/Serial-Studio/Serial-Studio / normalizeDatasetRanges

Function normalizeDatasetRanges

app/src/DataModel/Frame.h:1323–1333  ·  view source on GitHub ↗

* @brief Swaps inverted (min > max) FFT / plot / widget range pairs from legacy projects. */

Source from the content-addressed store, hash-verified

1321 * @brief Swaps inverted (min > max) FFT / plot / widget range pairs from legacy projects.
1322 */
1323inline void normalizeDatasetRanges(Dataset& d)
1324{
1325 if (d.fftMin > d.fftMax)
1326 std::swap(d.fftMin, d.fftMax);
1327
1328 if (d.pltMin > d.pltMax)
1329 std::swap(d.pltMin, d.pltMax);
1330
1331 if (d.wgtMin > d.wgtMax)
1332 std::swap(d.wgtMin, d.wgtMax);
1333}
1334
1335/**
1336 * @brief Deserializes a Dataset from a QJsonObject.

Callers 1

readMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected