From 2f710a468990b6821fe81acc1e9606f2092020e7 Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Tue, 27 Jun 2023 00:03:04 +1000 Subject: [PATCH] SITL: correct MegaSquirt simulation --- libraries/SITL/SIM_EFI_MegaSquirt.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libraries/SITL/SIM_EFI_MegaSquirt.cpp b/libraries/SITL/SIM_EFI_MegaSquirt.cpp index 7aa29ff229..7cdc183b42 100644 --- a/libraries/SITL/SIM_EFI_MegaSquirt.cpp +++ b/libraries/SITL/SIM_EFI_MegaSquirt.cpp @@ -20,6 +20,7 @@ #include #include #include +#include "SIM_EFI_MegaSquirt.h" using namespace SITL; @@ -37,7 +38,7 @@ static uint32_t CRC32_MS(const uint8_t *buf, uint32_t len) void EFI_MegaSquirt::update() { auto sitl = AP::sitl(); - if (!sitl || sitl->efi_type == SIM::EFI_TYPE_NONE) { + if (!sitl || sitl->efi_type != SIM::EFI_TYPE_MS) { return; } float rpm = sitl->state.rpm[0];