Skip to content

Commit

Permalink
Tools: FX
Browse files Browse the repository at this point in the history
  • Loading branch information
lthall committed Sep 1, 2023
1 parent 6a4dffc commit b89419d
Show file tree
Hide file tree
Showing 10 changed files with 1,129 additions and 4 deletions.
1 change: 1 addition & 0 deletions Tools/ardupilotwaf/ardupilotwaf.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
'AP_InertialSensor',
'AP_Math',
'AP_Mission',
'AP_Fallback_Mission',
'AP_DAL',
'AP_NavEKF',
'AP_NavEKF2',
Expand Down
14 changes: 14 additions & 0 deletions Tools/ardupilotwaf/boards.py
Original file line number Diff line number Diff line change
Expand Up @@ -388,6 +388,20 @@ def configure_env(self, cfg, env):
env.INCLUDES += [
cfg.srcnode.find_dir('modules/uavcan/libuavcan/include').abspath()
]

env.AP_LIBRARIES += [
'modules/heatshrink/**/heatshrink_encoder.c'
]

env.INCLUDES += [
cfg.srcnode.find_dir('modules/heatshrink').abspath()
]

if cfg.options.fts:
cfg.msg('Configuring FTS variant', 'yes')
env.DEFINES.update(
FTS = 1,
)

if cfg.options.build_dates:
env.build_dates = True
Expand Down
22 changes: 20 additions & 2 deletions Tools/autotest/arducopter.py
Original file line number Diff line number Diff line change
Expand Up @@ -8240,8 +8240,8 @@ def tests1c(self):
self.test_set_position_global_int),

("ThrowDoubleDrop",
"Test a more complicated drop-mode scenario",
self.ThrowDoubleDrop),
"Test a more complicated drop-mode scenario",
self.ThrowDoubleDrop),

("SetpointGlobalVel",
"Test setpoint global velocity",
Expand Down Expand Up @@ -8512,6 +8512,20 @@ def tests2a(self):
self.test_mag_calibration),
])
return ret

def AHRSTrimLand(self):
'''test land detector with significant AHRS trim'''
self.context_push()
self.set_parameters({
"SIM_ACC_TRIM_X": 0.12,
"AHRS_TRIM_X": 0.12,
})
self.reboot_sitl()
self.wait_ready_to_arm()
self.takeoff(alt_min=20, mode='LOITER')
self.land_and_disarm()
self.context_pop()
self.reboot_sitl()

def tests2b(self): # this block currently around 9.5mins here
'''return list of all tests'''
Expand Down Expand Up @@ -8659,6 +8673,10 @@ def tests2b(self): # this block currently around 9.5mins here
Test("LogUpload",
"Log upload",
self.log_upload),

Test("AHRSTrimLand",
"test land detector with significant AHRS trim",
self.AHRSTrimLand),
])
return ret

Expand Down
13 changes: 13 additions & 0 deletions Tools/autotest/default_params/copter-hexa-flyhawk.parm
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
GPS_TYPE2 1

SIM_GPS2_DISABLE 0

BRD_SAFETYENABLE 0
FS_CRASH_CHECK 0
BRAKE_ACCEL 200
FS_THR_ENABLE 0
FS_GCS_ENABLE 7
ARMING_CHECK 5631
LOG_DISARMED 1

RC16_OPTION 31
18 changes: 18 additions & 0 deletions Tools/autotest/default_params/copter-hexa-fts.parm
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
GPS_TYPE2 1

SIM_GPS2_DISABLE 0

LOG_DISARMED 1
ARMING_CHECK 1049614
FS_EKF_ACTION 0
FS_CRASH_CHECK 0
FS_THR_ENABLE 0
FTS_ALT_MIN 0
FTS_DELAY_MS 0
FTS_ENABLED 1
FTS_FLIP_CRT 60
FTS_FLIP_TIME 250
FTS_SINK_CRT 5
FTS_SINK_TIME 250
FTS_YAW_CRT 300
FTS_YAW_TIME 250
27 changes: 27 additions & 0 deletions Tools/autotest/default_params/copter-passenger.parm
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
FRAME_CLASS 18
ATC_ACCEL_P_MAX 100000
ATC_ACCEL_R_MAX 100000
ATC_ACCEL_Y_MAX 18000
ATC_ANG_PIT_P 10
ATC_ANG_RLL_P 10
ATC_ANG_YAW_P 6.819923
ATC_RAT_PIT_D 0.003066369
ATC_RAT_PIT_I 0.3672593
ATC_RAT_PIT_IMAX 0.5
ATC_RAT_PIT_P 0.3672593
ATC_RAT_RLL_D 0.002667568
ATC_RAT_RLL_I 0.3180474
ATC_RAT_RLL_IMAX 0.5
ATC_RAT_RLL_P 0.3180474
ATC_RAT_YAW_D 0
ATC_RAT_YAW_FLTD 5
ATC_RAT_YAW_I 0.06603496
ATC_RAT_YAW_IMAX 0.25
ATC_RAT_YAW_P 0.6603495
ATC_RATE_FF_ENAB 1
ATC_RATE_P_MAX 0
ATC_RATE_R_MAX 0
ATC_RATE_Y_MAX 0
MOT_THST_EXPO 0
MOT_THST_HOVER 0.4831406
MOT_YAW_HEADROOM 300
14 changes: 14 additions & 0 deletions Tools/autotest/pysim/vehicleinfo.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,20 @@ def __init__(self):
"default_params/copter-hexa.parm",
"default_params/copter-hexa-dji.parm"
],
},
"flyhawk": {
"make_target": "sitl",
"waf_target": "bin/arducopter",
"default_params_filename": ["default_params/copter.parm",
"default_params/copter-hexa.parm",
"default_params/copter-hexa-flyhawk.parm" ],
},
"passenger": {
"make_target": "sitl",
"waf_target": "bin/arducopter",
"default_params_filename": ["default_params/copter.parm",
"default_params/copter-passenger.parm",
"default_params/copter-hexa-fts.parm" ],
},
"octa-cwx": {
"waf_target": "bin/arducopter",
Expand Down
4 changes: 2 additions & 2 deletions Tools/autotest/run_in_terminal_window.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,10 @@ elif [ -n "$STY" ]; then
# We are running inside of screen, try to start it there
screen -X screen -t "$name" $*
else
filename="/tmp/$name.log"
echo "RiTW: Window access not found, logging to $filename"
cmd="$1"
shift
filename="/tmp/$name-$(basename $cmd).log"
echo "RiTW: Window access not found, logging to $filename"
# the following "true" is to avoid bash optimising the following call
# to avoid creating a subshell. We need that subshell, or
# _fdm_input_step sees ArduPilot has no parent and kills ArduPilot!
Expand Down
Binary file added Tools/bootloaders/FlyhawkV2_bl.bin
Binary file not shown.
Loading

0 comments on commit b89419d

Please sign in to comment.