diff --git a/libraries/SITL/SIM_AirSim.cpp b/libraries/SITL/SIM_AirSim.cpp index 6885393627..083991685e 100644 --- a/libraries/SITL/SIM_AirSim.cpp +++ b/libraries/SITL/SIM_AirSim.cpp @@ -34,7 +34,16 @@ AirSim::AirSim(const char *frame_str) : Aircraft(frame_str), sock(true) { - printf("Starting SITL Airsim\n"); + if (strstr(frame_str, "-copter")) { + output_type = OutputType::Copter; + } else if (strstr(frame_str, "-rover")) { + output_type = OutputType::Rover; + } else { + // default to copter + output_type = OutputType::Copter; + } + + printf("Starting SITL Airsim type %u\n", (unsigned)output_type); } /* @@ -61,9 +70,9 @@ void AirSim::set_interface_ports(const char* address, const int port_in, const i /* Decode and send servos */ -void AirSim::send_servos(const struct sitl_input &input) +void AirSim::output_copter(const struct sitl_input &input) { - servo_packet pkt{0}; + servo_packet pkt; for (uint8_t i=0; i