Skip to content

Commit 36cd5ab

Browse files
committed
Fix zero in sp02 and Heart Rate on screen
Fixed zero in sp02 and Heart Rate in HealthTelemetry screen
1 parent 17b075a commit 36cd5ab

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/modules/Telemetry/HealthTelemetry.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,12 +136,12 @@ void HealthTelemetryModule::drawFrame(OLEDDisplay *display, OLEDDisplayUiState *
136136
display->drawString(x, y += _fontHeight(FONT_SMALL), tempStr);
137137
if (lastMeasurement.variant.health_metrics.has_heart_bpm) {
138138
char heartStr[32];
139-
snprintf(heartStr, sizeof(heartStr), "Heart Rate: %.0f bpm", lastMeasurement.variant.health_metrics.heart_bpm);
139+
snprintf(heartStr, sizeof(heartStr), "Heart Rate: %u bpm", lastMeasurement.variant.health_metrics.heart_bpm);
140140
display->drawString(x, y += _fontHeight(FONT_SMALL), heartStr);
141141
}
142142
if (lastMeasurement.variant.health_metrics.has_spO2) {
143143
char spo2Str[32];
144-
snprintf(spo2Str, sizeof(spo2Str), "spO2: %.0f %%", lastMeasurement.variant.health_metrics.spO2);
144+
snprintf(spo2Str, sizeof(spo2Str), "spO2: %u %%", lastMeasurement.variant.health_metrics.spO2);
145145
display->drawString(x, y += _fontHeight(FONT_SMALL), spo2Str);
146146
}
147147
}

0 commit comments

Comments
 (0)