mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-03 14:38:30 -04:00
SITL: correct MegaSquirt simulation
This commit is contained in:
parent
3f730a8a94
commit
2f710a4689
@ -20,6 +20,7 @@
|
|||||||
#include <SITL/SITL.h>
|
#include <SITL/SITL.h>
|
||||||
#include <AP_HAL/utility/sparse-endian.h>
|
#include <AP_HAL/utility/sparse-endian.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
#include "SIM_EFI_MegaSquirt.h"
|
||||||
|
|
||||||
using namespace SITL;
|
using namespace SITL;
|
||||||
|
|
||||||
@ -37,7 +38,7 @@ static uint32_t CRC32_MS(const uint8_t *buf, uint32_t len)
|
|||||||
void EFI_MegaSquirt::update()
|
void EFI_MegaSquirt::update()
|
||||||
{
|
{
|
||||||
auto sitl = AP::sitl();
|
auto sitl = AP::sitl();
|
||||||
if (!sitl || sitl->efi_type == SIM::EFI_TYPE_NONE) {
|
if (!sitl || sitl->efi_type != SIM::EFI_TYPE_MS) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
float rpm = sitl->state.rpm[0];
|
float rpm = sitl->state.rpm[0];
|
||||||
|
Loading…
Reference in New Issue
Block a user