New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ArduSub integration #5655
Closed
Closed
ArduSub integration #5655
Changes from 250 commits
Commits
Show all changes
502 commits
Select commit
Hold shift + click to select a range
447eaeb
Sub: Fix handling of SET_HOME_POSITION
rjehangir 65d7d41
Mavlink: Repair incorrect submodule reference
rjehangir dcb65ca
Travis: Break up build to reduce log length
rjehangir ede8fb3
Sub: Change default pilot gain to 50% and add 25% option.
rjehangir add0963
Sub: Add pitch trim to joystick.cpp
rjehangir 9259091
Merge remote-tracking branch 'upstream/master'
rjehangir 4ebc2a1
Sub: Match Copter changes.
rjehangir b9b06b4
Sub: Updated Correction Factors for Vectored6DOF
DavidIngraham 4911dbc
Sub: Normalization fix for actuator saturation on vectored6dof
DavidIngraham d6e49de
Sub: Add default deadband for lateral/forward
rjehangir 6cad3dd
AP_HAL_Linux: Fix RCInput::read from stopping at any zero channel
rjehangir 54f20ca
Sub: Set mode to stabilize be default
rjehangir c25282f
AP_Motors: Change name of Sub motor reverse to "MOT_X_DIRECTION"
rjehangir aba8519
Sub: Change to MAV_TYPE_SUBMARINE for GCS plugin
rjehangir cfd6801
Sub: Clean parameter meta data for QGC
rjehangir 206bdea
ArduSub: Merge upstream Plane changes
rjehangir fd593eb
ArduSub: Merge upstream changes
rjehangir d4669ae
Sub: Add upstream Copter changes.
rjehangir 039b2f2
Merge remote-tracking branch 'upstream/master'
rjehangir 6493815
Sub: Match Copter changes
rjehangir 4467a7d
AP_Baro: Update parameter descriptions for underwater sensor
rjehangir a6350cd
Sub: Update SURFACE_DEPTH param description
rjehangir fede4dd
Sub: Add missing terrain.cpp file
rjehangir dee5051
Sub: Update default configuration options
rjehangir f010528
Sub: Update param descriptions for better processing to QGC
rjehangir b9b8d17
Sub: Fixed bug in vectored correction factors.
rjehangir 459cb8e
Sub: Add two new button functions and fix missing ones in params
rjehangir bae57b3
Sub: Fix JSButton parameter typo.
rjehangir 77a010b
Merge remote-tracking branch 'upstream/master'
rjehangir 1a6bbab
Sub: Update to match Copter changes in recent merge
rjehangir f8cc43b
DataFlash: Fix parameter description for param_parse.py
rjehangir aa95895
Sub: Add 'SimpleROV' frame configuration for 3/4-dof ROVs
rjehangir bf25afd
Sub: Implement input hold joystick button function
rjehangir d835040
Sub: Implement video switch feature on joystick button
rjehangir bfcd47e
Sub: Implement joystick button arm toggling
rjehangir 81a3a18
Sub: Improve joystick button debounce and input hold
rjehangir 9fccae0
Sub: Improve joystick button debounce
rjehangir 4cbeb16
Merge remote-tracking branch 'upstream/master'
rjehangir e596223
Sub: Changes to match Copter
rjehangir 937d3c5
Merge remote-tracking branch 'upstream/master'
rjehangir 637ea24
Sub: Changes to match recent Copter updates.
rjehangir 4f55918
Sub: Fix typo in defines.h
rjehangir b7d1e21
Sub: Add simplerov frame to deployment script.
rjehangir 901feb6
Hardcode RC_Channel mappings
jaxxzer a755371
Merge remote-tracking branch 'upstream/master'
rjehangir 6f2526a
Sub: Changes to match recent Copter updates.
rjehangir cad18a8
Sub: Fix joystick scaling to 1100-1900 range
rjehangir 90ee737
AP_Motors: For VectoredROV, fix coupling direction error
rjehangir d579fb0
Sub: Set crash detection to off by default
rjehangir de61574
Update default params
jaxxzer 883c25f
Sub: Fix automatic selection of primary baro
jaxxzer 82a555f
Sub: fix surface bottom detection
jaxxzer 44823d5
Merge pull request #22 from bluerobotics/j-develop
rjehangir 86a082c
Turn counter (#23)
rjehangir bd39f81
Merge remote-tracking branch 'upstream/master'
rjehangir 67f4117
Sub: Make changes to match Copter changes
rjehangir d40d429
AC_Fence: Fix ArduSub specific parameter index
rjehangir 899f0d1
Sub: Changes based on diff with Copter.
rjehangir f03141d
Sub: Add low pass filter to camera tilt input
rjehangir 9f724f3
Motors: Move Sub gain control to motors lib
rjehangir 93cc3ab
Sub: Remove gain control from joystick file.
rjehangir 924ce15
AP_Motors: Fix Sub gain parameters and default.
rjehangir 9b85bcd
Merge remote-tracking branch 'upstream/master'
rjehangir 01c2c30
Sub: Create new Vectored 90DEG (6DOF) class
jaxxzer 15e21b8
Sub: Fix heartbeat vehicle type.
rjehangir ed3f660
Sub: Add manual mode functions
jaxxzer 43bb096
Sub: allow arming from manual mode
jaxxzer f912e5c
Sub: disable rate controller in manual mode
jaxxzer 590e454
Sub: Change available flight modes in parameter values.
rjehangir 54d26a2
Sub: Change altHold to depthHold for parameter values
rjehangir cd0b224
Sub: Fix control_manual compile warnings.
rjehangir 7252a87
Sub: Reduce flight mode parameter options.
rjehangir a19b79a
Merge remote-tracking branch 'upstream/master'
rjehangir 744a456
Sub: Changes to match upstream Copter changes.
rjehangir df46421
Sub: Fix minor compile warning for travis.
rjehangir 62d3127
Revert "AP_Motors: Fix Sub gain parameters and default."
rjehangir 8ff2037
Revert "Sub: Remove gain control from joystick file."
rjehangir d79aeca
Revert "Motors: Move Sub gain control to motors lib"
rjehangir 74df745
Sub: Remove unnecessary failsafe from motor test.
rjehangir 46ea85b
Sub: Add identify to speak gain and input hold messages.
rjehangir e167478
Sub: Change info print for gain changes.
rjehangir dafc5dd
Sub: Fix camera low pass filter and allow button holding.
rjehangir 3dd19db
Sub: Hardcoded scalars for manual mode to match stabilize mode
rjehangir 3dda796
Sub: Force ch 3 trim to 1100 to match hardcoded radio settings
rjehangir 9cd935a
Sub: new WaterDetector library
jaxxzer bfdf601
Sub: add params for water detector
jaxxzer 3489682
Sub: fix bug in water detection
jaxxzer 1f0d519
WaterDetector: support multiple types and multiple instances
jaxxzer 1fc3427
WaterDetector: Add support for mavlink override by adding cooldown
jaxxzer 6dbd306
WaterDetector: Set water detector status based on subsystem sensor he…
jaxxzer f232021
AP_WaterDetector: update documentation
jaxxzer 38954dd
Sub: Warn for leak detection
jaxxzer 3e76548
Sub: Fix waf build for water detector.
rjehangir 76507e6
Sub: lock out depth hold mode if no external sensor is present
jaxxzer 8a83da0
Notify: add tone and light pattern for leak detection
jaxxzer 3322b72
Sub: Hold absolute heading in stabilize mode
jaxxzer 250ac0a
Sub: remove heading hold debug message from stabilize
jaxxzer abcb54e
Sub: replace land with surface mode
jaxxzer 57ffb36
Add leak and gcs failsafe actions
jaxxzer 664d696
GPS: Add mavlink NMEA gps class
jaxxzer d069f42
Sub: new poshold mode implementation
jaxxzer 720be7c
Sub: replace loiter with new velocity hold mode
jaxxzer 4b7d880
Sub: Replace sport mode with transect mode
jaxxzer 21a4243
Sub: remove unused variable in control_poshold
jaxxzer 53c6946
Sub: rename modes loiter->velhold, sport->transect
jaxxzer ef3a056
Sub: update control mode descriptions
jaxxzer ed2b54a
Sub: stop pwm output before reboot
jaxxzer 3686428
Sub: Detect fake pixhawk, correct internal pressure with scalar
jaxxzer 28d68bc
Sub: Add GCS warnings for high internal pressure/temperature
jaxxzer 8de01b1
Notify: continue playing leak tone after disarm
jaxxzer 51fc7b3
Change default ATC_ACCEL_Y_MAX to 110k cd/ss
jaxxzer eaf2aa7
Sub: hold absolute heading in depth hold and poshold
jaxxzer 6429536
Sub: fix bug in determining scalar for internal pressure
jaxxzer e498a6d
Sub: only update surface/bottom status when armed.
jaxxzer c829f05
Sub: improve auto-throttle behavior at surface
jaxxzer a06fef8
Sub: add params for internal pressure/temperature failsafe actions
jaxxzer 38a5363
WaterDetector: remove type parameter
jaxxzer 8f5f9a9
WaterDetector: revert to previously used parameter indices
jaxxzer b3e8476
Sub: Refactor WaterDetector to LeakDetector
rjehangir e4e0c83
JSButton: Add new button functions.
rjehangir 4111204
Sub: Add placeholders for new button functions.
rjehangir d7d6490
LeakDetector: Update parameter descriptions
rjehangir 53cce7e
Sub: Update leak parameter group name
rjehangir 276b16e
Sub: turn counter improvements
jaxxzer 9a6bf7b
Rangefinder_MAVLink: Update status to include out of range low/high
jaxxzer 7ffcdec
Sub: add method to translate wpnav roll/pitch output to forward/lateral
jaxxzer 173e42f
Sub: clean up poshold
jaxxzer 8e64371
Sub: home altitude is always 0, referenced from water's surface
jaxxzer bdd9938
Sub: first attempts at auto
jaxxzer 01d3e89
Sub: initialize pwm input on control channels to 1500 instead of 0
jaxxzer 71b59c9
Sub: disable transect mode, and hide associated params
jaxxzer dfd0b96
Sub GCS: Zero depth with MAV_CMD_PREFLIGHT_SET_SENSOR_OFFSETS
jaxxzer fd11b91
Baro: update base pressure during update_calibration
jaxxzer c334e1f
Reenable rally to avoid errors.
rjehangir f31562b
Tools: support for ArduSub in sim_vehicle.py
peterbarker a1e191b
Tools: sim_vehicle frame name for ArduSub
rjehangir 4febcfe
Tools: Add Sub simulation parameter file
rjehangir 29f8ce9
SITL: Add SITL Submarine files
rjehangir 41d10c0
Sub: Apply deadzone by using norm_input_dz instead of norm_input
jaxxzer 79f1cf9
RC_Channel: Add method to uniformly scale the dead zones on all channels
jaxxzer 66ea961
Sub: add method to get throttle channel control_in, while applying
jaxxzer e04431e
Sub: force min/max/trim on inputs 1~7
jaxxzer bc006d9
Sub: use get_throttle_control_dz in place of throttle->get_control_in
jaxxzer 67dd385
Sub: initialize scale factor for dead zones correctly
jaxxzer 4522335
Revert to 29f8ce95, prior to deadzone PR
jaxxzer 4a7acc5
Merge pull request #38 from bluerobotics/bugfix
jaxxzer 44accc1
Merge remote-tracking branch 'upstream/master'
jaxxzer 90cf13e
Update Sub to match relevant Copter and Library developments
jaxxzer c4502dc
Sub: Fix waf build, remove vehicle-specific macros from headers
jaxxzer f3cff91
Baro: add external I2C driver for Sub
jaxxzer 2931d74
SITL: Add vectored ROV model for Submarine
jaxxzer 7d83510
Sub: Fix poscontrol.relax_althold_controllers() in depth hold
jaxxzer 186ca97
Merge remote-tracking branch 'upstream/master'
jaxxzer 683c2a0
Sub: Update to match recent upstream changes
jaxxzer 8cbafe2
AP_Baro: Add second backend for ArduSub on Pixhawk
jaxxzer e4455a1
Sub: Remove statustext messages for surface and bottom events
jaxxzer f870766
Sub: elevate leak statustext message to MAV_SEVERITY_CRITICAL
jaxxzer 854ea1d
Sub: Log leak failsafe events, and send statustext even when disarmed
jaxxzer 87f2be2
Sub: Add gain parameters
jaxxzer d5fe76a
AP_BoardConfig: Disable safety switch on PX4 for ArduSub
jaxxzer c70262a
Sub: Add cam tilt and lights step size parameters
jaxxzer 61df30c
Sub: Constrain camera tilt goal to servo output limits
jaxxzer 2e36264
Sub: Change default arming check parameter to ARMING_CHECK_NONE
jaxxzer 6ab6cc0
Sub: Fix parameter metadata
jaxxzer 0a83b68
Sub: Remove dead poshold function declarations
jaxxzer c3ce556
Sub: Ditch control mode RC switch logic
jaxxzer 2f33de5
Sub: Remove control_switch_state struct and reset_control_switch()
jaxxzer f411bb2
Sub: Refactor delay()
jaxxzer c90edb3
AC_PosControl: Tweak z axis limiting for ArduSub
jaxxzer d49df44
Sub: Let AC_PosControl handle z axis limiting at surface
jaxxzer 2e64085
Sub: Remove baro ground effect compensation
jaxxzer 0f4885b
Sub: Remove old RC-style arm and disarm checks
jaxxzer 4c79ed7
Sub: Remove Flip mode
jaxxzer 95a565a
Sub: Remove Brake mode
jaxxzer dfa4c4f
Sub: Remove Drift mode
jaxxzer 19275aa
Sub: Remove takeoff code
jaxxzer 6b7cfcb
Sub: Remove land/landed code
jaxxzer 73de54e
Sub: Remove deprecated parameters
jaxxzer 23df8a1
Sub: Remove parachute
jaxxzer e256a27
Sub: Remove landing gear
jaxxzer a776538
Sub: Remove precision landing
jaxxzer d37bdd3
Sub: Remove ADSB
jaxxzer 2eae956
Sub: Remove sprayer
jaxxzer 0662e3e
Sub: Remove RSSI
jaxxzer 14e6ab0
Sub: Disable autotune parameters
jaxxzer 594f137
Sub: Remove TELEM_DELAY parameter
jaxxzer 34743b5
Sub: Disable RPM
jaxxzer 871d84d
Sub: Disable RCMAP
jaxxzer f7a1e75
Sub: Disable TRANSECT parameters
jaxxzer 01a17d6
Sub: Remove frame_orientation parameter
jaxxzer 2f4d21b
Sub: Fix -Wundef compile warnings
jaxxzer e3d8e4d
Sub: Remove throw mode
jaxxzer 4dbf595
Sub: Hide Aux Switch parameters from user
jaxxzer 11ae26d
Sub: Remove (unused) PHLD parameters
jaxxzer f3ba316
Sub: Remove simple mode parameters, and disable simple modes
jaxxzer e329252
Sub: Remove LAND parameters
jaxxzer 82abd92
Sub: Disable CH6 Tuning
jaxxzer 3eb960d
Sub: Disable optical flow by default
jaxxzer 83e6968
Sub: Disable Rally and Terrain by default
jaxxzer 310e65f
Sub: Remove RTL
jaxxzer 764601f
Sub: Hide Circle Nav parameters from user
jaxxzer b0de3ae
Sub: Reorganize parameters
jaxxzer 4301656
Sub: Change EEPROM format version to 1
jaxxzer 1b4e0d8
AP_Motors6DOF: Expose parent AP_MotorsMulticopter parameters
jaxxzer f406160
Sub: Remove use of throttle-hover
jaxxzer ca22966
Sub: add AP_Beacon to wscript
jaxxzer a29e529
Sub: Remove PILOT_THR_BEHAVIOR parameter and disable auto_disarm_check()
jaxxzer 963d4c3
Sub: Disable Avoidance and Proximity by default
jaxxzer e8d0ece
Sub: Fix unused variables in acro and stabilize
jaxxzer a48fb9d
Sub: Fix surface/bottom detector logic
jaxxzer ac642b7
Sub: Fix parameter metadata
jaxxzer f9b9d06
Sub: Initialize control mode to flightmode 1
jaxxzer f3232a5
Sub: Return MAV_RESULT_UNSUPPORTED for compassmot calibration
jaxxzer 6145bec
Sub: Change default pwm frequency to 200Hz
jaxxzer dd3f931
Sub: Implement mode_toggle joystick button function
jaxxzer 3feb45b
Sub: Add throttle channel gain scalar parameter
jaxxzer 6fd7a7e
Sub: Change default GCS failsafe to disarm
jaxxzer cdf856f
Sub: Add camera tilt servo center parameter
jaxxzer aab8bac
Sub: Remove RC radio failsafe
jaxxzer 42aec72
Sub: Use MAV_CMD_PREFLIGHT_CALIBRATION to zero baro
jaxxzer bd146f8
JSButton: Add method to set default button functions
jaxxzer d433334
Sub: Configure default joystick buttons
jaxxzer ab73d7b
Sub: Configure default flight modes
jaxxzer 6c5e991
Sub: Change default depth control parameters
jaxxzer 81734b2
Sub: Make checks stricter on flight mode init
jaxxzer 1ef3917
Sub: Change software type to 40 to identify as Sub instead of copter
jaxxzer a2509a6
Sub: Change default depth hold pids
jaxxzer 6eee9ac
Compass: Set default learn parameter to disabled for Sub
jaxxzer 36e38cd
Baro: Default base pressure to mean sea level pressure
jaxxzer 37cfb1d
Sub: Increase version to 3.5-dev
jaxxzer de20bef
Merge remote-tracking branch 'upstream/master'
jaxxzer d183bc1
Sub: Require initial contact with GCS before entering failsafe.
jaxxzer 11b2888
Sub: Send invalid PWM to servo rail before rebooting
jaxxzer 667f9c1
Sub: Fixup parameter metadata
jaxxzer 3862ffa
Motors: Remove individual Sub frame classes
jaxxzer dbdc1b6
Sub: Set frame configuration with parameter instead of make target
jaxxzer 85fedc5
Sub/Motors: Finalize frame definitions and frame config metadata
jaxxzer b006822
Sub: Update release notes for v3.4 release
jaxxzer f14bf1a
Libraries: Add AP_TemperatureSensor and TSYS01 driver
jaxxzer 8e0b1a8
Sub: Add TSYS01 'celsius' object
jaxxzer fe6a492
Merge upstream master
jaxxzer dfa7ead
TSYS01: Change periodic callback signature
jaxxzer 47e5ddb
EKF3: Add setter for baro alt noise
jaxxzer d1a78c0
AP_Motors: Override setup_motors for Motors6DOF
jaxxzer a2ec017
Sub: Update to library changes
jaxxzer 6c3aa4d
Sub: Manual control failsafe
jaxxzer 554a8db
Sub: Log manual control failsafe occurances
jaxxzer 08513ca
AP_RCMapper: Only present FORWARD and LATERAL params for ArduSub
jaxxzer c75912c
AP_InertialNav_NavEKF: remove remnants of Ardusub experimentation.
jaxxzer a37889e
Remove frame-specific waf targets
jaxxzer File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
// -*- tab-width: 4; Mode: C++; c-basic-offset: 4; indent-tabs-mode: nil -*- | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just a note (the ArduSub directory can be corrected later): we have removed this comments in exchange of a global file in root. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done. |
||
|
||
// User specific config file. Any items listed in config.h can be overridden here. | ||
|
||
// If you used to define your CONFIG_APM_HARDWARE setting here, it is no longer | ||
// valid! You should switch to using a HAL_BOARD flag in your local config.mk. | ||
|
||
// uncomment the lines below to disable features (flash sizes listed are for APM2 boards and will underestimate savings on Pixhawk and other boards) | ||
//#define LOGGING_ENABLED DISABLED // disable dataflash logging to save 11K of flash space | ||
//#define MOUNT DISABLED // disable the camera gimbal to save 8K of flash space | ||
#define AUTOTUNE_ENABLED DISABLED // disable the auto tune functionality to save 7k of flash | ||
//#define AC_FENCE DISABLED // disable fence to save 2k of flash | ||
//#define CAMERA DISABLED // disable camera trigger to save 1k of flash | ||
//#define RANGEFINDER_ENABLED DISABLED // disable rangefinder to save 1k of flash | ||
//#define PROXIMITY_ENABLED DISABLED // disable proximity sensors | ||
//#define POSHOLD_ENABLED DISABLED // disable PosHold flight mode to save 4.5k of flash | ||
#define GRIPPER_ENABLED DISABLED // disable gripper to save 500bytes of flash | ||
//#define CLI_ENABLED DISABLED // disable the CLI (command-line-interface) to save 21K of flash space | ||
//#define NAV_GUIDED DISABLED // disable external navigation computer ability to control vehicle through MAV_CMD_NAV_GUIDED mission commands | ||
|
||
// features below are disabled by default on all boards | ||
//#define AVOIDANCE_ENABLED ENABLED | ||
//#define PROXIMITY_ENABLED ENABLED | ||
//#define AC_RALLY ENABLED // enable rally points library | ||
//#define AC_TERRAIN ENABLED // enable terrain library (Must also enable Rally) | ||
//#define OPTFLOW ENABLED // enable optical flow sensor support | ||
//#define DISALLOW_GCS_MODE_CHANGE_DURING_RC_FAILSAFE // disable mode changes from GCS during Radio failsafes. Avoids a race condition for vehicle like Solo in which the RC and telemetry travel along the same link | ||
|
||
// other settings | ||
//#define THROTTLE_IN_DEADBAND 100 // redefine size of throttle deadband in pwm (0 ~ 1000) | ||
//#define LAND_REQUIRE_MIN_THROTTLE_TO_DISARM ENABLED // when set to ENABLED vehicle will only disarm after landing (in AUTO, LAND or RTL) if pilot has put throttle to zero | ||
|
||
//#define HIL_MODE HIL_MODE_SENSORS // build for hardware-in-the-loop simulation | ||
|
||
// User Hooks : For User Developed code that you wish to run | ||
// Put your variable definitions into the UserVariables.h file (or another file name and then change the #define below). | ||
//#define USERHOOK_VARIABLES "UserVariables.h" | ||
// Put your custom code into the UserCode.pde with function names matching those listed below and ensure the appropriate #define below is uncommented below | ||
//#define USERHOOK_INIT userhook_init(); // for code to be run once at startup | ||
//#define USERHOOK_FASTLOOP userhook_FastLoop(); // for code to be run at 100hz | ||
//#define USERHOOK_50HZLOOP userhook_50Hz(); // for code to be run at 50hz | ||
//#define USERHOOK_MEDIUMLOOP userhook_MediumLoop(); // for code to be run at 10hz | ||
//#define USERHOOK_SLOWLOOP userhook_SlowLoop(); // for code to be run at 3.3hz | ||
//#define USERHOOK_SUPERSLOWLOOP userhook_SuperSlowLoop(); // for code to be run at 1hz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
// -*- tab-width: 4; Mode: C++; c-basic-offset: 4; indent-tabs-mode: nil -*- | ||
|
||
// HIL_MODE SELECTION | ||
// | ||
// Mavlink supports | ||
// 1. HIL_MODE_SENSORS: full sensor simulation | ||
#define HIL_MODE HIL_MODE_SENSORS | ||
|
||
// HIL_PORT SELCTION | ||
// | ||
// PORT 1 | ||
// If you would like to run telemetry communications for a groundstation | ||
// while you are running hardware in the loop it is necessary to set | ||
// HIL_PORT to 1. This uses the port that would have been used for the gps | ||
// as the hardware in the loop port. You will have to solder | ||
// headers onto the gps port connection on the apm | ||
// and connect via an ftdi cable. | ||
// | ||
// The baud rate is set to 115200 in this mode. | ||
// | ||
// PORT 3 | ||
// If you don't require telemetry communication with a gcs while running | ||
// hardware in the loop you may use the telemetry port as the hardware in | ||
// the loop port. Alternatively, use a telemetry/HIL shim like FGShim | ||
// https://ardupilot-mega.googlecode.com/svn/Tools/trunk/FlightGear | ||
// | ||
// The buad rate is controlled by SERIAL1_BAUD in this mode. | ||
|
||
#define HIL_PORT 3 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,102 @@ | ||
// -*- tab-width: 4; Mode: C++; c-basic-offset: 4; indent-tabs-mode: nil -*- | ||
|
||
#include "Sub.h" | ||
|
||
// set_home_state - update home state | ||
void Sub::set_home_state(enum HomeState new_home_state) | ||
{ | ||
// if no change, exit immediately | ||
if (ap.home_state == new_home_state) | ||
return; | ||
|
||
// update state | ||
ap.home_state = new_home_state; | ||
|
||
// log if home has been set | ||
if (new_home_state == HOME_SET_NOT_LOCKED || new_home_state == HOME_SET_AND_LOCKED) { | ||
Log_Write_Event(DATA_SET_HOME); | ||
} | ||
} | ||
|
||
// home_is_set - returns true if home positions has been set (to GPS location, armed location or EKF origin) | ||
bool Sub::home_is_set() | ||
{ | ||
return (ap.home_state == HOME_SET_NOT_LOCKED || ap.home_state == HOME_SET_AND_LOCKED); | ||
} | ||
|
||
// --------------------------------------------- | ||
void Sub::set_auto_armed(bool b) | ||
{ | ||
// if no change, exit immediately | ||
if( ap.auto_armed == b ) | ||
return; | ||
|
||
ap.auto_armed = b; | ||
if(b){ | ||
Log_Write_Event(DATA_AUTO_ARMED); | ||
} | ||
} | ||
|
||
// --------------------------------------------- | ||
void Sub::set_simple_mode(uint8_t b) | ||
{ | ||
if(ap.simple_mode != b){ | ||
if(b == 0){ | ||
Log_Write_Event(DATA_SET_SIMPLE_OFF); | ||
GCS_MAVLINK::send_statustext_all(MAV_SEVERITY_INFO, "SIMPLE mode off"); | ||
}else if(b == 1){ | ||
Log_Write_Event(DATA_SET_SIMPLE_ON); | ||
GCS_MAVLINK::send_statustext_all(MAV_SEVERITY_INFO, "SIMPLE mode on"); | ||
}else{ | ||
// initialise super simple heading | ||
update_super_simple_bearing(true); | ||
Log_Write_Event(DATA_SET_SUPERSIMPLE_ON); | ||
GCS_MAVLINK::send_statustext_all(MAV_SEVERITY_INFO, "SUPERSIMPLE mode on"); | ||
} | ||
ap.simple_mode = b; | ||
} | ||
} | ||
|
||
// --------------------------------------------- | ||
void Sub::set_failsafe_battery(bool b) | ||
{ | ||
failsafe.battery = b; | ||
AP_Notify::flags.failsafe_battery = b; | ||
} | ||
|
||
// --------------------------------------------- | ||
|
||
void Sub::set_pre_arm_check(bool b) | ||
{ | ||
if(ap.pre_arm_check != b) { | ||
ap.pre_arm_check = b; | ||
AP_Notify::flags.pre_arm_check = b; | ||
} | ||
} | ||
|
||
void Sub::set_pre_arm_rc_check(bool b) | ||
{ | ||
if(ap.pre_arm_rc_check != b) { | ||
ap.pre_arm_rc_check = b; | ||
} | ||
} | ||
|
||
void Sub::update_using_interlock() | ||
{ | ||
// check if we are using motor interlock control on an aux switch | ||
ap.using_interlock = check_if_auxsw_mode_used(AUXSW_MOTOR_INTERLOCK); | ||
} | ||
|
||
void Sub::set_motor_emergency_stop(bool b) | ||
{ | ||
if(ap.motor_emergency_stop != b) { | ||
ap.motor_emergency_stop = b; | ||
} | ||
|
||
// Log new status | ||
if (ap.motor_emergency_stop){ | ||
Log_Write_Event(DATA_MOTORS_EMERGENCY_STOPPED); | ||
} else { | ||
Log_Write_Event(DATA_MOTORS_EMERGENCY_STOP_CLEARED); | ||
} | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you undo the changes to travis.yml? email address change too
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.