Skip to content
This repository has been archived by the owner on May 17, 2021. It is now read-only.

[DSCAlarm] Bug Fix: DSC Alarm Command 060 Not Working #5108

Merged
merged 2 commits into from
Feb 20, 2017
Merged

[DSCAlarm] Bug Fix: DSC Alarm Command 060 Not Working #5108

merged 2 commits into from
Feb 20, 2017

Conversation

RSStephens
Copy link
Member

The DSC Alarm command was not working correctly. The binding was
erroneously checking for a partition number which is not required by
this command. This has been tested as seen here, and found to be working correctly.

Signed-off by: Russell Stephens rsstephens@gmail.com (github:@RSStephens)

The DSC Alarm command was not working correctly.  The binding was
erroneously checking for a partition number which is not requirered by
this command.
Copy link
Contributor

@watou watou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two minor comments that don't need to be changed. Otherwise looks good to me.

logger.error("sendCommand(): Partition number must be a single character string from 1 to 8, it was: " + apiData[0]);
logger.error(
"sendCommand(): Partition number must be a single character string from 1 to 8, it was: "
+ apiData[0]);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not strictly necessary since the likelihood of errors being configured to be logged is very high, but this could be changed to use parameterized logging instead of string concatenation.

break;
}

if (apiData[1] == null || !apiData[1].matches("[1-4]")) {
logger.error("sendCommand(): Output number must be a single character string from 1 to 4, it was: " + apiData[1]);
logger.error("sendCommand(): Output number must be a single character string from 1 to 4, it was: "
+ apiData[1]);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not strictly necessary since the likelihood of errors being configured to be logged is very high, but this could be changed to use parameterized logging instead of string concatenation.

@watou watou added this to the 1.9.1 milestone Feb 20, 2017
@watou watou added the bug label Feb 20, 2017
@RSStephens
Copy link
Member Author

Hello John,

I took your advise and replaced the string concatenation to the parameterized method. Strange those were the only two like that, the others were the correct way. Thanks.

@watou watou merged commit a215a50 into openhab:master Feb 20, 2017
watou pushed a commit to watou/openhab that referenced this pull request Feb 20, 2017
* [DSCAlarm] Bug Fix: DSC Alarm Command 060 Not Working

The DSC Alarm command was not working correctly.  The binding was
erroneously checking for a partition number which is not requirered by
this command.

* Removed String Concatonation in logging statements
@watou
Copy link
Contributor

watou commented Feb 20, 2017

Thanks Russell! Also cherry-picked onto the 1.9.x branch.

@kaikreuzer kaikreuzer modified the milestones: 1.9.1, 1.10.0 Jun 25, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants