| Line | Branch | Decision | Exec | Source |
|---|---|---|---|---|
| 1 | // | |||
| 2 | // Created by kifir on 11/18/24. | |||
| 3 | // | |||
| 4 | ||||
| 5 | #include "pch.h" | |||
| 6 | ||||
| 7 | #include "engine_config.h" | |||
| 8 | ||||
| 9 | 34 | EngineConfig EngineConfig::clone() const { | ||
| 10 | 34 | return *this; | ||
| 11 | } | |||
| 12 | ||||
| 13 | 4 | EngineConfig EngineConfig::setClutchDownPin(const std::optional<switch_input_pin_e> value) { | ||
| 14 | 4 | m_clutchDownPin = value; | ||
| 15 | 4 | return *this; | ||
| 16 | } | |||
| 17 | ||||
| 18 | 4 | EngineConfig EngineConfig::setClutchDownPinMode(const std::optional<pin_input_mode_e> value) { | ||
| 19 | 4 | m_clutchDownPinMode = value; | ||
| 20 | 4 | return *this; | ||
| 21 | } | |||
| 22 | ||||
| 23 | 4 | EngineConfig EngineConfig::setClutchUpPin(const std::optional<switch_input_pin_e> value) { | ||
| 24 | 4 | m_clutchUpPin = value; | ||
| 25 | 4 | return *this; | ||
| 26 | } | |||
| 27 | ||||
| 28 | 4 | EngineConfig EngineConfig::setClutchUpPinMode(const std::optional<pin_input_mode_e> value) { | ||
| 29 | 4 | m_clutchUpPinMode = value; | ||
| 30 | 4 | return *this; | ||
| 31 | } | |||
| 32 | ||||
| 33 | 1 | EngineConfig EngineConfig::setLaunchActivatePin(const std::optional<switch_input_pin_e> value) { | ||
| 34 | 1 | m_launchActivatePin = value; | ||
| 35 | 1 | return *this; | ||
| 36 | } | |||
| 37 | ||||
| 38 | 2 | EngineConfig EngineConfig::setLaunchActivatePinMode(const std::optional<pin_input_mode_e> value) { | ||
| 39 | 2 | m_launchActivatePinMode = value; | ||
| 40 | 2 | return *this; | ||
| 41 | } | |||
| 42 | ||||
| 43 | 18 | EngineConfig EngineConfig::setLaunchControlEnabled(const std::optional<bool> value) { | ||
| 44 | 18 | m_launchControlEnabled = value; | ||
| 45 | 18 | return *this; | ||
| 46 | } | |||
| 47 | ||||
| 48 | 18 | EngineConfig EngineConfig::setLaunchRpm(const std::optional<int> value) { | ||
| 49 | 18 | m_launchRpm = value; | ||
| 50 | 18 | return *this; | ||
| 51 | } | |||
| 52 | ||||
| 53 | 18 | EngineConfig EngineConfig::setLaunchRpmWindow(const std::optional<int> value) { | ||
| 54 | 18 | m_launchRpmWindow = value; | ||
| 55 | 18 | return *this; | ||
| 56 | } | |||
| 57 | ||||
| 58 | 18 | EngineConfig EngineConfig::setLaunchCorrectionsEndRpm(const std::optional<int> value) { | ||
| 59 | 18 | m_launchCorrectionsEndRpm = value; | ||
| 60 | 18 | return *this; | ||
| 61 | } | |||
| 62 | ||||
| 63 | 10 | EngineConfig EngineConfig::setIgnitionRetardEnable(const std::optional<bool> value) { | ||
| 64 | 10 | m_ignitionRetardEnable = value; | ||
| 65 | 10 | return *this; | ||
| 66 | } | |||
| 67 | ||||
| 68 | 10 | EngineConfig EngineConfig::setIgnitionRetard(const std::optional<float> value) { | ||
| 69 | 10 | m_ignitionRetard = value; | ||
| 70 | 10 | return *this; | ||
| 71 | } | |||
| 72 | ||||
| 73 | 10 | EngineConfig EngineConfig::setSmoothRetardMode(const std::optional<bool> value) { | ||
| 74 | 10 | m_smoothRetardMode = value; | ||
| 75 | 10 | return *this; | ||
| 76 | } | |||
| 77 | ||||
| 78 | 18 | EngineConfig EngineConfig::setEnableIgnitionCut(const std::optional<bool> value) { | ||
| 79 | 18 | m_enableIgnitionCut = value; | ||
| 80 | 18 | return *this; | ||
| 81 | } | |||
| 82 | ||||
| 83 | 8 | EngineConfig EngineConfig::setInitialIgnitionCut(const std::optional<int> value) { | ||
| 84 | 8 | m_initialIgnitionCut = value; | ||
| 85 | 8 | return *this; | ||
| 86 | } | |||
| 87 | ||||
| 88 | 8 | EngineConfig EngineConfig::setFinalIgnitionCutBeforeLaunch(const std::optional<int> value) { | ||
| 89 | 8 | m_finalIgnitionCutBeforeLaunch = value; | ||
| 90 | 8 | return *this; | ||
| 91 | } | |||
| 92 | ||||
| 93 | 19 | EngineConfig EngineConfig::setTorqueReductionEnabled(const std::optional<bool> value) { | ||
| 94 | 19 | m_isTorqueReductionEnabled = value; | ||
| 95 | 19 | return *this; | ||
| 96 | } | |||
| 97 | ||||
| 98 | 35 | EngineConfig EngineConfig::setTorqueReductionActivationMode( | ||
| 99 | const std::optional<torqueReductionActivationMode_e> value | |||
| 100 | ) { | |||
| 101 | 35 | m_torqueReductionActivationMode = value; | ||
| 102 | 35 | return *this; | ||
| 103 | } | |||
| 104 | ||||
| 105 | 18 | EngineConfig EngineConfig::setTorqueReductionTriggerPin(const std::optional<switch_input_pin_e> value) { | ||
| 106 | 18 | m_torqueReductionTriggerPin = value; | ||
| 107 | 18 | return *this; | ||
| 108 | } | |||
| 109 | ||||
| 110 | 4 | EngineConfig EngineConfig::setTorqueReductionTriggerPinMode(const std::optional<pin_input_mode_e> value) { | ||
| 111 | 4 | m_torqueReductionTriggerPinMode = value; | ||
| 112 | 4 | return *this; | ||
| 113 | } | |||
| 114 | ||||
| 115 | 14 | EngineConfig EngineConfig::setLimitTorqueReductionTime(std::optional<bool> value) { | ||
| 116 | 14 | m_limitTorqueReductionTime = value; | ||
| 117 | 14 | return *this; | ||
| 118 | } | |||
| 119 | ||||
| 120 | 12 | EngineConfig EngineConfig::setTorqueReductionTime(const std::optional<float> value) { | ||
| 121 | 12 | m_torqueReductionTime = value; | ||
| 122 | 12 | return *this; | ||
| 123 | } | |||
| 124 | ||||
| 125 | 7 | EngineConfig EngineConfig::setTorqueReductionArmingRpm(std::optional<float> value) { | ||
| 126 | 7 | m_torqueReductionArmingRpm = value; | ||
| 127 | 7 | return *this; | ||
| 128 | } | |||
| 129 | ||||
| 130 | 7 | EngineConfig EngineConfig::setTorqueReductionArmingApp(std::optional<float> value) { | ||
| 131 | 7 | m_torqueReductionArmingApp = value; | ||
| 132 | 7 | return *this; | ||
| 133 | } | |||
| 134 | ||||
| 135 | 2 | EngineConfig EngineConfig::setTorqueReductionIgnitionCut(const std::optional<int8_t> value) { | ||
| 136 | 2 | m_torqueReductionIgnitionCut = value; | ||
| 137 | 2 | return *this; | ||
| 138 | } | |||
| 139 | ||||
| 140 | 2 | EngineConfig EngineConfig::setTorqueReductionIgnitionRetard(const std::optional<float> value) { | ||
| 141 | 2 | m_torqueReductionIgnitionRetard = value; | ||
| 142 | 2 | return *this; | ||
| 143 | } | |||
| 144 | ||||
| 145 | 3 | EngineConfig EngineConfig::setFuelPressureSensorMode(std::optional<fuel_pressure_sensor_mode_e> value) { | ||
| 146 | 3 | m_fuelPressureSensorMode = value; | ||
| 147 | 3 | return *this; | ||
| 148 | } | |||
| 149 | ||||
| 150 | 1 | EngineConfig EngineConfig::setInjectorFlowAsMassFlow(const std::optional<bool> injectorFlowAsMassFlow) { | ||
| 151 | 1 | m_injectorFlowAsMassFlow = injectorFlowAsMassFlow; | ||
| 152 | 1 | return *this; | ||
| 153 | } | |||
| 154 | ||||
| 155 | 1 | EngineConfig EngineConfig::setInjectorFlow(const std::optional<float> flow) { | ||
| 156 | 1 | m_injectorFlow = flow; | ||
| 157 | 1 | return *this; | ||
| 158 | } | |||
| 159 | ||||
| 160 | 1 | EngineConfig EngineConfig::setInjectorBattLagCorr(const std::optional<BattLagCorrTable> battLagCorr) { | ||
| 161 | 1 | m_injectorBattLagCorrCurve = battLagCorr; | ||
| 162 | 1 | return *this; | ||
| 163 | } | |||
| 164 | ||||
| 165 | 1 | EngineConfig EngineConfig::setFuelReferencePressure(const std::optional<float> value) { | ||
| 166 | 1 | m_fuelReferencePressure = value; | ||
| 167 | 1 | return *this; | ||
| 168 | } | |||
| 169 | ||||
| 170 | 7 | EngineConfig EngineConfig::setInjectorCompensationMode(const std::optional<injector_compensation_mode_e> value) { | ||
| 171 | 7 | m_injectorCompensationMode = value; | ||
| 172 | 7 | return *this; | ||
| 173 | } | |||
| 174 | ||||
| 175 | 1 | EngineConfig EngineConfig::setInjectorSecondaryFlow(const std::optional<float> flow) { | ||
| 176 | 1 | m_injectorSecondaryFlow = flow; | ||
| 177 | 1 | return *this; | ||
| 178 | } | |||
| 179 | ||||
| 180 | 1 | EngineConfig EngineConfig::setInjectorSecondaryBattLagCorr(const std::optional<BattLagCorrTable> battLagCorr) { | ||
| 181 | 1 | m_injectorSecondaryBattLagCorrCurve = battLagCorr; | ||
| 182 | 1 | return *this; | ||
| 183 | } | |||
| 184 | ||||
| 185 | 1 | EngineConfig EngineConfig::setStagedInjectionEnabled(const std::optional<bool> value) { | ||
| 186 | 1 | m_isStagedInjectionEnabled = value; | ||
| 187 | 1 | return *this; | ||
| 188 | } | |||
| 189 | ||||
| 190 | 1 | EngineConfig EngineConfig::setSecondaryInjectorFuelReferencePressure(const std::optional<float> value) { | ||
| 191 | 1 | m_secondaryInjectorFuelReferencePressure = value; | ||
| 192 | 1 | return *this; | ||
| 193 | } | |||
| 194 | ||||
| 195 | 7 | EngineConfig EngineConfig::setSecondaryInjectorCompensationMode( | ||
| 196 | const std::optional<injector_compensation_mode_e> value | |||
| 197 | ) { | |||
| 198 | 7 | m_secondaryInjectorCompensationMode = value; | ||
| 199 | 7 | return *this; | ||
| 200 | } | |||
| 201 | ||||
| 202 | 38 | EngineConfig EngineConfig::setNitrousControlEnabled(const std::optional<bool> value) { | ||
| 203 | 38 | m_nitrousControlEnabled = value; | ||
| 204 | 38 | return *this; | ||
| 205 | } | |||
| 206 | ||||
| 207 | 16 | EngineConfig EngineConfig::setNitrousControlArmingMethod(const std::optional<nitrous_arming_method_e> value) { | ||
| 208 | 16 | m_nitrousControlArmingMethod = value; | ||
| 209 | 16 | return *this; | ||
| 210 | } | |||
| 211 | ||||
| 212 | 12 | EngineConfig EngineConfig::setNitrousControlTriggerPin(const std::optional<switch_input_pin_e> value) { | ||
| 213 | 12 | m_nitrousControlTriggerPin = value; | ||
| 214 | 12 | return *this; | ||
| 215 | } | |||
| 216 | ||||
| 217 | 1 | EngineConfig EngineConfig::setNitrousControlTriggerPinMode(const std::optional<pin_input_mode_e> value) { | ||
| 218 | 1 | m_nitrousControlTriggerPinMode = value; | ||
| 219 | 1 | return *this; | ||
| 220 | } | |||
| 221 | ||||
| 222 | 1 | EngineConfig EngineConfig::setNitrousLuaGauge(const std::optional<lua_gauge_e> value) { | ||
| 223 | 1 | m_nitrousLuaGauge = value; | ||
| 224 | 1 | return *this; | ||
| 225 | } | |||
| 226 | ||||
| 227 | 2 | EngineConfig EngineConfig::setNitrousLuaGaugeMeaning(const std::optional<lua_gauge_meaning_e> value) { | ||
| 228 | 2 | m_nitrousLuaGaugeMeaning = value; | ||
| 229 | 2 | return *this; | ||
| 230 | } | |||
| 231 | ||||
| 232 | 1 | EngineConfig EngineConfig::setNitrousLuaGaugeArmingValue(const std::optional<float> value) { | ||
| 233 | 1 | m_nitrousLuaGaugeArmingValue = value; | ||
| 234 | 1 | return *this; | ||
| 235 | } | |||
| 236 | ||||
| 237 | 13 | EngineConfig EngineConfig::setNitrousMinimumVehicleSpeed(const std::optional<uint16_t> value) { | ||
| 238 | 13 | m_nitrousMinimumVehicleSpeed = value; | ||
| 239 | 13 | return *this; | ||
| 240 | } | |||
| 241 | ||||
| 242 | 13 | EngineConfig EngineConfig::setNitrousMinimumTps(const std::optional<int> value) { | ||
| 243 | 13 | m_nitrousMinimumTps = value; | ||
| 244 | 13 | return *this; | ||
| 245 | } | |||
| 246 | ||||
| 247 | 13 | EngineConfig EngineConfig::setNitrousMinimumClt(const std::optional<uint8_t> value) { | ||
| 248 | 13 | m_nitrousMinimumClt = value; | ||
| 249 | 13 | return *this; | ||
| 250 | } | |||
| 251 | ||||
| 252 | 13 | EngineConfig EngineConfig::setNitrousMaximumMap(const std::optional<uint16_t> value) { | ||
| 253 | 13 | m_nitrousMaximumMap = value; | ||
| 254 | 13 | return *this; | ||
| 255 | } | |||
| 256 | ||||
| 257 | 13 | EngineConfig EngineConfig::setNitrousMaximumAfr(const std::optional<float> value) { | ||
| 258 | 13 | m_nitrousMaximumAfr = value; | ||
| 259 | 13 | return *this; | ||
| 260 | } | |||
| 261 | ||||
| 262 | 12 | EngineConfig EngineConfig::setNitrousActivationRpm(const std::optional<uint16_t> value) { | ||
| 263 | 12 | m_nitrousActivationRpm = value; | ||
| 264 | 12 | return *this; | ||
| 265 | } | |||
| 266 | ||||
| 267 | 12 | EngineConfig EngineConfig::setNitrousDeactivationRpm(const std::optional<uint16_t> value) { | ||
| 268 | 12 | m_nitrousDeactivationRpm = value; | ||
| 269 | 12 | return *this; | ||
| 270 | } | |||
| 271 | ||||
| 272 | 12 | EngineConfig EngineConfig::setNitrousDeactivationRpmWindow(const std::optional<uint16_t> value) { | ||
| 273 | 12 | m_nitrousDeactivationRpmWindow = value; | ||
| 274 | 12 | return *this; | ||
| 275 | } | |||
| 276 | ||||
| 277 | 11 | EngineConfig EngineConfig::setNitrousFuelAdderPercent(const std::optional<int8_t> value) { | ||
| 278 | 11 | m_nitrousFuelAdderPercent = value; | ||
| 279 | 11 | return *this; | ||
| 280 | } | |||
| 281 | ||||
| 282 | 11 | EngineConfig EngineConfig::setNitrousIgnitionRetard(const std::optional<float> value) { | ||
| 283 | 11 | m_nitrousIgnitionRetard = value; | ||
| 284 | 11 | return *this; | ||
| 285 | } | |||
| 286 | ||||
| 287 | 2 | EngineConfig EngineConfig::setFuelLevelAveragingAlpha(const std::optional<float> value) { | ||
| 288 | 2 | m_fuelLevelAveragingAlpha = value; | ||
| 289 | 2 | return *this; | ||
| 290 | } | |||
| 291 | ||||
| 292 | 2 | EngineConfig EngineConfig::setFuelLevelUpdatePeriodSec(const std::optional<float> value) { | ||
| 293 | 2 | m_fuelLevelUpdatePeriodSec = value; | ||
| 294 | 2 | return *this; | ||
| 295 | } | |||
| 296 | ||||
| 297 | 2 | EngineConfig EngineConfig::setFuelLevelLowThresholdVoltage(const std::optional<float> value) { | ||
| 298 | 2 | m_fuelLevelLowThresholdVoltage = value; | ||
| 299 | 2 | return *this; | ||
| 300 | } | |||
| 301 | ||||
| 302 | 2 | EngineConfig EngineConfig::setFuelLevelHighThresholdVoltage(const std::optional<float> value) { | ||
| 303 | 2 | m_fuelLevelHighThresholdVoltage = value; | ||
| 304 | 2 | return *this; | ||
| 305 | } | |||
| 306 | ||||
| 307 |