1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-18 22:05:17 +03:00

use PWM_RANGE consistently

This commit is contained in:
ctzsnooze 2022-10-23 13:08:54 +11:00
parent d58f2c4a3c
commit 4528fc2b70
4 changed files with 4 additions and 6 deletions

View file

@ -257,7 +257,7 @@ static void drawRxChannel(uint8_t channelIndex, uint8_t width)
{
LCDprint(rcChannelLetters[channelIndex]);
const uint32_t percentage = (constrain(rcData[channelIndex], PWM_RANGE_MIN, PWM_RANGE_MAX) - PWM_RANGE_MIN) * 100 / (PWM_RANGE_MAX - PWM_RANGE_MIN);
const uint32_t percentage = (constrain(rcData[channelIndex], PWM_RANGE_MIN, PWM_RANGE_MAX) - PWM_RANGE_MIN) * 100 / PWM_RANGE;
drawHorizonalPercentageBar(width - 1, percentage);
}