Browse Source

AP_Mount: use GPS singleton

master
Peter Barker 7 years ago committed by Francisco Ferreira
parent
commit
fb3cba3867
  1. 2
      libraries/AP_Mount/AP_Mount_Alexmos.cpp
  2. 2
      libraries/AP_Mount/AP_Mount_SToRM32.cpp
  3. 2
      libraries/AP_Mount/AP_Mount_SToRM32_serial.cpp
  4. 2
      libraries/AP_Mount/AP_Mount_Servo.cpp
  5. 2
      libraries/AP_Mount/AP_Mount_SoloGimbal.cpp

2
libraries/AP_Mount/AP_Mount_Alexmos.cpp

@ -48,7 +48,7 @@ void AP_Mount_Alexmos::update() @@ -48,7 +48,7 @@ void AP_Mount_Alexmos::update()
// point mount to a GPS point given by the mission planner
case MAV_MOUNT_MODE_GPS_POINT:
if(_frontend._ahrs.get_gps().status() >= AP_GPS::GPS_OK_FIX_2D) {
if(AP::gps().status() >= AP_GPS::GPS_OK_FIX_2D) {
calc_angle_to_location(_state._roi_target, _angle_ef_target_rad, true, false);
control_axis(_angle_ef_target_rad, false);
}

2
libraries/AP_Mount/AP_Mount_SToRM32.cpp

@ -61,7 +61,7 @@ void AP_Mount_SToRM32::update() @@ -61,7 +61,7 @@ void AP_Mount_SToRM32::update()
// point mount to a GPS point given by the mission planner
case MAV_MOUNT_MODE_GPS_POINT:
if(_frontend._ahrs.get_gps().status() >= AP_GPS::GPS_OK_FIX_2D) {
if(AP::gps().status() >= AP_GPS::GPS_OK_FIX_2D) {
calc_angle_to_location(_state._roi_target, _angle_ef_target_rad, true, true);
resend_now = true;
}

2
libraries/AP_Mount/AP_Mount_SToRM32_serial.cpp

@ -76,7 +76,7 @@ void AP_Mount_SToRM32_serial::update() @@ -76,7 +76,7 @@ void AP_Mount_SToRM32_serial::update()
// point mount to a GPS point given by the mission planner
case MAV_MOUNT_MODE_GPS_POINT:
if(_frontend._ahrs.get_gps().status() >= AP_GPS::GPS_OK_FIX_2D) {
if(AP::gps().status() >= AP_GPS::GPS_OK_FIX_2D) {
calc_angle_to_location(_state._roi_target, _angle_ef_target_rad, true, true);
resend_now = true;
}

2
libraries/AP_Mount/AP_Mount_Servo.cpp

@ -69,7 +69,7 @@ void AP_Mount_Servo::update() @@ -69,7 +69,7 @@ void AP_Mount_Servo::update()
// point mount to a GPS point given by the mission planner
case MAV_MOUNT_MODE_GPS_POINT:
{
if(_frontend._ahrs.get_gps().status() >= AP_GPS::GPS_OK_FIX_2D) {
if(AP::gps().status() >= AP_GPS::GPS_OK_FIX_2D) {
calc_angle_to_location(_state._roi_target, _angle_ef_target_rad, _flags.tilt_control, _flags.pan_control, false);
stabilize();
}

2
libraries/AP_Mount/AP_Mount_SoloGimbal.cpp

@ -70,7 +70,7 @@ void AP_Mount_SoloGimbal::update() @@ -70,7 +70,7 @@ void AP_Mount_SoloGimbal::update()
// point mount to a GPS point given by the mission planner
case MAV_MOUNT_MODE_GPS_POINT:
_gimbal.set_lockedToBody(false);
if(_frontend._ahrs.get_gps().status() >= AP_GPS::GPS_OK_FIX_2D) {
if(AP::gps().status() >= AP_GPS::GPS_OK_FIX_2D) {
calc_angle_to_location(_state._roi_target, _angle_ef_target_rad, true, true);
}
break;

Loading…
Cancel
Save