probably fixing ArrayOutOfBounds reported by @andreika
This commit is contained in:
parent
730df561df
commit
b3882c55af
|
@ -48,7 +48,7 @@ import static com.rusefi.ui.storage.PersistentConfiguration.getConfig;
|
|||
* @see EngineSnifferPanel
|
||||
*/
|
||||
public class Launcher {
|
||||
public static final int CONSOLE_VERSION = 20191105;
|
||||
public static final int CONSOLE_VERSION = 20191124;
|
||||
public static final String INI_FILE_PATH = System.getProperty("ini_file_path", "..");
|
||||
public static final String INPUT_FILES_PATH = System.getProperty("input_files_path", "..");
|
||||
public static final String TOOLS_PATH = System.getProperty("tools_path", ".");
|
||||
|
|
|
@ -244,7 +244,9 @@ public class GaugesPanel {
|
|||
gauges.setLayout(rows, columns);
|
||||
|
||||
for (int i = 0; i < rows * columns; i++) {
|
||||
Component element = GaugesGridElement.read(config.getChild("element_" + i), DEFAULT_LAYOUT[i]);
|
||||
// sometimes grid is quite large so we shall be careful with default sensor index
|
||||
Sensor defaultSensor = DEFAULT_LAYOUT[Math.min(i, DEFAULT_LAYOUT.length - 1)];
|
||||
Component element = GaugesGridElement.read(config.getChild("element_" + i), defaultSensor);
|
||||
|
||||
gauges.panel.add(element);
|
||||
}
|
||||
|
|
|
@ -36,6 +36,7 @@ public class Node {
|
|||
return true;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public Node getChild(String name) {
|
||||
Node child = (Node) config.get(name);
|
||||
if (child == null) {
|
||||
|
|
Loading…
Reference in New Issue