Skip to content

Commit

Permalink
Merge pull request #11 from ulrichrobin/patch-3
Browse files Browse the repository at this point in the history
Giving possibility to change base refresh interval
  • Loading branch information
margau committed Jun 18, 2019
2 parents a81e5d6 + 6440bb1 commit c2e9d12
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ var sender = function(opt, parent) {
this.ip = options.ip || '255.255.255.255';
this.port = options.port || 6454;
this.verbose = this.parent.verbose;
this.base_refresh_interval = options.base_refresh_interval || 1000;

// Validate Input
if (this.net > 127) {
Expand Down Expand Up @@ -177,10 +178,10 @@ var sender = function(opt, parent) {
this.transmit();


// Send Frame all 1000ms even there is no channel change
// Send Frame every base_refresh_interval ms - even if no channel was changed
this.interval = setInterval(() => {
this.transmit();
}, 1000);
}, this.base_refresh_interval);
};
// Transmit function
sender.prototype.transmit = function() {
Expand Down

0 comments on commit c2e9d12

Please sign in to comment.