refactoring timeouts

This commit is contained in:
rusefi 2020-05-25 18:38:47 -04:00
parent 7ab299f8e2
commit b3d6ded23f
3 changed files with 3 additions and 3 deletions

View File

@ -190,7 +190,7 @@ this is just too unreliable at this point :(
FileLog.MAIN.logLine("AUTOTEST setEngineType " + type);
// sendCommand(CMD_PINS);
currentEngineType = type;
sendCommand("set " + Fields.CMD_ENGINE_TYPE + " " + type, COMPLEX_COMMAND_RETRY, 30);
sendCommand("set " + Fields.CMD_ENGINE_TYPE + " " + type, COMPLEX_COMMAND_RETRY, 2 * Timeouts.CMD_TIMEOUT);
// TODO: document the reason for this sleep?!
sleep(1);
sendCommand(getEnableCommand("self_stimulation"));

View File

@ -11,6 +11,6 @@ public interface Timeouts {
int READ_IMAGE_TIMEOUT = 60 * SECOND;
int CONNECTION_RESTART_DELAY = 20 * SECOND;
int CS_TIMEOUT = 3000;
int CONNECTION_STATUS_TIMEOUT = 3 * SECOND;
}

View File

@ -38,7 +38,7 @@ public class ConnectionStatusLogic {
public static ConnectionStatusLogic INSTANCE = new ConnectionStatusLogic();
private List<Listener> listeners = new CopyOnWriteArrayList<>();
private final Timer timer = new Timer(Timeouts.CS_TIMEOUT, new ActionListener() {
private final Timer timer = new Timer(Timeouts.CONNECTION_STATUS_TIMEOUT, new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
// setValue(Value.NOT_CONNECTED);