Added tick marks for Channel Util bar

This commit is contained in:
HarukiToreda 2025-04-21 19:51:40 -04:00
parent 257165431f
commit 5f245177bc

View File

@ -2636,12 +2636,17 @@ static void drawLoRaFocused(OLEDDisplay *display, OLEDDisplayUiState *state, int
display->drawString(starting_position, compactFourthLine, chUtil); display->drawString(starting_position, compactFourthLine, chUtil);
// Force 56% or higher to show a full 100% bar, text would still show related percent.
if (chutil_percent >= 61) {
chutil_percent = 100;
}
// Weighting for nonlinear segments // Weighting for nonlinear segments
float milestone1 = 25; float milestone1 = 25;
float milestone2 = 40; float milestone2 = 40;
float weight1 = 0.4; // Weight for 025% float weight1 = 0.45; // Weight for 025%
float weight2 = 0.33; // Weight for 2540% float weight2 = 0.35; // Weight for 2540%
float weight3 = 0.27; // Weight for 40100% float weight3 = 0.20; // Weight for 40100%
float totalWeight = weight1 + weight2 + weight3; float totalWeight = weight1 + weight2 + weight3;
int seg1 = chutil_bar_width * (weight1 / totalWeight); int seg1 = chutil_bar_width * (weight1 / totalWeight);