SITL: fixed running example firmwares

don't call model update with no sitl instance
This commit is contained in:
Andrew Tridgell 2023-12-30 08:36:18 +11:00
parent 7b5b1ba59f
commit 9428e41301
1 changed files with 5 additions and 1 deletions

View File

@ -607,7 +607,11 @@ void Aircraft::update_home()
void Aircraft::update_model(const struct sitl_input &input) void Aircraft::update_model(const struct sitl_input &input)
{ {
local_ground_level = 0.0f; local_ground_level = 0.0f;
update(input); if (sitl != nullptr) {
update(input);
} else {
time_advance();
}
} }
/* /*