diff --git a/libraries/SITL/SIM_Frame.cpp b/libraries/SITL/SIM_Frame.cpp index 384e84b97e..7bd65141e5 100644 --- a/libraries/SITL/SIM_Frame.cpp +++ b/libraries/SITL/SIM_Frame.cpp @@ -411,6 +411,7 @@ void Frame::load_frame_params(const char *model_json) FRAME_VAR(disc_area), FRAME_VAR(mdrag_coef), {"moment_inertia", &model.moment_of_inertia, VarType::VECTOR3F}, + FRAME_VAR(num_motors), }; for (uint8_t i=0; isetup(model.battCapacityAh, model.refBatRes, model.maxVoltage); + if (uint8_t(model.num_motors) != num_motors) { + ::printf("Warning model expected %u motors and got %u\n", uint8_t(model.num_motors), num_motors); + } + for (uint8_t i=0; i