From 138100e387a9cad0541a4b1667a56ed623d608bc Mon Sep 17 00:00:00 2001 From: Bertrand Songis Date: Fri, 19 Apr 2019 09:39:34 +0200 Subject: [PATCH] [XLiteS] Gyro taken into account as sticks / pots / switches for the inactivity detection --- radio/src/opentx.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/radio/src/opentx.cpp b/radio/src/opentx.cpp index 7662da2c9..08fe7d0fc 100644 --- a/radio/src/opentx.cpp +++ b/radio/src/opentx.cpp @@ -704,6 +704,10 @@ bool inputsMoved() sum += anaIn(i) >> INAC_STICKS_SHIFT; for (uint8_t i=0; i> INAC_SWITCHES_SHIFT; +#if defined(GYRO) + for (uint8_t i=0; i<2; i++) + sum += getValue(MIXSRC_GYRO1+i) >> INAC_STICKS_SHIFT; +#endif if (abs((int8_t)(sum-inactivity.sum)) > 1) { inactivity.sum = sum;