Skip to content

Add ADSB logging #105

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

Open
wants to merge 10 commits into
base: mttr-rebase-3.6.7
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ArduCopter/GCS_Mavlink.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1576,7 +1576,7 @@ void GCS_MAVLINK_Copter::handleMessage(mavlink_message_t* msg)
case MAVLINK_MSG_ID_UAVIONIX_ADSB_OUT_DYNAMIC:
case MAVLINK_MSG_ID_UAVIONIX_ADSB_TRANSCEIVER_HEALTH_REPORT:
#if ADSB_ENABLED == ENABLED
copter.adsb.handle_message(chan, msg);
copter.adsb.handle_message(chan, *msg);
#endif
break;

Expand Down
1 change: 1 addition & 0 deletions ArduCopter/events.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ void Copter::handle_battery_failsafe(const char *type_str, const int8_t action)
#else
init_disarm_motors();
#endif
break;
case Failsafe_Action_LandIfManual:
if (!flightmode->is_autopilot()) {
set_mode_land_with_pause(MODE_REASON_BATTERY_FAILSAFE);
Expand Down
2 changes: 1 addition & 1 deletion ArduCopter/mode.h
Original file line number Diff line number Diff line change
Expand Up @@ -816,10 +816,10 @@ class ModeGuided : public Mode {
uint32_t wp_distance() const override;
int32_t wp_bearing() const override;
float crosstrack_error() const override;
void pos_control_start();

private:

void pos_control_start();
void vel_control_start();
void posvel_control_start();
void takeoff_run();
Expand Down
11 changes: 9 additions & 2 deletions ArduCopter/mode_avoid_adsb.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,15 @@
// initialise avoid_adsb controller
bool Copter::ModeAvoidADSB::init(const bool ignore_checks)
{
// re-use guided mode
return Copter::ModeGuided::init(ignore_checks);
if (copter.position_ok() || ignore_checks) {
// initialise yaw
auto_yaw.set_mode_to_default(false);
// start in position control mode
pos_control_start();
return true;
}else{
return false;
}
}

bool Copter::ModeAvoidADSB::set_velocity(const Vector3f& velocity_neu)
Expand Down
6 changes: 3 additions & 3 deletions Tools/scripts/configure-ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ set -ex
# Disable ccache for the configure phase, it's not worth it
export CCACHE_DISABLE="true"

ARM_ROOT="gcc-arm-none-eabi-4_9-2015q3"
ARM_TARBALL="$ARM_ROOT-20150921-linux.tar.bz2"
ARM_ROOT="gcc-arm-none-eabi-6-2017-q2-update"
ARM_TARBALL="$ARM_ROOT-linux.tar.bz2"

RPI_ROOT="master"
RPI_TARBALL="$RPI_ROOT.tar.gz"
Expand Down Expand Up @@ -73,7 +73,7 @@ ln -s ~/opt/$CCACHE_ROOT/ccache ~/ccache/clang
exportline="export PATH=$HOME/ccache"
exportline="${exportline}:$HOME/bin"
exportline="${exportline}:$HOME/.local/bin"
exportline="${exportline}:$HOME/opt/gcc-arm-none-eabi-4_9-2015q3/bin"
exportline="${exportline}:$HOME/opt/gcc-arm-none-eabi-6-2017-q2-update/bin"
exportline="${exportline}:$HOME/opt/tools-master/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin"
exportline="${exportline}:$HOME/opt/$CCACHE_ROOT"
exportline="${exportline}:\$PATH"
Expand Down
Loading