mirror of https://github.com/ArduPilot/ardupilot
Copter: integrate AC_Sprayer
This commit is contained in:
parent
e4ca7d2fdf
commit
74fb500efe
|
@ -104,6 +104,7 @@
|
||||||
#include <SITL.h> // software in the loop support
|
#include <SITL.h> // software in the loop support
|
||||||
#include <AP_Scheduler.h> // main loop scheduler
|
#include <AP_Scheduler.h> // main loop scheduler
|
||||||
#include <AP_RCMapper.h> // RC input mapping library
|
#include <AP_RCMapper.h> // RC input mapping library
|
||||||
|
#include <AC_Sprayer.h> // Crop sprayer library
|
||||||
|
|
||||||
// AP_HAL to Arduino compatibility layer
|
// AP_HAL to Arduino compatibility layer
|
||||||
#include "compat.h"
|
#include "compat.h"
|
||||||
|
@ -830,6 +831,13 @@ static AP_Mount camera_mount2(¤t_loc, g_gps, &ahrs, 1);
|
||||||
AC_Fence fence(&inertial_nav);
|
AC_Fence fence(&inertial_nav);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
// Crop Sprayer
|
||||||
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
#if SPRAYER == ENABLED
|
||||||
|
static AC_Sprayer sprayer(&inertial_nav);
|
||||||
|
#endif
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// function definitions to keep compiler from complaining about undeclared functions
|
// function definitions to keep compiler from complaining about undeclared functions
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
@ -1253,6 +1261,10 @@ static void slow_loop()
|
||||||
camera_mount2.update_mount_type();
|
camera_mount2.update_mount_type();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if SPRAYER == ENABLED
|
||||||
|
sprayer.update();
|
||||||
|
#endif
|
||||||
|
|
||||||
// agmatthews - USERHOOKS
|
// agmatthews - USERHOOKS
|
||||||
#ifdef USERHOOK_SLOWLOOP
|
#ifdef USERHOOK_SLOWLOOP
|
||||||
USERHOOK_SLOWLOOP
|
USERHOOK_SLOWLOOP
|
||||||
|
|
|
@ -87,7 +87,8 @@ public:
|
||||||
k_param_circle_rate,
|
k_param_circle_rate,
|
||||||
k_param_sonar_gain,
|
k_param_sonar_gain,
|
||||||
k_param_ch8_option,
|
k_param_ch8_option,
|
||||||
k_param_arming_check_enabled, // 32
|
k_param_arming_check_enabled,
|
||||||
|
k_param_sprayer, // 33
|
||||||
|
|
||||||
// 65: AP_Limits Library
|
// 65: AP_Limits Library
|
||||||
k_param_limits = 65, // deprecated - remove
|
k_param_limits = 65, // deprecated - remove
|
||||||
|
|
|
@ -991,6 +991,12 @@ const AP_Param::Info var_info[] PROGMEM = {
|
||||||
GOBJECT(camera_mount2, "MNT2_", AP_Mount),
|
GOBJECT(camera_mount2, "MNT2_", AP_Mount),
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if SPRAYER == ENABLED
|
||||||
|
// @Group: SPRAYER_
|
||||||
|
// @Path: ../libraries/AC_Sprayer/AC_Sprayer.cpp
|
||||||
|
GOBJECT(sprayer, "SPRAY_", AC_Sprayer),
|
||||||
|
#endif
|
||||||
|
|
||||||
#if CONFIG_HAL_BOARD == HAL_BOARD_AVR_SITL
|
#if CONFIG_HAL_BOARD == HAL_BOARD_AVR_SITL
|
||||||
GOBJECT(sitl, "SIM_", SITL),
|
GOBJECT(sitl, "SIM_", SITL),
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -464,6 +464,11 @@
|
||||||
#define OPTFLOW_IMAX 1
|
#define OPTFLOW_IMAX 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////////////
|
||||||
|
// Crop Sprayer
|
||||||
|
#ifndef SPRAYER
|
||||||
|
# define SPRAYER DISABLED
|
||||||
|
#endif
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////////
|
||||||
// RADIO CONFIGURATION
|
// RADIO CONFIGURATION
|
||||||
|
|
Loading…
Reference in New Issue