Skip to content

Terminal thinks there is a connection when there is no device when using websocket client #200

@MatzElectronics

Description

@MatzElectronics

image

If you do not have a connection to a device when using the non-ws client, it will simulate the terminal and inform you that no devices are connected. When using the websocket client, it thinks that "No devices" is a device, and tries to connect with it, which then causes a bunch of communication errors.

We can use getComPort() in the callback for the terminal to verify a connection, but getComPort() is slow because it's looking for the selected option in the menu instead of just getting the menu's value:

// current (slow)
var getComPort = function () {
    return $('#comPort').find(":selected").text();
};

// should be (faster)
var getComPort = function () {
    return $('#comPort').val();
};

We should then replace text like "Searching..." and "No devices detected." with string constants because we'll have to test for them.

Metadata

Metadata

Labels

bugSomething isn't workingtask/verifyBug or feature is ready to be tested and verified

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions