mirror of
https://github.com/armel/uv-k1-k5v3-firmware-custom.git
synced 2026-10-02 03:15:37 +00:00
Merge pull request #298 from mrkusypl/feature_update_v5_2
Changing the length of the scan progress gauge
This commit is contained in:
1 file changed
+18
-2
+18
-2
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user