Skip to content

Commit

Permalink
fix(lights-effects): movement effects always using some default props
Browse files Browse the repository at this point in the history
  • Loading branch information
Yoronex committed Feb 4, 2025
1 parent d7ed90e commit fd3c6f5
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/modules/lights/effects/movement/classic-rotate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ export default class ClassicRotate extends BaseRotate<ClassicRotateProps> {
super(
lightsGroup,
{
cycleTime: DEFAULT_CYCLE_TIME,
offsetFactor: DEFAULT_OFFSET_FACTOR,
cycleTime: props.cycleTime || DEFAULT_CYCLE_TIME,
offsetFactor: props.offsetFactor || DEFAULT_OFFSET_FACTOR,
},
{ pattern: props.pattern, direction: props.direction },
);
Expand Down
4 changes: 2 additions & 2 deletions src/modules/lights/effects/movement/search-light.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ export default class SearchLight extends BaseRotate<SearchLightProps> {
super(
lightsGroup,
{
cycleTime: DEFAULT_CYCLE_TIME,
offsetFactor: DEFAULT_OFFSET_FACTOR,
cycleTime: props.cycleTime || DEFAULT_CYCLE_TIME,
offsetFactor: props.offsetFactor || DEFAULT_OFFSET_FACTOR,
},
{ pattern: props.pattern, direction: props.direction },
);
Expand Down
5 changes: 4 additions & 1 deletion src/modules/lights/effects/movement/table-rotate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,10 @@ export default class TableRotate extends BaseRotate<TableRotateProps> {
constructor(lightsGroup: LightsGroup, props: TableRotateProps) {
super(
lightsGroup,
{ cycleTime: DEFAULT_CYCLE_TIME, offsetFactor: DEFAULT_OFFSET_FACTOR },
{
cycleTime: props.cycleTime || DEFAULT_CYCLE_TIME,
offsetFactor: props.offsetFactor || DEFAULT_OFFSET_FACTOR,
},
{ pattern: props.pattern, direction: props.direction },
);
this.props = props;
Expand Down

0 comments on commit fd3c6f5

Please sign in to comment.