diff --git a/firmware/gen_live_documentation.sh b/firmware/gen_live_documentation.sh index ad13fcf48a..c4c7d01fc9 100755 --- a/firmware/gen_live_documentation.sh +++ b/firmware/gen_live_documentation.sh @@ -2,18 +2,25 @@ rm gen_live_documentation.log -bash gen_live_documentation_one_file.sh ac_control AcControl.java +bash gen_live_documentation_one_file.sh ac_control AcControl.java controllers/actuators +[ $? -eq 0 ] || { echo "ERROR generating"; exit 1; } -bash gen_live_documentation_one_file.sh pid_state PidState.java +bash gen_live_documentation_one_file.sh pid_state PidState.java util/math +[ $? -eq 0 ] || { echo "ERROR generating"; exit 1; } -bash gen_live_documentation_one_file.sh engine_state EngineState.java +bash gen_live_documentation_one_file.sh engine_state EngineState.java controllers/algo +[ $? -eq 0 ] || { echo "ERROR generating"; exit 1; } -bash gen_live_documentation_one_file.sh trigger_central TriggerCentral.java +bash gen_live_documentation_one_file.sh trigger_central TriggerCentral.java controllers/trigger +[ $? -eq 0 ] || { echo "ERROR generating"; exit 1; } -bash gen_live_documentation_one_file.sh trigger_state TriggerState.java +bash gen_live_documentation_one_file.sh trigger_state TriggerState.java controllers/trigger +[ $? -eq 0 ] || { echo "ERROR generating"; exit 1; } -bash gen_live_documentation_one_file.sh wall_fuel_state WallFuelState.java +bash gen_live_documentation_one_file.sh wall_fuel_state WallFuelState.java controllers/algo +[ $? -eq 0 ] || { echo "ERROR generating"; exit 1; } java -DSystemOut.name=gen_live_documentation \ -cp ../java_tools/ConfigDefinition.jar \ com.rusefi.ldmp.UsagesReader integration/LiveData.yaml +[ $? -eq 0 ] || { echo "ERROR generating"; exit 1; } diff --git a/firmware/gen_live_documentation_one_file.sh b/firmware/gen_live_documentation_one_file.sh index 0dbc4abd9c..911053be0e 100644 --- a/firmware/gen_live_documentation_one_file.sh +++ b/firmware/gen_live_documentation_one_file.sh @@ -1,13 +1,14 @@ #!/bin/bash -if [ ! "$1" ] || [ ! "$2" ]; then - printf "Two parameters expected" +if [ ! "$1" ] || [ ! "$2" ] || [ ! "$3" ]; then + printf "Three parameters expected" exit 1 fi meta_name=$1 # TODO: programmatically produce java output name based on meta file name java_output=$2 +folder=$3 meta_file_name=${meta_name}.txt header_file="${meta_name}_generated.h" @@ -15,8 +16,8 @@ header_file="${meta_name}_generated.h" java -DSystemOut.name=gen_live_documentation \ -jar ../java_tools/ConfigDefinition.jar \ - -definition integration/$meta_file_name \ + -definition $folder/$meta_file_name \ -cache_zip_file tunerstudio/generated/cache.zip \ -cache . \ -java_destination ../java_console/models/src/main/java/com/rusefi/config/generated/$java_output \ - -c_destination controllers/generated/${header_file} \ No newline at end of file + -c_destination $folder/${header_file} \ No newline at end of file