Revert "Fix HRV RMSSD calculation window size"

This reverts commit fd3611298e.
This commit is contained in:
Roberto Viola
2026-01-27 10:35:05 +01:00
parent fd3611298e
commit f7951b4562

View File

@@ -195,11 +195,9 @@ void bluetoothdevice::skinTemperature(double skinTemperature) { SkinTemperature.
void bluetoothdevice::heatStrainIndex(double heatStrainIndex) { HeatStrainIndex.setValue(heatStrainIndex); } void bluetoothdevice::heatStrainIndex(double heatStrainIndex) { HeatStrainIndex.setValue(heatStrainIndex); }
void bluetoothdevice::rrIntervalReceived(double rrInterval) { void bluetoothdevice::rrIntervalReceived(double rrInterval) {
// RR-interval is in milliseconds // RR-interval is in milliseconds
// Add to buffer for RMSSD calculation (keep max 30 samples for real-time HRV display) // Add to buffer for RMSSD calculation (keep max 120 samples, approximately 2 minutes of data)
// Using 30 samples (~20-30 seconds of data) gives more responsive and accurate HRV
// than using longer windows which can include heart rate transitions
rrIntervals.append(rrInterval); rrIntervals.append(rrInterval);
while (rrIntervals.size() > 30) { while (rrIntervals.size() > 120) {
rrIntervals.removeFirst(); rrIntervals.removeFirst();
} }