mirror of
https://github.com/iNavFlight/inav.git
synced 2025-07-25 17:25:18 +03:00
Move FAKE sensor defs
This commit is contained in:
parent
09a2e4bd51
commit
3f750f28bb
4 changed files with 13 additions and 6 deletions
|
@ -3562,11 +3562,15 @@ bool mspFCProcessInOutCommand(uint16_t cmdMSP, sbuf_t *dst, sbuf_t *src, mspResu
|
|||
sbufAdvance(src, sizeof(uint16_t) * XYZ_AXIS_COUNT);
|
||||
}
|
||||
|
||||
#if defined(USE_FAKE_BATT_SENSOR)
|
||||
if (SIMULATOR_HAS_OPTION(HITL_EXT_BATTERY_VOLTAGE)) {
|
||||
fakeBattSensorSetVbat(sbufReadU8(src) * 10);
|
||||
} else {
|
||||
#endif
|
||||
fakeBattSensorSetVbat((uint16_t)(SIMULATOR_FULL_BATTERY * 10.0f));
|
||||
#if defined(USE_FAKE_BATT_SENSOR)
|
||||
}
|
||||
#endif
|
||||
|
||||
if (SIMULATOR_HAS_OPTION(HITL_AIRSPEED)) {
|
||||
simulatorData.airSpeed = sbufReadU16(src);
|
||||
|
|
|
@ -211,8 +211,10 @@ STATIC_PROTOTHREAD(pitotThread)
|
|||
float airSpeed;
|
||||
if (SIMULATOR_HAS_OPTION(HITL_AIRSPEED)) {
|
||||
airSpeed = simulatorData.airSpeed;
|
||||
#if defined(USE_PITOT_FAKE)
|
||||
} else if (pitotmeterConfig()->pitot_hardware == PITOT_FAKE) {
|
||||
airSpeed = fakePitotGetAirspeed();
|
||||
#endif
|
||||
} else {
|
||||
airSpeed = 0;
|
||||
}
|
||||
|
@ -244,8 +246,10 @@ STATIC_PROTOTHREAD(pitotThread)
|
|||
#ifdef USE_SIMULATOR
|
||||
if (SIMULATOR_HAS_OPTION(HITL_AIRSPEED)) {
|
||||
pitot.airSpeed = simulatorData.airSpeed;
|
||||
#if defined(USE_PITOT_FAKE)
|
||||
} else if (pitotmeterConfig()->pitot_hardware == PITOT_FAKE) {
|
||||
pitot.airSpeed = fakePitotGetAirspeed();
|
||||
#endif
|
||||
} else {
|
||||
pitot.airSpeed = 0;
|
||||
}
|
||||
|
|
|
@ -57,10 +57,14 @@
|
|||
#define DEFAULT_RX_FEATURE FEATURE_RX_MSP
|
||||
#define DEFAULT_FEATURES (FEATURE_GPS | FEATURE_OSD | FEATURE_CURRENT_METER | FEATURE_VBAT)
|
||||
|
||||
#define USE_IMU_FAKE
|
||||
#define USE_ADC
|
||||
#define USE_MAG
|
||||
#define USE_BARO
|
||||
#define USE_PITOT_FAKE
|
||||
#define USE_IMU_FAKE
|
||||
#define USE_FAKE_BARO
|
||||
#define USE_FAKE_MAG
|
||||
#define USE_GPS_FAKE
|
||||
|
||||
#undef USE_DASHBOARD
|
||||
#undef USE_TELEMETRY_LTM
|
||||
|
|
|
@ -184,11 +184,6 @@
|
|||
#define USE_SIMULATOR
|
||||
#define USE_PITOT_VIRTUAL
|
||||
#define USE_FAKE_BATT_SENSOR
|
||||
#define USE_PITOT_FAKE
|
||||
#define USE_IMU_FAKE
|
||||
#define USE_FAKE_BARO
|
||||
#define USE_FAKE_MAG
|
||||
#define USE_GPS_FAKE
|
||||
|
||||
//Designed to free space of F722 and F411 MCUs
|
||||
#if (MCU_FLASH_SIZE > 512)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue