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

Improve DMX binding #4455

Merged
merged 4 commits into from Nov 1, 2017
Merged

Improve DMX binding #4455

merged 4 commits into from Nov 1, 2017

Conversation

J-N-K
Copy link
Contributor

@J-N-K J-N-K commented Oct 24, 2017

refactoring: rename class Channel to DmxChannel to avoid problems with ESH-class Channel
add tests for FadeAction
make Chaser turn to off after completed with infinite holdTime (-1)

Signed-off-by: Jan N. Klug <jan.n.klug@rub.de>
Signed-off-by: Jan N. Klug <jan.n.klug@rub.de>
Copy link
Contributor

@htreu htreu left a comment

Choose a reason for hiding this comment

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

Looks good to me, adding tests is always welcome :-)
See some minor comments inline.

* @author Jan N. Klug
*/
public enum ActionState {
waiting,
Copy link
Contributor

Choose a reason for hiding this comment

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

enum values should be all upper case.

@@ -253,8 +254,10 @@ public synchronized Integer getNewHiResValue(long calculationTime) {
if (hasRunningActions()) {
BaseAction action = actions.get(0);
value = action.getNewValue(this, calculationTime);
if (action.isCompleted()) {
if (ActionState.completed.equals(action.getState())) {
Copy link
Contributor

Choose a reason for hiding this comment

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

since ActionState are enum values this should be if (action.getState() == ActionState.COMPLETED) {. please check other comparison, too.

Signed-off-by: Jan N. Klug <jan.n.klug@rub.de>
@J-N-K
Copy link
Contributor Author

J-N-K commented Nov 1, 2017

Oops. Forgot to commit & push my changes.

Signed-off-by: Jan N. Klug <jan.n.klug@rub.de>
@sjsf
Copy link
Contributor

sjsf commented Nov 1, 2017

Now it seems to be complete, TravisCI likes it.
Thanks!

@sjsf sjsf merged commit c567375 into eclipse-archived:master Nov 1, 2017
@J-N-K J-N-K deleted the improve-dmx-binding branch November 1, 2017 12:53
@kaikreuzer kaikreuzer added this to the 0.9.0 milestone Nov 8, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants