Skip to content

refactor: improve ECG buffer and sample tracking

Dharamveer requested to merge dharmveer-dev into master
  • Rename sample and buffer variables to clarify global scope
  • Replace m_MaxSamples with m_MaxBufferSize
  • Replace m_SampleCounter with m_GlobalSampleCounter
  • Rename buffer initial sample tracking for consistency
  • Add per-lead buffer initial sample tracking
  • Initialize all extraction state explicitly in the constructor
  • Track previous lead count and reinitialize extraction on changes
  • Reset per-lead counters and buffer state during extraction reset
  • Update lead buffer initialization and reservation logic
  • Validate lead count and input sample size in AddLeadSample
  • Return failure when invalid lead data is provided
  • Maintain independent sample counters for each lead
  • Use global sample counter for absolute R-peak index calculation
  • Update buffer index to global sample index conversion
  • Replace lead count types with size_t for vector-size consistency
  • Remove redundant flat-segment diagnostic output
  • Update unit and dataset validation tests for renamed state variables
  • Enforce failure expectation for insufficient extraction input
  • Update CMake modules dependency to the latest required revision
  • Clean up unused CSV error logging in dataset tests

Merge request reports

Loading