diff --git a/firmware/controllers/algo/engine_state.txt b/firmware/controllers/algo/engine_state.txt index eb868b2d7f..9f9a9a5da3 100644 --- a/firmware/controllers/algo/engine_state.txt +++ b/firmware/controllers/algo/engine_state.txt @@ -103,5 +103,7 @@ running_fuel_s running float egt1 float egt2 + int16_t desiredRpmLimit;User-defined RPM hard limit;"rpm", 1, 0, 0, 30000, 0 + ! engine_state2_s end_struct diff --git a/firmware/controllers/limp_manager.cpp b/firmware/controllers/limp_manager.cpp index 61eb8d300c..15bb4818fb 100644 --- a/firmware/controllers/limp_manager.cpp +++ b/firmware/controllers/limp_manager.cpp @@ -12,6 +12,7 @@ void LimpManager::updateState(int rpm, efitick_t nowNt) { { // User-configured hard RPM limit, either constant or CLT-lookup + // todo: migrate to engineState->desiredRpmLimit to get this variable logged float revLimit = engineConfiguration->useCltBasedRpmLimit ? interpolate2d(Sensor::get(SensorType::Clt).value_or(0), engineConfiguration->cltRevLimitRpmBins, engineConfiguration->cltRevLimitRpm) : (float)engineConfiguration->rpmHardLimit;