Skip to content

Commit

Permalink
Merge pull request iNavFlight#10413 from iNavFlight/MrD_Fix-lockup-on…
Browse files Browse the repository at this point in the history
…-disarm

Fix lockup on disarm when wh used in post-flight stats
  • Loading branch information
MrD-RC authored Oct 15, 2024
2 parents 7d072e3 + a1cd050 commit 07b8bf9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/io/osd.c
Original file line number Diff line number Diff line change
Expand Up @@ -4789,7 +4789,7 @@ uint8_t drawStat_UsedEnergy(uint8_t col, uint8_t row, uint8_t statValX)
strcat(buff, "/");
osdFormatCentiNumber(preBuff, getMWhDrawn() / 10, 0, 2, 0, 3, false);
strcat(buff, osdFormatTrimWhiteSpace(preBuff));
tfp_sprintf(buff + strlen(buff), "%s%c", buff, SYM_WH);
tfp_sprintf(buff + strlen(buff), "%c", SYM_WH);
}
displayWrite(osdDisplayPort, statValX, row++, buff);

Expand Down Expand Up @@ -4851,7 +4851,7 @@ uint8_t drawStat_AverageEfficiency(uint8_t col, uint8_t row, uint8_t statValX, b
osdFormatCentiNumber(buff, (int32_t)((getMWhDrawn() - stats.flightStartMWh) * 10.0f * METERS_PER_MILE / totalDistance), 0, 2, 0, digits, false);
strcat(outBuff, osdFormatTrimWhiteSpace(buff));
strcat(outBuff, "/");
osdFormatCentiNumber(buff + strlen(buff), (int32_t)(getMWhDrawn() * 10.0f * METERS_PER_MILE / totalDistance), 0, 2, 0, digits, false);
osdFormatCentiNumber(buff, (int32_t)(getMWhDrawn() * 10.0f * METERS_PER_MILE / totalDistance), 0, 2, 0, digits, false);
strcat(outBuff, osdFormatTrimWhiteSpace(buff));
} else {
strcat(outBuff, "---/---");
Expand Down

0 comments on commit 07b8bf9

Please sign in to comment.