Rover: move AIS to vehicle

This reverts most of commit e86665a989.
This commit is contained in:
Iampete1 2021-08-14 21:41:33 +01:00 committed by Andrew Tridgell
parent 2ca68da77a
commit 7fd157acb4
6 changed files with 9 additions and 28 deletions

View File

@ -388,13 +388,6 @@ bool GCS_MAVLINK_Rover::try_send_message(enum ap_message id)
break; break;
} }
case MSG_AIS_VESSEL: {
#if HAL_AIS_ENABLED
rover.g2.ais.send(chan);
#endif
break;
}
default: default:
return GCS_MAVLINK::try_send_message(id); return GCS_MAVLINK::try_send_message(id);
} }

View File

@ -650,12 +650,6 @@ const AP_Param::GroupInfo ParametersG2::var_info[] = {
AP_SUBGROUPINFO(torqeedo, "TRQD_", 49, ParametersG2, AP_Torqeedo), AP_SUBGROUPINFO(torqeedo, "TRQD_", 49, ParametersG2, AP_Torqeedo),
#endif #endif
#if HAL_AIS_ENABLED
// @Group: AIS_
// @Path: ../libraries/AP_AIS/AP_AIS.cpp
AP_SUBGROUPINFO(ais, "AIS_", 50, ParametersG2, AP_AIS),
#endif
// @Group: PSC // @Group: PSC
// @Path: ../libraries/APM_Control/AR_PosControl.cpp // @Path: ../libraries/APM_Control/AR_PosControl.cpp
AP_SUBGROUPINFO(pos_control, "PSC", 51, ParametersG2, AR_PosControl), AP_SUBGROUPINFO(pos_control, "PSC", 51, ParametersG2, AR_PosControl),
@ -852,16 +846,23 @@ void Rover::load_parameters(void)
AP_BoardConfig::BOARD_SAFETY_OPTION_BUTTON_ACTIVE_ARMED); AP_BoardConfig::BOARD_SAFETY_OPTION_BUTTON_ACTIVE_ARMED);
#endif #endif
// PARAMETER_CONVERSION - Added: JAN-2022 #if AP_AIRSPEED_ENABLED | AP_AIS_ENABLED
#if AP_AIRSPEED_ENABLED
// Find G2's Top Level Key // Find G2's Top Level Key
AP_Param::ConversionInfo info; AP_Param::ConversionInfo info;
if (!AP_Param::find_top_level_key_by_pointer(&g2, info.old_key)) { if (!AP_Param::find_top_level_key_by_pointer(&g2, info.old_key)) {
return; return;
} }
#endif
// PARAMETER_CONVERSION - Added: JAN-2022
#if AP_AIRSPEED_ENABLED
const uint16_t old_index = 37; // Old parameter index in the tree const uint16_t old_index = 37; // Old parameter index in the tree
const uint16_t old_top_element = 4069; // Old group element in the tree for the first subgroup element const uint16_t old_top_element = 4069; // Old group element in the tree for the first subgroup element
AP_Param::convert_class(info.old_key, &airspeed, airspeed.var_info, old_index, old_top_element, false); AP_Param::convert_class(info.old_key, &airspeed, airspeed.var_info, old_index, old_top_element, false);
#endif #endif
// PARAMETER_CONVERSION - Added: MAR-2022
#if AP_AIS_ENABLED
AP_Param::convert_class(info.old_key, &ais, ais.var_info, 50, 114, false);
#endif
} }

View File

@ -415,11 +415,6 @@ public:
AP_Torqeedo torqeedo; AP_Torqeedo torqeedo;
#endif #endif
#if HAL_AIS_ENABLED
// Automatic Identification System - for tracking sea-going vehicles
AP_AIS ais;
#endif
// position controller // position controller
AR_PosControl pos_control; AR_PosControl pos_control;

View File

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

View File

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

View File

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