better field name
This commit is contained in:
parent
2541b3f31c
commit
b13e27028b
|
@ -6,7 +6,6 @@ import com.efiAnalytics.plugin.ecu.ControllerParameterChangeListener;
|
|||
import com.opensr5.ini.IniFileModel;
|
||||
import com.opensr5.ini.field.IniField;
|
||||
import com.rusefi.TsTuneReader;
|
||||
import com.rusefi.autoupdate.AutoupdateUtil;
|
||||
import com.rusefi.config.generated.Fields;
|
||||
import com.rusefi.tools.online.Online;
|
||||
import com.rusefi.tools.online.UploadResult;
|
||||
|
@ -38,9 +37,9 @@ public class UploadTab {
|
|||
|
||||
private final JButton upload = new JButton("Upload Current Tune");
|
||||
|
||||
private String currentConfiguration;
|
||||
private String projectName;
|
||||
|
||||
private UploaderStatus uploaderStatus = new UploaderStatus();
|
||||
private final UploaderStatus uploaderStatus = new UploaderStatus();
|
||||
|
||||
private final Timer timer = new Timer(AUTO_UPDATE_AGGREGATION, new AbstractAction() {
|
||||
@Override
|
||||
|
@ -48,7 +47,7 @@ public class UploadTab {
|
|||
// System.out.println("Timer! " + System.currentTimeMillis() + " " + timer + " " + e);
|
||||
if (UploadView.isAutoUpload()) {
|
||||
System.out.println(new Date() + ": enqueue tune");
|
||||
UploadQueue.enqueue(controllerAccessSupplier.get(), currentConfiguration);
|
||||
UploadQueue.enqueue(controllerAccessSupplier.get(), projectName);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -72,8 +71,8 @@ public class UploadTab {
|
|||
public void run() {
|
||||
while (true) {
|
||||
String configurationName = getConfigurationName();
|
||||
if ((currentConfiguration == null && configurationName != null)
|
||||
|| !currentConfiguration.equals(configurationName)) {
|
||||
if ((projectName == null && configurationName != null)
|
||||
|| !projectName.equals(configurationName)) {
|
||||
handleConfigurationChange(configurationName, controllerAccessSupplier.get());
|
||||
}
|
||||
|
||||
|
@ -151,16 +150,16 @@ public class UploadTab {
|
|||
/**
|
||||
* This method is invoked every time we defect a switch between projects
|
||||
*/
|
||||
private void handleConfigurationChange(String configurationName, ControllerAccess controllerAccess) {
|
||||
uploaderStatus.readTuneState(configurationName);
|
||||
private void handleConfigurationChange(String projectName, ControllerAccess controllerAccess) {
|
||||
uploaderStatus.readTuneState(projectName);
|
||||
|
||||
if (configurationName != null) {
|
||||
subscribeToUpdates(configurationName, controllerAccess);
|
||||
if (projectName != null) {
|
||||
subscribeToUpdates(projectName, controllerAccess);
|
||||
}
|
||||
|
||||
updateUploadEnabled();
|
||||
|
||||
currentConfiguration = configurationName;
|
||||
this.projectName = projectName;
|
||||
}
|
||||
|
||||
private void updateUploadEnabled() {
|
||||
|
|
Loading…
Reference in New Issue