Only allow gyro_to_use = BOTH if both detected gyros are the same type
commitff59c37fdb878c7896d4601df4c451cb85b553df
authorBruce Luckcuck <github@etracer.net>
Thu, 3 May 2018 14:18:17 +0000 (3 10:18 -0400)
committerBruce Luckcuck <github@etracer.net>
Thu, 3 May 2018 14:34:13 +0000 (3 10:34 -0400)
tree61ce46c4675e09cacd17e34064e6ec79d7f25647
parentcb19bb16d487c423dc58818d1124c07b1c2dc5ea
Only allow gyro_to_use = BOTH if both detected gyros are the same type
Since we currently don't have per gyro configuration, trying to use two different gyro types simultaneously may not provide good results or lead to other unforeseen situations like attempting to initialize with settings not applicable to both hardware types.

This logic looks at the detected gyro types and resets to use only the first one if the user selected "BOTH" and they're different hardware types.
src/main/drivers/accgyro/accgyro.h
src/main/sensors/gyro.c
src/test/unit/rc_controls_unittest.cc