Merge pull request #298 from mrkusypl/feature_update_v5_2

Changing the length of the scan progress gauge
This commit is contained in:
Armel FAUVEAU authored and GitHub committed 2026-04-22 03:31:48 +02:00
commit 669dad5b2e
1 file changed
+18 -2
+18 -2
View File
@@ -197,8 +197,24 @@ static bool ScanProgress_IsForward(void)
static void ScanProgress_DrawGaugeLine(uint8_t line, uint32_t current_index, uint32_t total, bool memory_mode)
{
const bool forward = ScanProgress_IsForward();
const uint8_t gauge_left = 40;
const uint8_t gauge_right = 122;
uint8_t gauge_left = 25;
if (total >= 100000) {
if (total >= 10000000) {
gauge_left = (total >= 100000000) ? 81 : 73;
} else {
gauge_left = (total >= 1000000) ? 65 : 57;
}
} else {
if (total >= 1000) {
gauge_left = (total >= 10000) ? 49 : 41;
} else {
gauge_left = (total >= 100) ? 33 : 25;
}
}
const uint8_t gauge_right = 126;
const uint8_t fill_start = gauge_left + 2;
const uint8_t fill_end = gauge_right - 2;
const uint8_t fill_cols = fill_end - fill_start + 1;