mirror of https://github.com/rusefi/rusefi-1.git
sorting sensor selection menu items
This commit is contained in:
parent
d41e2fecb7
commit
6382a26b2c
|
@ -4,7 +4,10 @@ import com.rusefi.config.FieldType;
|
|||
import com.rusefi.config.Fields;
|
||||
import eu.hansolo.steelseries.tools.BackgroundColor;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.Comparator;
|
||||
import java.util.Set;
|
||||
import java.util.TreeSet;
|
||||
|
||||
import static com.rusefi.config.Fields.*;
|
||||
|
||||
|
@ -209,8 +212,8 @@ public enum Sensor {
|
|||
offset = -1;
|
||||
}
|
||||
|
||||
public static ArrayList<Sensor> getSensorsForCategory(String category) {
|
||||
final ArrayList<Sensor> sensors = new ArrayList<>();
|
||||
public static Collection<Sensor> getSensorsForCategory(String category) {
|
||||
final Set<Sensor> sensors = new TreeSet<>(Comparator.comparing(o -> o.getName().toLowerCase()));
|
||||
|
||||
for (final Sensor sensor : values()) {
|
||||
if (sensor.category.getName().equals(category)) {
|
||||
|
|
|
@ -9,7 +9,7 @@ public enum SensorCategory {
|
|||
|
||||
private final String name;
|
||||
|
||||
private SensorCategory(String name) {
|
||||
SensorCategory(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
|
|
|
@ -45,7 +45,7 @@ import static com.rusefi.ui.storage.PersistentConfiguration.getConfig;
|
|||
* @see EngineSnifferPanel
|
||||
*/
|
||||
public class Launcher {
|
||||
public static final int CONSOLE_VERSION = 20171203;
|
||||
public static final int CONSOLE_VERSION = 20171213;
|
||||
public static final boolean SHOW_STIMULATOR = false;
|
||||
private static final String TAB_INDEX = "main_tab";
|
||||
protected static final String PORT_KEY = "port";
|
||||
|
|
Loading…
Reference in New Issue