mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-03 14:38:30 -04:00
Copter: added CH7 switch to enabling/disable the sonar in flight
This indirectly switches surface tracking on/off which is useful to avoid tracking the tops of uneven objects when far above the ground
This commit is contained in:
parent
bd05ea84cc
commit
e362844532
@ -164,6 +164,11 @@ static void read_trim_switch()
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
case CH7_SONAR:
|
||||||
|
// enable or disable the sonar
|
||||||
|
g.sonar_enabled = ap_system.CH7_flag;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -64,6 +64,7 @@
|
|||||||
#define CH7_SAVE_WP 7
|
#define CH7_SAVE_WP 7
|
||||||
#define CH7_MULTI_MODE 8
|
#define CH7_MULTI_MODE 8
|
||||||
#define CH7_CAMERA_TRIGGER 9
|
#define CH7_CAMERA_TRIGGER 9
|
||||||
|
#define CH7_SONAR 10 // allow enabling or disabling sonar in flight which helps avoid surface tracking when you are far above the ground
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -159,7 +159,8 @@ apm_option("CH7_OPTION" TYPE STRING
|
|||||||
"CH7_DO_NOTHING"
|
"CH7_DO_NOTHING"
|
||||||
"CH7_SAVE_WP"
|
"CH7_SAVE_WP"
|
||||||
"CH7_DO_NOTHING"
|
"CH7_DO_NOTHING"
|
||||||
"CH7_CAMERA_TRIGGER")
|
"CH7_CAMERA_TRIGGER"
|
||||||
|
"CH7_SONAR")
|
||||||
|
|
||||||
apm_option("ACCEL_ALT_HOLD" TYPE BOOL ADVANCED
|
apm_option("ACCEL_ALT_HOLD" TYPE BOOL ADVANCED
|
||||||
DESCRIPTION "Disabled by default, work in progress."
|
DESCRIPTION "Disabled by default, work in progress."
|
||||||
|
Loading…
Reference in New Issue
Block a user