1
0
Fork 0
mirror of https://github.com/opentx/opentx.git synced 2025-07-25 01:05:10 +03:00
This commit is contained in:
bsongis 2014-08-27 23:12:29 +02:00
parent 0bfb1da97f
commit 784ec0f05a
3 changed files with 5 additions and 8 deletions

View file

@ -275,7 +275,7 @@ These will be relevant for all models in the same EEPROM.</string>
<item> <item>
<widget class="QSlider" name="backlightColor_SL"> <widget class="QSlider" name="backlightColor_SL">
<property name="maximum"> <property name="maximum">
<number>17</number> <number>20</number>
</property> </property>
<property name="pageStep"> <property name="pageStep">
<number>5</number> <number>5</number>

View file

@ -531,8 +531,8 @@ void menuGeneralSetup(uint8_t event)
#if defined(PCBTARANIS) && defined(REVPLUS) #if defined(PCBTARANIS) && defined(REVPLUS)
case ITEM_SETUP_BACKLIGHT_COLOR: case ITEM_SETUP_BACKLIGHT_COLOR:
lcd_putsLeft(y, STR_BLCOLOR); lcd_putsLeft(y, STR_BLCOLOR);
displaySlider(RADIO_SETUP_2ND_COLUMN, y, g_eeGeneral.backlightColor, 17, attr); displaySlider(RADIO_SETUP_2ND_COLUMN, y, g_eeGeneral.backlightColor, 20, attr);
if (attr) g_eeGeneral.backlightColor = checkIncDec(event, g_eeGeneral.backlightColor, 0, 17, EE_GENERAL | NO_INCDEC_MARKS); if (attr) g_eeGeneral.backlightColor = checkIncDec(event, g_eeGeneral.backlightColor, 0, 20, EE_GENERAL | NO_INCDEC_MARKS);
break; break;
#endif #endif

View file

@ -338,11 +338,8 @@ void lcdSetRefVolt(uint8_t val)
#if defined(REVPLUS) #if defined(REVPLUS)
void turnBacklightOn(uint8_t level, uint8_t color) void turnBacklightOn(uint8_t level, uint8_t color)
{ {
if (color >= 9 && color <= 17) { TIM4->CCR4 = ((100-level)*(20-color))/20;
color += 83; TIM4->CCR2 = ((100-level)*color)/20;
}
TIM4->CCR4 = (100-level)*color;
TIM4->CCR2 = (100-level)*(100-color);
} }
void turnBacklightOff(void) void turnBacklightOff(void)