global: use static method to construct AP_Rally
This commit is contained in:
parent
b4f5256a9e
commit
b05610870c
@ -69,9 +69,6 @@ Copter::Copter(void)
|
||||
#if AC_AVOID_ENABLED == ENABLED
|
||||
avoid(ahrs, inertial_nav, fence, g2.proximity, &g2.beacon),
|
||||
#endif
|
||||
#if AC_RALLY == ENABLED
|
||||
rally(ahrs),
|
||||
#endif
|
||||
#if SPRAYER == ENABLED
|
||||
sprayer(&inertial_nav),
|
||||
#endif
|
||||
|
@ -560,9 +560,10 @@ private:
|
||||
#if AC_AVOID_ENABLED == ENABLED
|
||||
AC_Avoid avoid;
|
||||
#endif
|
||||
|
||||
// Rally library
|
||||
#if AC_RALLY == ENABLED
|
||||
AP_Rally_Copter rally;
|
||||
AP_Rally_Copter rally = AP_Rally_Copter::create(ahrs);
|
||||
#endif
|
||||
|
||||
// RSSI
|
||||
|
@ -283,8 +283,8 @@ private:
|
||||
#endif
|
||||
|
||||
// Rally Ponints
|
||||
AP_Rally rally {ahrs};
|
||||
|
||||
AP_Rally rally = AP_Rally::create(ahrs);
|
||||
|
||||
// RSSI
|
||||
AP_RSSI rssi;
|
||||
|
||||
|
@ -59,9 +59,6 @@ Sub::Sub(void)
|
||||
pmTest1(0),
|
||||
fast_loopTimer(0),
|
||||
mainLoop_count(0),
|
||||
#if AC_RALLY == ENABLED
|
||||
rally(ahrs),
|
||||
#endif
|
||||
#if AP_TERRAIN_AVAILABLE && AC_TERRAIN
|
||||
terrain(ahrs, mission, rally),
|
||||
#endif
|
||||
|
@ -431,7 +431,7 @@ private:
|
||||
|
||||
// Rally library
|
||||
#if AC_RALLY == ENABLED
|
||||
AP_Rally rally;
|
||||
AP_Rally rally = AP_Rally::create(ahrs);
|
||||
#endif
|
||||
|
||||
// terrain handling
|
||||
|
@ -25,7 +25,6 @@
|
||||
#include <AP_Math/AP_Math.h>
|
||||
#include <AP_Notify/AP_Notify.h>
|
||||
#include <AP_Notify/AP_BoardLED.h>
|
||||
#include <AP_Rally/AP_Rally.h>
|
||||
#include <AP_Scheduler/AP_Scheduler.h>
|
||||
#include <AP_BattMonitor/AP_BattMonitor.h>
|
||||
#include <AP_SerialManager/AP_SerialManager.h>
|
||||
|
@ -24,7 +24,6 @@
|
||||
#include <AP_Terrain/AP_Terrain.h>
|
||||
#include <AP_Math/AP_Math.h>
|
||||
#include <AP_Notify/AP_Notify.h>
|
||||
#include <AP_Rally/AP_Rally.h>
|
||||
#include <AP_Scheduler/AP_Scheduler.h>
|
||||
#include <AP_BattMonitor/AP_BattMonitor.h>
|
||||
#include <AP_RangeFinder/AP_RangeFinder.h>
|
||||
|
@ -27,7 +27,6 @@
|
||||
#include <AP_Notify/AP_Notify.h>
|
||||
#include <AP_BattMonitor/AP_BattMonitor.h>
|
||||
#include <AP_RangeFinder/AP_RangeFinder.h>
|
||||
#include <AP_Rally/AP_Rally.h>
|
||||
|
||||
#if CONFIG_HAL_BOARD == HAL_BOARD_PX4
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user