touch on/off with backlight on/off is now working for TX16s, untested, but implemented for NV14
simulator for tX16s and NV14 works
This commit is contained in:
@@ -597,11 +597,16 @@ void backlightEnable(uint8_t dutyCycle = 0);
|
||||
#else
|
||||
#define BACKLIGHT_LEVEL_MIN 46
|
||||
#endif
|
||||
|
||||
#if defined(SIMU)
|
||||
#define BACKLIGHT_ENABLE()
|
||||
#define BACKLIGHT_DISABLE()
|
||||
#define isBacklightEnabled(...) true
|
||||
#else
|
||||
extern bool boardBacklightOn;
|
||||
#define BACKLIGHT_ENABLE() {boardBacklightOn = true; backlightEnable(globalData.unexpectedShutdown ? BACKLIGHT_LEVEL_MAX : BACKLIGHT_LEVEL_MAX - currentBacklightBright);}
|
||||
#define BACKLIGHT_DISABLE() {boardBacklightOn = false; backlightEnable(globalData.unexpectedShutdown ? BACKLIGHT_LEVEL_MAX : ((g_eeGeneral.blOffBright == BACKLIGHT_LEVEL_MIN) && (g_eeGeneral.backlightMode != e_backlight_mode_off)) ? 0 : g_eeGeneral.blOffBright);}
|
||||
bool isBacklightEnabled();
|
||||
#endif
|
||||
|
||||
#if !defined(SIMU)
|
||||
void usbJoystickUpdate();
|
||||
|
||||
@@ -416,7 +416,7 @@ short tapCount = 0;
|
||||
|
||||
I2C_HandleTypeDef hi2c1;
|
||||
|
||||
static TouchState internalTouchState ={};
|
||||
static TouchState internalTouchState = {};
|
||||
|
||||
static void TOUCH_AF_ExtiStop(void)
|
||||
{
|
||||
@@ -810,10 +810,6 @@ struct TouchState touchPanelRead()
|
||||
extern "C" void TOUCH_INT_EXTI_IRQHandler1(void)
|
||||
{
|
||||
if (EXTI_GetITStatus(TOUCH_INT_EXTI_LINE1) != RESET) {
|
||||
if (g_eeGeneral.backlightMode & e_backlight_mode_keys) {
|
||||
// on touch turn the light on
|
||||
resetBacklightTimeout();
|
||||
}
|
||||
touchEventOccured = true;
|
||||
EXTI_ClearITPendingBit(TOUCH_INT_EXTI_LINE1);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user