docs
This commit is contained in:
parent
c8012ffe02
commit
07dd88cb72
|
@ -7,6 +7,9 @@ import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* this weird class helps us match generated {@link live_data_e} with manually maintained {@link LiveDataView}
|
||||||
|
*/
|
||||||
public enum StateDictionary {
|
public enum StateDictionary {
|
||||||
INSTANCE;
|
INSTANCE;
|
||||||
|
|
||||||
|
@ -30,7 +33,7 @@ public enum StateDictionary {
|
||||||
register(live_data_e.LDS_MAIN_RELAY, MainRelay.VALUES);
|
register(live_data_e.LDS_MAIN_RELAY, MainRelay.VALUES);
|
||||||
register(live_data_e.LDS_BOOST_CONTROL, BoostControl.VALUES);
|
register(live_data_e.LDS_BOOST_CONTROL, BoostControl.VALUES);
|
||||||
if (map.size() != live_data_e.values().length) {
|
if (map.size() != live_data_e.values().length) {
|
||||||
Set<live_data_e> missing = new HashSet<live_data_e>(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());
|
||||||
throw new IllegalStateException("Some live_data_e does not have values: " + missing);
|
throw new IllegalStateException("Some live_data_e does not have values: " + missing);
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,7 +3,11 @@ package com.rusefi.livedata;
|
||||||
import com.rusefi.config.Field;
|
import com.rusefi.config.Field;
|
||||||
import com.rusefi.config.generated.*;
|
import com.rusefi.config.generated.*;
|
||||||
import com.rusefi.enums.live_data_e;
|
import com.rusefi.enums.live_data_e;
|
||||||
|
import com.rusefi.ldmp.StateDictionary;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @see StateDictionary
|
||||||
|
*/
|
||||||
public enum LiveDataView {
|
public enum LiveDataView {
|
||||||
AC_CONTROL(live_data_e.LDS_AC_CONTROL, AcControl.VALUES, "ac_control.cpp"),
|
AC_CONTROL(live_data_e.LDS_AC_CONTROL, AcControl.VALUES, "ac_control.cpp"),
|
||||||
FUEL_PUMP(live_data_e.LDS_FUEL_PUMP, FuelPump.VALUES, "fuel_pump.cpp"),
|
FUEL_PUMP(live_data_e.LDS_FUEL_PUMP, FuelPump.VALUES, "fuel_pump.cpp"),
|
||||||
|
|
Loading…
Reference in New Issue