open loop boost does not really require Map sensor
only:small-can-board
This commit is contained in:
parent
300e08d4c4
commit
f2453ce251
|
@ -47,6 +47,10 @@ void BoostController::onConfigurationChange(engine_configuration_s const * previ
|
|||
|
||||
expected<float> BoostController::observePlant() {
|
||||
expected<float> map = Sensor::get(SensorType::Map);
|
||||
if (!map.Valid && engineConfiguration->boostType != CLOSED_LOOP) {
|
||||
// if we're in open loop only let's somewhat operate even without valid Map sensor
|
||||
map = 0;
|
||||
}
|
||||
isPlantValid = map.Valid;
|
||||
return map;
|
||||
}
|
||||
|
|
|
@ -33,6 +33,7 @@ TEST(BoostControl, Setpoint) {
|
|||
|
||||
TEST(BoostControl, ObservePlant) {
|
||||
EngineTestHelper eth(engine_type_e::TEST_ENGINE);
|
||||
engineConfiguration->boostType = CLOSED_LOOP;
|
||||
|
||||
BoostController bc;
|
||||
|
||||
|
|
Loading…
Reference in New Issue