From b454bb8c43468d932abb763caa9b91e8434f6f9c Mon Sep 17 00:00:00 2001 From: Peter Feerick Date: Sat, 11 Sep 2021 18:44:57 +1000 Subject: [PATCH] Formatting --- radio/src/targets/nv14/touch_driver.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/radio/src/targets/nv14/touch_driver.cpp b/radio/src/targets/nv14/touch_driver.cpp index 14def7ee8..24cac860d 100644 --- a/radio/src/targets/nv14/touch_driver.cpp +++ b/radio/src/targets/nv14/touch_driver.cpp @@ -514,8 +514,7 @@ bool touchPanelEventOccured() void touchPanelRead() { - if (!touchEventOccured) - return; + if (!touchEventOccured) return; touchEventOccured = false; @@ -524,21 +523,22 @@ void touchPanelRead() if (ft6x06_TS_DetectTouch(TOUCH_FT6236_I2C_ADDRESS)) { handleTouch(); - if (touchState.event == TE_DOWN && downTime == 0) + if (touchState.event == TE_DOWN && downTime == 0) { downTime = now; - } - else { + } + } else { if (touchState.event == TE_DOWN) { touchState.event = TE_UP; if (now - downTime <= TAP_TIME) { - if (now - tapTime > TAP_TIME) + if (now - tapTime > TAP_TIME) { tapCount = 1; - else + } else { tapCount++; + } touchState.tapCount = tapCount; tapTime = now; } else { - touchState.tapCount = 0; //not a tap + touchState.tapCount = 0; // not a tap } downTime = 0; } else {