File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -180,7 +180,10 @@ const VirtualFC = {
180180
181181 virtualFC . SENSOR_ALIGNMENT = { ...FC . SENSOR_ALIGNMENT } ;
182182 virtualFC . SENSOR_ALIGNMENT . gyro_to_use = 0 ;
183- virtualFC . SENSOR_ALIGNMENT . gyro_detection_flags = 1 ;
183+ virtualFC . SENSOR_ALIGNMENT . gyro_enable_mask = ( 1 << 8 ) - 1 ; // Used for API v1.47+
184+ virtualFC . SENSOR_ALIGNMENT . gyro_detection_flags = semver . gte ( virtualFC . CONFIG . apiVersion , API_VERSION_1_47 )
185+ ? 3
186+ : 1 ;
184187
185188 virtualFC . SENSOR_DATA = { ...FC . SENSOR_DATA } ;
186189
@@ -271,6 +274,10 @@ const VirtualFC = {
271274 opticalflow_hardware : 1 , // MT01
272275 } ;
273276
277+ // For API v1.47+, set dual gyro hardware IDs
278+ virtualFC . GYRO_SENSOR . gyro_hardware [ 0 ] = 13 ;
279+ virtualFC . GYRO_SENSOR . gyro_hardware [ 1 ] = 22 ;
280+
274281 virtualFC . SENSOR_DATA . sonars = 231 ;
275282
276283 virtualFC . GPS_CONFIG = {
You can’t perform that action at this time.
0 commit comments