Skip to content

Commit

Permalink
AP_ICEngine_TCA9554: add fuel pump power control
Browse files Browse the repository at this point in the history
New aircraft have the fuel pump connected to the TCA9554 instead of the
ECU. This commit simply runs the fuel pump when the engine is running.
  • Loading branch information
robertlong13 committed Dec 10, 2024
1 parent 1ed7f3b commit 56a2941
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
4 changes: 4 additions & 0 deletions libraries/AP_ICEngine/AP_ICEngine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -643,6 +643,10 @@ void AP_ICEngine::set_ignition(bool on)
}
#endif // AP_RELAY_ENABLED

#if AP_ICENGINE_TCA9554_STARTER_ENABLED
tca9554_starter.set_ignition(on);
#endif

}

/*
Expand Down
3 changes: 3 additions & 0 deletions libraries/AP_ICEngine/AP_ICEngine_TCA9554.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,9 @@ void AP_ICEngine_TCA9554::set_starter(bool on, AP_Int8 crank_direction)
if (crank_direction) {
value |= REVERSE;
}
if (ignition_on) {
value |= FUEL_PUMP;
}
TCA9554_set(value);
}

Expand Down
2 changes: 2 additions & 0 deletions libraries/AP_ICEngine/AP_ICEngine_TCA9554.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

class AP_ICEngine_TCA9554 {
public:
void set_ignition(bool on) { ignition_on = on; }
void set_starter(bool on, AP_Int8 crank_direction);

private:
Expand All @@ -17,6 +18,7 @@ class AP_ICEngine_TCA9554 {
uint8_t last_state;

bool initialised;
bool ignition_on;

bool TCA9554_init();
void TCA9554_set(uint8_t value);
Expand Down

0 comments on commit 56a2941

Please sign in to comment.