AP_HAL_SITL: split MAVLink and physical gimbal simulations

This commit is contained in:
Peter Barker 2024-07-17 16:52:20 +10:00 committed by Peter Barker
parent fc28e2d7b8
commit ed3aeb39fd
3 changed files with 4 additions and 2 deletions

View File

@ -81,7 +81,7 @@ void SITL_State::_sitl_setup()
_update_airspeed(0);
#if AP_SIM_SOLOGIMBAL_ENABLED
if (enable_gimbal) {
gimbal = NEW_NOTHROW SITL::SoloGimbal(_sitl->state);
gimbal = NEW_NOTHROW SITL::SoloGimbal();
}
#endif

View File

@ -334,7 +334,7 @@ void SITL_State_Common::sim_update(void)
{
#if AP_SIM_SOLOGIMBAL_ENABLED
if (gimbal != nullptr) {
gimbal->update();
gimbal->update(*sitl_model);
}
#endif
#if HAL_SIM_ADSB_ENABLED

View File

@ -439,9 +439,11 @@ void SITL_State::_parse_command_line(int argc, char * const argv[])
case 'v':
vehicle_str = gopt.optarg;
break;
#if AP_SIM_SOLOGIMBAL_ENABLED
case CMDLINE_GIMBAL:
enable_gimbal = true;
break;
#endif
case CMDLINE_FGVIEW:
_use_fg_view = true;
break;