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

Method previousFrame

app/src/CSV/Player.cpp:272–285  ·  view source on GitHub ↗

* @brief Steps back to the previous CSV row, capped at the first row. */

Source from the content-addressed store, hash-verified

270 * @brief Steps back to the previous CSV row, capped at the first row.
271 */
272void CSV::Player::previousFrame()
273{
274 if (framePosition() > 0) {
275 --m_framePos;
276
277 UI::Dashboard::instance().clearPlotData();
278
279 int framesToLoad = UI::Dashboard::instance().points();
280 int startFrame = std::max(1, m_framePos - framesToLoad);
281 processFrameBatch(startFrame, m_framePos);
282
283 updateData();
284 }
285}
286
287/**
288 * @brief Reads CSV rows from the stream into m_csvData up to kMaxCsvRows.

Callers 2

stepMethod · 0.45
stepMethod · 0.45

Calls 2

clearPlotDataMethod · 0.80
pointsMethod · 0.45

Tested by

no test coverage detected