proxy progress - no need to pull data in proxy mode
This commit is contained in:
parent
49c5a4e851
commit
9e3233df92
|
@ -0,0 +1 @@
|
|||
java -jar console/rusefi_console.jar network_connector
|
|
@ -0,0 +1 @@
|
|||
java -jar console/rusefi_console.jar reboot_dfu
|
|
@ -231,7 +231,7 @@ public class BinaryProtocol implements BinaryProtocolCommands {
|
|||
public void run() {
|
||||
while (!isClosed) {
|
||||
// FileLog.rlog("queue: " + LinkManager.COMMUNICATION_QUEUE.toString());
|
||||
if (linkManager.COMMUNICATION_QUEUE.isEmpty()) {
|
||||
if (linkManager.COMMUNICATION_QUEUE.isEmpty() && linkManager.getNeedPullData()) {
|
||||
linkManager.submit(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
|
|
|
@ -42,6 +42,7 @@ public class LinkManager {
|
|||
private LinkConnector connector;
|
||||
private boolean isStarted;
|
||||
private boolean compositeLogicEnabled = true;
|
||||
private boolean needPullData = true;
|
||||
|
||||
public LinkManager(Logger logger) {
|
||||
this.logger = logger;
|
||||
|
@ -107,14 +108,24 @@ public class LinkManager {
|
|||
return commandQueue;
|
||||
}
|
||||
|
||||
public void setCompositeLogicEnabled(boolean compositeLogicEnabled) {
|
||||
public LinkManager setCompositeLogicEnabled(boolean compositeLogicEnabled) {
|
||||
this.compositeLogicEnabled = compositeLogicEnabled;
|
||||
return this;
|
||||
}
|
||||
|
||||
public boolean getCompositeLogicEnabled() {
|
||||
return compositeLogicEnabled;
|
||||
}
|
||||
|
||||
public boolean getNeedPullData() {
|
||||
return needPullData;
|
||||
}
|
||||
|
||||
public LinkManager setNeedPullData(boolean needPullData) {
|
||||
this.needPullData = needPullData;
|
||||
return this;
|
||||
}
|
||||
|
||||
public enum LogLevel {
|
||||
INFO,
|
||||
DEBUG,
|
||||
|
|
|
@ -19,8 +19,9 @@ public class NetworkConnectorStartup {
|
|||
}
|
||||
|
||||
|
||||
LinkManager linkManager = new LinkManager(Logger.CONSOLE);
|
||||
linkManager.setCompositeLogicEnabled(false);
|
||||
LinkManager linkManager = new LinkManager(Logger.CONSOLE)
|
||||
.setCompositeLogicEnabled(false)
|
||||
.setNeedPullData(false);
|
||||
linkManager.startAndConnect(autoDetectedPort, ConnectionStateListener.VOID);
|
||||
|
||||
String authToken = AuthTokenPanel.getAuthToken();
|
||||
|
|
Loading…
Reference in New Issue