autoupdate fails #6777

only:minor refactoring
This commit is contained in:
rusefillc 2024-08-07 15:26:06 -04:00
parent 4a18987374
commit 49f67383bb
3 changed files with 16 additions and 12 deletions

View File

@ -46,20 +46,12 @@ public class ConnectionAndMeta {
return signatureWhiteLabel;
}
public static boolean usePCAN() {
return getBoolean("show_pcan");
}
public static boolean useSimulator() {
return getBoolean("show_simulator");
}
// TS multiplier is technically different from autoscale, open question when we shall allow multiplier without autoscale
public static boolean flexibleAutoscale() {
return getBoolean("flexible_autoscale");
}
private static boolean getBoolean(String propertyName) {
public static boolean getBoolean(String propertyName) {
String flag = getProperties().getProperty(propertyName);
return Boolean.TRUE.toString().equalsIgnoreCase(flag);
}

View File

@ -2,7 +2,6 @@ package com.rusefi;
import com.devexperts.logging.Logging;
import com.rusefi.core.io.BundleUtil;
import com.rusefi.core.net.ConnectionAndMeta;
import com.rusefi.core.preferences.storage.PersistentConfiguration;
import com.rusefi.core.ui.FrameHelper;
import com.rusefi.io.LinkManager;
@ -135,7 +134,7 @@ public class StartupFrame {
connectButton.addActionListener(e -> connectButtonAction(comboSpeeds));
leftPanel.add(realHardwarePanel);
if (ConnectionAndMeta.useSimulator()) {
if (UiProperties.useSimulator()) {
leftPanel.add(miscPanel);
}
@ -143,7 +142,7 @@ public class StartupFrame {
JPanel topButtons = new JPanel(new FlowLayout(FlowLayout.CENTER, 5, 0));
topButtons.add(ToolButtons.createShowDeviceManagerButton());
topButtons.add(DriverInstall.createButton());
if (ConnectionAndMeta.usePCAN()) {
if (UiProperties.usePCAN()) {
topButtons.add(ToolButtons.createPcanConnectorButton());
}
realHardwarePanel.add(topButtons, "right, wrap");

View File

@ -0,0 +1,13 @@
package com.rusefi;
import com.rusefi.core.net.ConnectionAndMeta;
public class UiProperties {
public static boolean usePCAN() {
return ConnectionAndMeta.getBoolean("show_pcan");
}
public static boolean useSimulator() {
return ConnectionAndMeta.getBoolean("show_simulator");
}
}