Bars inverse - Closes #2495 (#7709)

Enable inversed telemetry bars
This commit is contained in:
DanielGeA
2020-07-31 17:07:59 +02:00
committed by GitHub
parent 035cc6c031
commit bb772afabb
5 changed files with 17 additions and 22 deletions
+2 -2
View File
@@ -66,14 +66,14 @@ void displayGaugesTelemetryScreen(TelemetryScreenData & screen)
barMin = calc100toRESX(barMin);
barMax = calc100toRESX(barMax);
}
if (source && barMax > barMin) {
if (source) {
int y = barHeight+6+i*(barHeight+6);
drawSource(0, y+barHeight-5, source, 0);
lcdDrawRect(BAR_LEFT, y, BAR_WIDTH+1, barHeight+2);
getvalue_t value = getValue(source);
drawSourceValue(BAR_LEFT+2+BAR_WIDTH, y+barHeight-5, source, LEFT);
uint8_t thresholdX = 0;
int width = barCoord(value, barMin, barMax);
uint8_t width = (barMin < barMax) ? barCoord(value, barMin, barMax) : limit(0, 151 - barCoord(value, barMax, barMin), 151);
uint8_t barShade = SOLID;
lcdDrawFilledRect(BAR_LEFT+1, y+1, width, barHeight, barShade);
for (uint8_t j=24; j<99; j+=25) {