Skip to content

Commit

Permalink
AP_HAL_SITL: split MAVLink and physical gimbal simulations
Browse files Browse the repository at this point in the history
  • Loading branch information
peterbarker committed Jul 21, 2024
1 parent fc28e2d commit ed3aeb3
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion libraries/AP_HAL_SITL/SITL_State.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion libraries/AP_HAL_SITL/SITL_State_common.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions libraries/AP_HAL_SITL/SITL_cmdline.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit ed3aeb3

Please sign in to comment.