File tree 1 file changed +6
-2
lines changed
1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -1914,7 +1914,7 @@ def FenceMargin(self, timeout=180):
1914
1914
self .set_parameters ({
1915
1915
"FENCE_ENABLE" : 1 ,
1916
1916
"FENCE_TYPE" : 6 , # polygon and circle fences
1917
- "FENCE_MARGIN" : 20 ,
1917
+ "FENCE_MARGIN" : 30 ,
1918
1918
"FENCE_RADIUS" : 150 ,
1919
1919
"AVOID_ENABLE" : 0 ,
1920
1920
"FENCE_OPTIONS" : 4
@@ -1928,6 +1928,9 @@ def FenceMargin(self, timeout=180):
1928
1928
1929
1929
# 110m polyfence
1930
1930
home_loc = self .mav .location ()
1931
+ radius = self .get_parameter ("FENCE_RADIUS" )
1932
+ self .mavproxy .send ("map circle %f %f %f green\n " % (home_loc .lat , home_loc .lng , radius ))
1933
+
1931
1934
locs = [
1932
1935
self .offset_location_ne (home_loc , - 110 , - 110 ),
1933
1936
self .offset_location_ne (home_loc , 110 , - 110 ),
@@ -1951,8 +1954,9 @@ def FenceMargin(self, timeout=180):
1951
1954
self .progress ("flying forward (east) until we hit fence" )
1952
1955
pitching_forward = True
1953
1956
self .set_rc (2 , 1100 )
1957
+ self .wait_statustext ("Polygon fence outside margin" )
1954
1958
1955
- self .wait_statustext ("Circle fence outside margin" )
1959
+ self .wait_statustext ("Circle and Polygon fences outside margin" )
1956
1960
self .progress ("Waiting for fence breach" )
1957
1961
tstart = self .get_sim_time ()
1958
1962
while not self .mode_is ("RTL" ):
You can’t perform that action at this time.
0 commit comments