Merge branch 'master' of https://github.com/rusefi/rusefi into master
This commit is contained in:
commit
e4998fc4c4
|
@ -1,6 +1,5 @@
|
||||||
<div align="center">
|
<div align="center">
|
||||||
|
|
||||||
|
|
||||||
<img src="https://raw.githubusercontent.com/wiki/rusefi/rusefi/Images/logo_new.png" alt="rusEFI" width="600" />
|
<img src="https://raw.githubusercontent.com/wiki/rusefi/rusefi/Images/logo_new.png" alt="rusEFI" width="600" />
|
||||||
|
|
||||||
<b>GPL open-source DIY ECU</b>
|
<b>GPL open-source DIY ECU</b>
|
||||||
|
|
|
@ -4,10 +4,6 @@ echo "This batch files reads rusefi_enums.h and produces auto_generated_enums.*
|
||||||
|
|
||||||
rm gen_enum_to_string.log
|
rm gen_enum_to_string.log
|
||||||
|
|
||||||
# todo: remove me soon, UsageReader generates java by itself now!
|
|
||||||
#java -DSystemOut.name=logs/gen_java_enum -cp ../java_tools/enum2string.jar com.rusefi.ToJavaEnum -enumInputFile console/binary/generated/live_data_ids.h -outputPath ../java_console/io/src/main/java/com/rusefi/enums
|
|
||||||
#[ $? -eq 0 ] || { echo "ERROR generating live data ids"; exit 1; }
|
|
||||||
|
|
||||||
java -DSystemOut.name=logs/gen_java_enum -cp ../java_tools/enum2string.jar com.rusefi.ToJavaEnum -enumInputFile controllers/sensors/sensor_type.h -outputPath ../java_console/io/src/main/java/com/rusefi/enums
|
java -DSystemOut.name=logs/gen_java_enum -cp ../java_tools/enum2string.jar com.rusefi.ToJavaEnum -enumInputFile controllers/sensors/sensor_type.h -outputPath ../java_console/io/src/main/java/com/rusefi/enums
|
||||||
[ $? -eq 0 ] || { echo "ERROR generating sensors"; exit 1; }
|
[ $? -eq 0 ] || { echo "ERROR generating sensors"; exit 1; }
|
||||||
|
|
||||||
|
|
|
@ -7,4 +7,7 @@ java -DSystemOut.name=logs/gen_live_documentation \
|
||||||
com.rusefi.ldmp.LiveDataProcessor integration/LiveData.yaml
|
com.rusefi.ldmp.LiveDataProcessor integration/LiveData.yaml
|
||||||
[ $? -eq 0 ] || { echo "ERROR generating"; exit 1; }
|
[ $? -eq 0 ] || { echo "ERROR generating"; exit 1; }
|
||||||
|
|
||||||
|
java -DSystemOut.name=logs/gen_java_enum -cp ../java_tools/enum2string.jar com.rusefi.ToJavaEnum -enumInputFile console/binary/generated/live_data_ids.h -outputPath ../java_console/io/src/main/java/com/rusefi/enums
|
||||||
|
[ $? -eq 0 ] || { echo "ERROR generating live data ids"; exit 1; }
|
||||||
|
|
||||||
bash gen_output_channels.sh
|
bash gen_output_channels.sh
|
||||||
|
|
|
@ -1,15 +1,18 @@
|
||||||
package com.rusefi.enums;
|
package com.rusefi.enums;
|
||||||
|
// based on ./console/binary/generated/live_data_ids.h
|
||||||
//auto-generated by ToJavaEnum.java
|
//auto-generated by ToJavaEnum.java
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public enum live_data_e {
|
public enum live_data_e {
|
||||||
|
LDS_fuel_computer,
|
||||||
|
LDS_timing_state,
|
||||||
LDS_output_channels,
|
LDS_output_channels,
|
||||||
LDS_knock_controller,
|
LDS_knock_controller,
|
||||||
LDS_high_pressure_fuel_pump,
|
LDS_high_pressure_fuel_pump,
|
||||||
LDS_injector_model,
|
LDS_injector_model,
|
||||||
LDS_fuel_computer,
|
|
||||||
LDS_launch_control_state,
|
LDS_launch_control_state,
|
||||||
|
LDS_antilag_system_state,
|
||||||
LDS_boost_control,
|
LDS_boost_control,
|
||||||
LDS_ac_control,
|
LDS_ac_control,
|
||||||
LDS_fan_control,
|
LDS_fan_control,
|
||||||
|
|
|
@ -38,12 +38,14 @@ public enum StateDictionary {
|
||||||
register(live_data_e.LDS_boost_control, BoostControl.VALUES, "boost_control");
|
register(live_data_e.LDS_boost_control, BoostControl.VALUES, "boost_control");
|
||||||
register(live_data_e.LDS_launch_control_state, LaunchControl.VALUES, "launch_control");
|
register(live_data_e.LDS_launch_control_state, LaunchControl.VALUES, "launch_control");
|
||||||
register(live_data_e.LDS_high_pressure_fuel_pump, HighPressureFuelPump.VALUES, "high_pressure_fuel_pump");
|
register(live_data_e.LDS_high_pressure_fuel_pump, HighPressureFuelPump.VALUES, "high_pressure_fuel_pump");
|
||||||
|
register(live_data_e.LDS_timing_state, TimingState.VALUES, "advance_map");
|
||||||
register(live_data_e.LDS_ignition_state, IgnitionState.VALUES, "advance_map");
|
register(live_data_e.LDS_ignition_state, IgnitionState.VALUES, "advance_map");
|
||||||
register(live_data_e.LDS_electronic_throttle, ElectronicThrottle.VALUES, "electronic_throttle");
|
register(live_data_e.LDS_electronic_throttle, ElectronicThrottle.VALUES, "electronic_throttle");
|
||||||
register(live_data_e.LDS_knock_controller, KnockController.VALUES, "knock_controller");
|
register(live_data_e.LDS_knock_controller, KnockController.VALUES, "knock_controller");
|
||||||
register(live_data_e.LDS_wideband_state, WidebandController.VALUES, "AemXSeriesLambda");
|
register(live_data_e.LDS_wideband_state, WidebandController.VALUES, "AemXSeriesLambda");
|
||||||
register(live_data_e.LDS_trigger_state_primary, TriggerStatePrimary.VALUES, "trigger_decoder");
|
register(live_data_e.LDS_trigger_state_primary, TriggerStatePrimary.VALUES, "trigger_decoder");
|
||||||
register(live_data_e.LDS_fuel_computer, FuelComputer.VALUES, "fuel_computer");
|
register(live_data_e.LDS_fuel_computer, FuelComputer.VALUES, "fuel_computer");
|
||||||
|
register(live_data_e.LDS_antilag_system_state, AntilagSystem.VALUES, "antilag_system");
|
||||||
if (map.size() != live_data_e.values().length) {
|
if (map.size() != live_data_e.values().length) {
|
||||||
Set<live_data_e> missing = new HashSet<>(Arrays.asList(live_data_e.values()));
|
Set<live_data_e> missing = new HashSet<>(Arrays.asList(live_data_e.values()));
|
||||||
missing.removeAll(map.keySet());
|
missing.removeAll(map.keySet());
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
package com.rusefi.ldmp;
|
package com.rusefi.ldmp;
|
||||||
|
|
||||||
|
import com.rusefi.config.generated.FuelComputer;
|
||||||
|
import com.rusefi.config.generated.TimingState;
|
||||||
import com.rusefi.config.generated.TsOutputs;
|
import com.rusefi.config.generated.TsOutputs;
|
||||||
import com.rusefi.enums.live_data_e;
|
import com.rusefi.enums.live_data_e;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
@ -16,6 +18,9 @@ public class StateDictionaryTest {
|
||||||
@Test
|
@Test
|
||||||
public void testOffset() {
|
public void testOffset() {
|
||||||
int outputsSize = StateDictionary.getSize(TsOutputs.VALUES);
|
int outputsSize = StateDictionary.getSize(TsOutputs.VALUES);
|
||||||
assertEquals(outputsSize, StateDictionary.INSTANCE.getOffset(live_data_e.LDS_knock_controller));
|
assertEquals(outputsSize
|
||||||
|
+ StateDictionary.getSize(FuelComputer.VALUES)
|
||||||
|
+ StateDictionary.getSize(TimingState.VALUES)
|
||||||
|
, StateDictionary.INSTANCE.getOffset(live_data_e.LDS_knock_controller));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue