console does not work for custom FW #6961
This commit is contained in:
parent
c1ba9b1b32
commit
50c11cf778
|
@ -70,6 +70,10 @@ public class BinaryProtocol {
|
|||
public static boolean DISABLE_LOCAL_CONFIGURATION_CACHE;
|
||||
public static IniFileProvider iniFileProvider = new RealIniFileProvider();
|
||||
|
||||
public IniFileModel getIniFile() {
|
||||
return iniFile;
|
||||
}
|
||||
|
||||
public static String findCommand(byte command) {
|
||||
switch (command) {
|
||||
case Integration.TS_PAGE_COMMAND:
|
||||
|
@ -377,7 +381,7 @@ public class BinaryProtocol {
|
|||
if (ConnectionAndMeta.saveSettingsToFile()) {
|
||||
ConfigurationImageFile.saveToFile(image, CONFIGURATION_RUSEFI_BINARY);
|
||||
}
|
||||
Msq tune = MsqFactory.valueOf(image, IniFileModelImpl.getInstance());
|
||||
Msq tune = MsqFactory.valueOf(image, iniFile);
|
||||
tune.writeXmlFile(CONFIGURATION_RUSEFI_XML);
|
||||
} catch (Exception e) {
|
||||
System.err.println("Ignoring " + e);
|
||||
|
|
|
@ -10,7 +10,7 @@ public interface rusEFIVersion {
|
|||
* *** BE CAREFUL WE HAVE SEPARATE AUTOUPDATE_VERSION also managed manually ***
|
||||
* @see com.rusefi.autoupdate.Autoupdate#AUTOUPDATE_VERSION
|
||||
*/
|
||||
int CONSOLE_VERSION = 20240930;
|
||||
int CONSOLE_VERSION = 20241001;
|
||||
AtomicReference<String> firmwareVersion = new AtomicReference<>("N/A");
|
||||
|
||||
static long classBuildTimeMillis() {
|
||||
|
|
|
@ -25,7 +25,7 @@ public class OnlineTab {
|
|||
upload.addActionListener(new AbstractAction() {
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
Msq tune = MsqFactory.valueOf(uiContext.getLinkManager().getCurrentStreamState().getControllerConfiguration(), uiContext.getIni());
|
||||
Msq tune = MsqFactory.valueOf(uiContext.getLinkManager().getCurrentStreamState().getControllerConfiguration(), null);
|
||||
Online.uploadTune(tune, content, null);
|
||||
}
|
||||
});
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
package com.rusefi.ui;
|
||||
|
||||
import com.opensr5.ini.IniFileModel;
|
||||
import com.opensr5.ini.IniFileModelImpl;
|
||||
import com.rusefi.SensorSnifferCentral;
|
||||
import com.rusefi.io.CommandQueue;
|
||||
import com.rusefi.io.LinkManager;
|
||||
|
@ -24,8 +22,4 @@ public class UIContext {
|
|||
public CommandQueue getCommandQueue() {
|
||||
return linkManager.getCommandQueue();
|
||||
}
|
||||
|
||||
public IniFileModel getIni() {
|
||||
return IniFileModelImpl.getInstance();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -92,7 +92,7 @@ public class MainFrame {
|
|||
ConnectionWatchdog.init(linkManager);
|
||||
|
||||
SwingUtilities.invokeLater(() -> {
|
||||
tabbedPane.settingsTab.showContent();
|
||||
tabbedPane.settingsTab.showContent(linkManager);
|
||||
tabbedPane.logsManager.showContent();
|
||||
/**
|
||||
* todo: we are definitely not handling reconnect properly, no code to shut down old instance of server
|
||||
|
|
|
@ -1,12 +1,11 @@
|
|||
package com.rusefi.ui.console;
|
||||
|
||||
import com.opensr5.ini.DialogModel;
|
||||
import com.opensr5.ini.IniFileModel;
|
||||
import com.rusefi.config.Field;
|
||||
import com.rusefi.config.FieldType;
|
||||
import com.rusefi.config.FieldsMap;
|
||||
import com.rusefi.config.generated.Fields;
|
||||
import com.rusefi.config.generated.Integration;
|
||||
import com.rusefi.io.LinkManager;
|
||||
import com.rusefi.ui.RecentCommands;
|
||||
import com.rusefi.ui.UIContext;
|
||||
import com.rusefi.ui.config.*;
|
||||
|
@ -32,6 +31,7 @@ public class SettingsTab {
|
|||
private final JButton dialog = new JButton();
|
||||
private final JPanel dialogBody = new JPanel();
|
||||
private final UIContext uiContext;
|
||||
private LinkManager linkManager;
|
||||
|
||||
public SettingsTab(UIContext uiContext) {
|
||||
this.uiContext = uiContext;
|
||||
|
@ -42,8 +42,9 @@ public class SettingsTab {
|
|||
return content;
|
||||
}
|
||||
|
||||
public void showContent() {
|
||||
final Map<String, DialogModel> dialogs = uiContext.getIni().getDialogs();
|
||||
public void showContent(LinkManager linkManager) {
|
||||
this.linkManager = linkManager;
|
||||
final Map<String, DialogModel> dialogs = linkManager.getBinaryProtocol().getIniFile().getDialogs();
|
||||
if (dialogs.isEmpty()) {
|
||||
content.removeAll();
|
||||
content.add(new JLabel("Meta data not found: " + RUSEFI_INI_PREFIX + "*" + RUSEFI_INI_SUFFIX));
|
||||
|
@ -135,7 +136,7 @@ public class SettingsTab {
|
|||
dialog.setText(name);
|
||||
dialogBody.removeAll();
|
||||
|
||||
DialogModel m = uiContext.getIni().getDialogs().get(name);
|
||||
DialogModel m = linkManager.getBinaryProtocol().getIniFile().getDialogs().get(name);
|
||||
|
||||
dialogBody.setLayout(new GridLayout(m.getFields().size(), 1));
|
||||
|
||||
|
|
Loading…
Reference in New Issue