mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-13 14:43:34 +08:00
Allow user to set choke position through parameter
This commit is contained in:
@@ -319,7 +319,8 @@ void InternalCombustionEngineControl::controlEngineStartup(const hrt_abstime now
|
||||
|
||||
_ignition_on = true;
|
||||
_throttle_control = _param_ice_strt_thr.get();
|
||||
_choke_control = now < _state_start_time + (choke_duration + ignition_delay) * 1_s ? 1.f : 0.f;
|
||||
_choke_control = now < _state_start_time + (choke_duration + ignition_delay) * 1_s ? math::constrain(
|
||||
_param_ice_strt_choke.get(), 0.f, 1.f) : 0.f;
|
||||
_starter_engine_control = now > _state_start_time + (ignition_delay * 1_s) ? 1.f : 0.f;
|
||||
const hrt_abstime cycle_timeout_duration = (ignition_delay + choke_duration + starter_duration) * 1_s;
|
||||
|
||||
@@ -355,7 +356,7 @@ int InternalCombustionEngineControl::print_usage(const char *reason)
|
||||
PRINT_MODULE_DESCRIPTION(
|
||||
R"DESCR_STR(
|
||||
### Description
|
||||
|
||||
|
||||
The module controls internal combustion engine (ICE) features including:
|
||||
ignition (on/off), throttle and choke level, starter engine delay, and user request.
|
||||
|
||||
@@ -389,18 +390,18 @@ The ICE is implemented with a (4) state machine:
|
||||

|
||||
|
||||
The state machine:
|
||||
|
||||
|
||||
- Checks if [Rpm.msg](../msg_docs/Rpm.md) is updated to know if the engine is running
|
||||
- Allows for user inputs from:
|
||||
- AUX{N}
|
||||
- Arming state in [VehicleStatus.msg](../msg_docs/VehicleStatus.md)
|
||||
|
||||
The module publishes [InternalCombustionEngineControl.msg](../msg_docs/InternalCombustionEngineControl.md).
|
||||
|
||||
|
||||
The architecture is as shown below:
|
||||
|
||||

|
||||
|
||||
|
||||
<a id="internal_combustion_engine_control_usage"></a>
|
||||
)DESCR_STR");
|
||||
|
||||
|
||||
@@ -152,7 +152,8 @@ private:
|
||||
(ParamFloat<px4::params::ICE_STRT_THR>) _param_ice_strt_thr,
|
||||
(ParamInt<px4::params::ICE_STOP_CHOKE>) _param_ice_stop_choke,
|
||||
(ParamFloat<px4::params::ICE_THR_SLEW>) _param_ice_thr_slew,
|
||||
(ParamFloat<px4::params::ICE_IGN_DELAY>) _param_ice_ign_delay
|
||||
(ParamFloat<px4::params::ICE_IGN_DELAY>) _param_ice_ign_delay,
|
||||
(ParamFloat<px4::params::ICE_STRT_CHOKE>) _param_ice_strt_choke
|
||||
)
|
||||
};
|
||||
|
||||
|
||||
@@ -118,3 +118,14 @@ parameters:
|
||||
decimal: 1
|
||||
increment: 0.1
|
||||
default: 0
|
||||
|
||||
ICE_STRT_CHOKE:
|
||||
description:
|
||||
short: Choke position during startup, 1 for fully choked.
|
||||
type: float
|
||||
unit: norm
|
||||
min: 0
|
||||
max: 1
|
||||
decimal: 0
|
||||
increment: 0.01
|
||||
default: 0.8
|
||||
|
||||
Reference in New Issue
Block a user