Skip to content

Commit

Permalink
AP_ICEngine_TCA9554: prime fuel pump at boot
Browse files Browse the repository at this point in the history
  • Loading branch information
robertlong13 committed Dec 10, 2024
1 parent ddd67e1 commit 29810f1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion libraries/AP_ICEngine/AP_ICEngine_TCA9554.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 29810f1

Please sign in to comment.