Rover: add AIS

This commit is contained in:
Peter Hall 2020-03-28 23:57:37 +00:00 committed by Randy Mackay
parent c539f0cff5
commit e86665a989
6 changed files with 20 additions and 0 deletions

View File

@ -654,6 +654,12 @@ const AP_Param::GroupInfo ParametersG2::var_info[] = {
AP_SUBGROUPINFO(torqeedo, "TRQD_", 49, ParametersG2, AP_Torqeedo),
#endif
#if HAL_AIS_ENABLED
// @Group: AIS_
// @Path: ../libraries/AP_AIS/AP_AIS.cpp
AP_SUBGROUPINFO(ais, "AIS_", 50, ParametersG2, AP_AIS),
#endif
AP_GROUPEND
};

View File

@ -409,6 +409,11 @@ public:
// torqeedo motor driver
AP_Torqeedo torqeedo;
#endif
#if HAL_AIS_ENABLED
// Automatic Identification System - for tracking sea-going vehicles
AP_AIS ais;
#endif
};
extern const AP_Param::Info var_info[];

View File

@ -109,6 +109,9 @@ const AP_Scheduler::Task Rover::scheduler_tasks[] = {
SCHED_TASK(afs_fs_check, 10, 200),
#endif
SCHED_TASK(read_airspeed, 10, 100),
#if HAL_AIS_ENABLED
SCHED_TASK_CLASS(AP_AIS, &rover.g2.ais, update, 5, 100),
#endif
};

View File

@ -70,6 +70,7 @@
#include <AP_WindVane/AP_WindVane.h>
#include <AR_Motors/AP_MotorsUGV.h>
#include <AP_Torqeedo/AP_Torqeedo.h>
#include <AP_AIS/AP_AIS.h>
#ifdef ENABLE_SCRIPTING
#include <AP_Scripting/AP_Scripting.h>

View File

@ -60,6 +60,10 @@ void Rover::init_ardupilot()
log_init();
#endif
#if HAL_AIS_ENABLED
g2.ais.init();
#endif
// initialise compass
AP::compass().set_log_bit(MASK_LOG_COMPASS);
AP::compass().init();

View File

@ -27,6 +27,7 @@ def build(bld):
'AP_WindVane',
'AR_Motors',
'AP_Torqeedo',
'AP_AIS',
],
)