Skip to content

Commit

Permalink
put a String in the map for KEY_PARITY, not an Integer.
Browse files Browse the repository at this point in the history
  • Loading branch information
wojtus authored and paolodenti committed Oct 1, 2015
1 parent f991ddb commit c5d02be
Showing 1 changed file with 15 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -149,23 +149,30 @@ public void updated(Dictionary<String, ?> config)
if (config != null) {

Boolean configChanged = false;
/**
* Valid values of the baudRateString
* "75", "110", "300", "1200", "2400", "4800",
* "9600", "19200", "38400", "57600", "115200"
* @see org.openhab.io.transport.cul.internal.CULSerialHandlerImpl
*/
String baudRateString = (String) config.get(KEY_BAUD_RATE);
if(StringUtils.isNotBlank(baudRateString)){
properties.put(KEY_BAUD_RATE, baudRateString);
configChanged = true;
}

/*
* PARITY_EVEN 2
* PARITY_MARK 3
* PARITY_NONE 0
* PARITY_ODD 1
* PARITY_SPACE 4
/**
* Valid values of the parityString
* "NONE"
* "ODD"
* "EVEN"
* "MARK"
* "SPACE"
* @see org.openhab.io.transport.cul.internal.CULSerialHandlerImpl
*/

String parityString = (String) config.get(KEY_PARITY);
if(StringUtils.isNotBlank(parityString)){
properties.put(KEY_PARITY, Integer.parseInt(parityString));
properties.put(KEY_PARITY, parityString);
configChanged = true;
}

Expand Down

0 comments on commit c5d02be

Please sign in to comment.