Skip to content
This repository has been archived by the owner on Jun 4, 2024. It is now read-only.

Commit

Permalink
Emit state during velodyne player setup (#4728)
Browse files Browse the repository at this point in the history
When selecting a data source, the open dialog remains open until a
player presence other than NOT_PRESENT is set of the player state. Since
the velodyne player would only produce a player state when receiving its
first message the open dialog would remain open after setting the port
and clicking "open". This behavior makes it look like the dialog is
broken and the user's click action was not registered.

This change updates the Velodyne player to emit a state update during
initialization which clears the open dialog and shows the user the data
source information. I've opted to change the state from INITIALIZING to
PRESENT since we know all the datatype information for the player and
are waiting for new messages. These messages will start to arrive when
the user turns on the sensor or configured their network to match the
sensor requirements.

Fixes: #4689
  • Loading branch information
defunctzombie committed Nov 1, 2022
1 parent f476d49 commit ec8f1f7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/studio-base/src/players/VelodynePlayer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,8 @@ export default class VelodynePlayer implements Player {
if (this._closed) {
return;
}
this._presence = PlayerPresence.INITIALIZING;
this._presence = PlayerPresence.PRESENT;
this._emitState();

if (this._socket == undefined) {
const net = await Sockets.Create();
Expand Down

0 comments on commit ec8f1f7

Please sign in to comment.