gen_live_documentation cache (#1544)

Co-authored-by: Andrei <andreikagit@users.noreply.github.com>
This commit is contained in:
andreika-git 2020-06-28 18:50:51 +03:00 committed by GitHub
parent 0385a11bc8
commit d5083d84ea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 155 additions and 7 deletions

View File

@ -5,30 +5,35 @@ rm gen_live_documentation.log
java -DSystemOut.name=gen_live_documentation \
-jar ../java_tools/ConfigDefinition.jar \
-definition integration/pid_state.txt \
-cache tunerstudio/cache \
-java_destination ../java_console/models/src/com/rusefi/config/generated/PidState.java \
-c_destination controllers/generated/pid_state_generated.h
java -DSystemOut.name=gen_live_documentation \
-jar ../java_tools/ConfigDefinition.jar \
-definition integration/engine_state.txt \
-cache tunerstudio/cache \
-java_destination ../java_console/models/src/com/rusefi/config/generated/EngineState.java \
-c_destination controllers/generated/engine_state_generated.h
java -DSystemOut.name=gen_live_documentation \
-jar ../java_tools/ConfigDefinition.jar \
-definition integration/trigger_central.txt \
-cache tunerstudio/cache \
-java_destination ../java_console/models/src/com/rusefi/config/generated/TriggerCentral.java \
-c_destination controllers/generated/trigger_central_generated.h
java -DSystemOut.name=gen_live_documentation \
-jar ../java_tools/ConfigDefinition.jar \
-definition integration/trigger_state.txt \
-cache tunerstudio/cache \
-java_destination ../java_console/models/src/com/rusefi/config/generated/TriggerState.java \
-c_destination controllers/generated/trigger_state_generated.h
java -DSystemOut.name=gen_live_documentation \
-jar ../java_tools/ConfigDefinition.jar \
-definition integration/wall_fuel_state.txt \
-cache tunerstudio/cache \
-java_destination ../java_console/models/src/com/rusefi/config/generated/WallFuelState.java \
-c_destination controllers/generated/wall_fuel_generated.h

View File

@ -0,0 +1,109 @@
struct_no_prefix engine_state2_s
struct_no_prefix speed_density_s
bit isTChargeAirModel
float airMassInOneCylinder;Speed-density logic: calculated air mass in one cylinder, in grams
float tCharge;speed density\nRate-of-change limiter is applied to degrees, so we store both Kelvin and degrees.;
float tChargeK
float Tcharge_coff
floatms_t airFlow
float manifoldAirPressureAccelerationAdjustment;
float adjustedManifoldAirPressure;
! speed_density_s
end_struct
speed_density_s sd;
struct_no_prefix idle_state_s
idle_state_e idleState
percent_t currentIdlePosition;that's current position with CLT and IAT corrections
percent_t baseIdlePosition;current position without adjustments (iacByTpsTaper, afterCrankingIACtaperDuration)
int throttlePedalUpState;true in IDLE throttle pedal state, false if driver is touching the pedal\ntodo: better name for this field?
percent_t etbIdleAddition;ETB position adjustment related to idle RPM control
! end of idle_state_s structure definition
end_struct
! actually define a member of 'idle_state_s' type
idle_state_s idle;
float targetAFR
float engineCycleDurationMs;
float minRpmKcurrentTPS
int currentTpsAdc
float tpsVoltageMCU
float tpsVoltageBoard
float currentBaroCorrectedVE;
float injectorFlowCorrection;
float baroCorrection;
bit isCrankingState
bit isAutomaticIdle
struct cranking_fuel_s
floatms_t baseFuel;Duration of injection, in ms. During cranking we do not account for injector flow, so if you change injectors you would need to change settings.\nDeprecated. Please use '1'.\nTODO: maybe account for injector flow?
float coolantTemperatureCoefficient;
float tpsCoefficient
float durationCoefficient
floatms_t fuel;Actual injection duration based on all above coefficients.
! end of cranking_s structure definition
end_struct
! actually define a member of 'cranking_s' type
cranking_fuel_s cranking
struct running_fuel_s
float postCrankingFuelCorrection
float intakeTemperatureCoefficient
float coolantTemperatureCoefficient
float timeSinceCrankingInSecs
floatms_t injectorLag;injectorLag(VBatt)\nthis value depends on a slow-changing VBatt value, so\nwe update it once in a while
floatms_t pidCorrection;closed-loop fuel correction
floatms_t baseFuel;
floatms_t fuel;Actual injection duration with CLT, IAT and TPS acceleration corrections per cycle, as squirt duration.\nWithout injector lag.\n@see baseFuel\n@see actualLastInjection
! end of running_fuel_s structure definition
end_struct
! actually define a member of 'running_fuel_s' type
running_fuel_s running
percent_t etbFeedForward;
percent_t targetFromTable
! spark-related
floatms_t sparkDwell;ignition dwell duration in ms\nSee also dwellAngle
angle_t dwellAngle;ignition dwell duration as crankshaft angle\nNAN if engine is stopped\nSee also sparkDwell
angle_t cltTimingCorrection
! engine_state2_s
end_struct

View File

@ -0,0 +1,11 @@
struct_no_prefix pid_state_s
float iTerm;
float dTerm;we are remembering this only for debugging purposes
float target;only used for logging
float input;only used for logging
float output;only used for logging
float errorAmplificationCoef;
float previousError
end_struct

View File

@ -0,0 +1,14 @@
#define HW_EVENT_TYPES 6
struct_no_prefix define_constructor trigger_central_s
int[HW_EVENT_TYPES iterate] hwEventCounters;Counter of hardware events since ECU start
int vvtCamCounter
int vvtEventRiseCounter
int vvtEventFallCounter
end_struct

View File

@ -0,0 +1,3 @@
struct_no_prefix trigger_state_s
float currentGap;
end_struct

View File

@ -0,0 +1,5 @@
struct_no_prefix wall_fuel_state
float wallFuelCorrection;* fuel injection time correction to account for wall wetting effect, for current cycle
floatms_t wallFuel;Amount of fuel on the wall, in ms of injector open time, for each injector.
! wall_fuel_state
end_struct

View File

@ -96,7 +96,7 @@ public class ConfigDefinition {
CHeaderConsumer.withC_Defines = true;
// used to update .ini files
List<String> inputTsFiles = new ArrayList<>();
List<String> inputAllFiles = new ArrayList<>();
// used to update other files
List<String> inputFiles = new ArrayList<>();
// disable the lazy checks because we use timestamps to detect changes
@ -155,13 +155,13 @@ public class ConfigDefinition {
}
}
inputAllFiles = new ArrayList<>(inputFiles);
boolean needToUpdateTsFiles = false;
if (tsPath != null) {
inputTsFiles = new ArrayList<>(inputFiles);
inputTsFiles.add(TSProjectConsumer.getTsFileInputName(tsPath));
inputAllFiles.add(TSProjectConsumer.getTsFileInputName(tsPath));
SystemOut.println("Check the input/output TS files:");
needToUpdateTsFiles = checkIfOutputFilesAreOutdated(inputAllFiles, cachePath);
}
SystemOut.println("Check the input/output TS files:");
boolean needToUpdateTsFiles = checkIfOutputFilesAreOutdated(inputTsFiles, cachePath);
SystemOut.println("Check the input/output other files:");
boolean needToUpdateOtherFiles = checkIfOutputFilesAreOutdated(inputFiles, cachePath);
if (!needToUpdateTsFiles && !needToUpdateOtherFiles)
@ -235,7 +235,7 @@ public class ConfigDefinition {
writer.close();
}
saveCachedInputFiles(inputTsFiles, cachePath);
saveCachedInputFiles(inputAllFiles, cachePath);
}
private static boolean needToSkipRebuild(String skipRebuildFile, String currentMD5) throws IOException {
@ -408,6 +408,7 @@ public class ConfigDefinition {
throw e;
}
}
SystemOut.println("* input files copied to the cached folder");
return true;
}