typo/grammar

This commit is contained in:
rusefillc 2022-04-13 17:55:31 -04:00
parent cdee39b910
commit 413e636d4c
5 changed files with 82 additions and 70 deletions

View File

@ -172,18 +172,41 @@ static void handlePageSelectCommand(TsChannelBase *tsChannel, ts_response_format
static const void * getStructAddr(live_data_e structId) {
switch (structId) {
#if EFI_HPFP
case LDS_high_pressure_fuel_pump:
return static_cast<high_pressure_fuel_pump_s*>(&engine->module<HpfpController>().unmock());
#endif // EFI_HPFP
case LDS_launch_control_state:
return static_cast<launch_control_state_s*>(&engine->launchController);
case LDS_injector_model:
return static_cast<injector_model_s*>(&engine->module<InjectorModel>().unmock());
#if EFI_BOOST_CONTROL
case LDS_boost_control:
return static_cast<boost_control_s*>(&engine->boostController);
#endif // EFI_BOOST_CONTROL
case LDS_ac_control:
return static_cast<ac_control_s*>(&engine->module<AcController>().unmock());
case LDS_fan_control:
return static_cast<fan_control_s*>(&engine->fan1);
case LDS_fuel_pump:
return static_cast<fuel_pump_control_s*>(&engine->module<FuelPumpController>().unmock());
case LDS_main_relay:
return static_cast<main_relay_s*>(&engine->module<MainRelayController>().unmock());
case LDS_engine_state:
return static_cast<engine_state2_s*>(&engine->engineState);
case LDS_wall_fuel_state:
return static_cast<wall_fuel_state*>(&engine->injectionEvents.elements[0].wallFuel);
case LDS_tps_accel_state:
return static_cast<tps_accel_state_s*>(&engine->tpsAccelEnrichment);
case LDS_trigger_central:
return static_cast<trigger_central_s*>(&engine->triggerCentral);
case LDS_trigger_state:
return static_cast<trigger_state_s*>(&engine->triggerCentral.triggerState);
case LDS_ac_control:
return static_cast<ac_control_s*>(&engine->module<AcController>().unmock());
case LDS_fuel_pump:
return static_cast<fuel_pump_control_s*>(&engine->module<FuelPumpController>().unmock());
case LDS_wall_fuel_state:
return static_cast<wall_fuel_state*>(&engine->injectionEvents.elements[0].wallFuel);
case LDS_idle_state:
return static_cast<idle_state_s*>(&engine->module<IdleController>().unmock());
case LDS_ignition_state:
return static_cast<ignition_state_s*>(&engine->ignitionState);
//#if EFI_ELECTRONIC_THROTTLE_BODY
// case LDS_ETB_PID:
// return engine->etbControllers[0]->getPidState();
@ -193,21 +216,8 @@ static const void * getStructAddr(live_data_e structId) {
// case LDS_IDLE_PID:
// return static_cast<pid_state_s*>(getIdlePid());
//#endif /* EFI_IDLE_CONTROL */
case LDS_idle_state:
return static_cast<idle_state_s*>(&engine->module<IdleController>().unmock());
case LDS_tps_accel_state:
return static_cast<tps_accel_state_s*>(&engine->tpsAccelEnrichment);
#if EFI_HPFP
case LDS_high_pressure_fuel_pump:
return static_cast<high_pressure_fuel_pump_s*>(&engine->module<HpfpController>().unmock());
#endif // EFI_HPFP
case LDS_main_relay:
return static_cast<main_relay_s*>(&engine->module<MainRelayController>().unmock());
#if EFI_BOOST_CONTROL
case LDS_boost_control:
return static_cast<boost_control_s*>(&engine->boostController);
#endif // EFI_BOOST_CONTROL
default:
firmwareError(OBD_PCM_Processor_Fault, "getStructAddr not implemented for %d", (int)structId);
return nullptr;
}
}

View File

@ -47,53 +47,6 @@ void FanController::update(bool acActive) {
pin.setValue(result);
}
struct FanControl1 : public FanController {
OutputPin& getPin() {
return enginePins.fanRelay;
}
float getFanOnTemp() {
return engineConfiguration->fanOnTemperature;
}
float getFanOffTemp() {
return engineConfiguration->fanOffTemperature;
}
bool enableWithAc() {
return engineConfiguration->enableFan1WithAc;
}
bool disableWhenStopped() {
return engineConfiguration->disableFan1WhenStopped;
}
};
struct FanControl2 : public FanController {
OutputPin& getPin() {
return enginePins.fanRelay2;
}
float getFanOnTemp() {
return engineConfiguration->fan2OnTemperature;
}
float getFanOffTemp() {
return engineConfiguration->fan2OffTemperature;
}
bool enableWithAc() {
return engineConfiguration->enableFan2WithAc;
}
bool disableWhenStopped() {
return engineConfiguration->disableFan2WhenStopped;
}
};
static FanControl1 fan1;
static FanControl2 fan2;
void updateFans(bool acActive) {
#if EFI_PROD_CODE
if (isRunningBenchTest()) {
@ -101,6 +54,6 @@ void updateFans(bool acActive) {
}
#endif
fan1.update(acActive);
fan2.update(acActive);
engine->fan1.update(acActive);
engine->fan2.update(acActive);
}

View File

@ -17,3 +17,47 @@ protected:
};
void updateFans(bool acActive);
struct FanControl1 : public FanController {
OutputPin& getPin() {
return enginePins.fanRelay;
}
float getFanOnTemp() {
return engineConfiguration->fanOnTemperature;
}
float getFanOffTemp() {
return engineConfiguration->fanOffTemperature;
}
bool enableWithAc() {
return engineConfiguration->enableFan1WithAc;
}
bool disableWhenStopped() {
return engineConfiguration->disableFan1WhenStopped;
}
};
struct FanControl2 : public FanController {
OutputPin& getPin() {
return enginePins.fanRelay2;
}
float getFanOnTemp() {
return engineConfiguration->fan2OnTemperature;
}
float getFanOffTemp() {
return engineConfiguration->fan2OffTemperature;
}
bool enableWithAc() {
return engineConfiguration->enableFan2WithAc;
}
bool disableWhenStopped() {
return engineConfiguration->disableFan2WhenStopped;
}
};

View File

@ -39,6 +39,7 @@
#include "dfco.h"
#include "gear_detector.h"
#include "advance_map.h"
#include "fan_control.h"
#ifndef EFI_UNIT_TEST
#error EFI_UNIT_TEST must be defined!
@ -215,6 +216,10 @@ public:
IgnitionState ignitionState;
FanControl1 fan1;
FanControl2 fan2;
efitick_t mostRecentSparkEvent;
efitick_t mostRecentTimeBetweenSparkEvents;
efitick_t mostRecentIgnitionEvent;

View File

@ -94,7 +94,7 @@ public class ConfigDefinition {
ToolUtil.TOOL = args[i + 1];
break;
case KEY_DEFINITION:
// lame: order of command line arguments is important, this arguments should be AFTER '-tool' argument
// lame: order of command line arguments is important, these arguments should be AFTER '-tool' argument
definitionInputFile = args[i + 1];
state.headerMessage = ToolUtil.getGeneratedAutomaticallyTag() + definitionInputFile + " " + new Date();
state.inputFiles.add(definitionInputFile);