Skip to content

Commit

Permalink
[rotel] Thread name format updated (openhab#8238)
Browse files Browse the repository at this point in the history
Related to openhab#8216

Signed-off-by: Laurent Garnier <[email protected]>
  • Loading branch information
lolodomo authored and andrewfg committed Aug 31, 2020
1 parent b31e548 commit b3a1699
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,4 @@ public class RotelBindingConstants {

// List of all properties
public static final String PROPERTY_PROTOCOL = "protocol";

public static final String THREAD_NAME_PREFIX = "OH-" + BINDING_ID + "-";
}
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ public class RotelReaderThread extends Thread {
* Constructor
*
* @param connector the object that should handle the received message
* @param threadName the name of the thread
*/
public RotelReaderThread(RotelConnector connector, String threadName) {
super(threadName);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ public class RotelHandler extends BaseThingHandler implements RotelMessageEventL
private SerialPortManager serialPortManager;

private RotelConnector connector = new RotelSimuConnector(DEFAULT_MODEL, RotelProtocol.HEX, new HashMap<>(),
THREAD_NAME_PREFIX);
"OH-binding-rotel");

private int minVolume;
private int maxVolume;
Expand Down Expand Up @@ -292,7 +292,7 @@ public void initialize() {

Map<RotelSource, String> sourcesLabels = new HashMap<>();

String readerThreadName = THREAD_NAME_PREFIX + getThing().getUID().getAsString();
String readerThreadName = "OH-binding-" + getThing().getUID().getAsString();

connector = new RotelSimuConnector(rotelModel, rotelProtocol, sourcesLabels, readerThreadName);

Expand Down

0 comments on commit b3a1699

Please sign in to comment.