From 29810f1369af3ebe6f1fb7c60f5d13f586179193 Mon Sep 17 00:00:00 2001 From: Bob Long Date: Tue, 10 Dec 2024 15:24:45 +1100 Subject: [PATCH] AP_ICEngine_TCA9554: prime fuel pump at boot --- libraries/AP_ICEngine/AP_ICEngine_TCA9554.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libraries/AP_ICEngine/AP_ICEngine_TCA9554.cpp b/libraries/AP_ICEngine/AP_ICEngine_TCA9554.cpp index f218b21f76..58304bd18b 100644 --- a/libraries/AP_ICEngine/AP_ICEngine_TCA9554.cpp +++ b/libraries/AP_ICEngine/AP_ICEngine_TCA9554.cpp @@ -35,6 +35,8 @@ enum PIN_MASK { #define TCA9554_CONF 0x03 // Configuration Port register address [0 = Output] #define TCA9554_PINS (~(FUEL_PUMP | LED_OFF | REVERSE | STOP_CRANKING)) // Set all used ports to outputs +#define FUEL_PUMP_PRIMING_TIME_MS 30000 + /* initialise TCA9554 */ @@ -103,7 +105,7 @@ void AP_ICEngine_TCA9554::set_starter(bool on, AP_Int8 crank_direction) if (crank_direction) { value |= REVERSE; } - if (ignition_on) { + if (ignition_on || AP_HAL::millis64() < FUEL_PUMP_PRIMING_TIME_MS) { value |= FUEL_PUMP; } TCA9554_set(value);